REPL missing required module 'SwiftGlibc'


(Ryan Lovelett) #1

In my latest builds (I just build
swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a) I've noticed that when I
attempt to open the REPL and `import Glibc` the REPL reports:

warning: <REPL>:1:1: warning: #line directive is deprecated, please use
#sourceLocation instead
#line 2 "repl.swift"
^~~~~
#sourceLocation

warning: repl.swift:3:1: warning: #line directive is deprecated, please
use #sourceLocation instead
#line
^~~~~
#sourceLocation

error: repl.swift:2:8: error: missing required module 'SwiftGlibc'
import Glibc

Also lldb seems to suffer from this same issue as well. If I compile a
source and attach to the process and stop at a breakpoint it reports
similar (e.g., `error: missing required module 'SwiftGlibc'`).

I'd use `git bisect` to track down when it started doing that.
Unfortunately this is probably the first time I've ever actually opened
the REPL. So it might have been broken all along.

Incidentally it works just find if I compile a source (`swiftc`) that
imports Glibc.

Is this a known issue? Any suggestions on where I should begin my
investigation into resolving this?


(Ryan Lovelett) #2

Just to make sure it wasn't my Arch Linux distro (unsupported build)
that was exhibiting this behavior I switched over to Ubuntu 14.04.4 LTS
(GNU/Linux 3.16.0-67-generic x86_64). I then tried the exact same
commands on that machine as before. Same result.

I'm in the process of getting swift-integration-tests working on the
Ubuntu machine to run the repl tests on the downloaded *.tar.gz. It
would seem to me they should have caught this.

···

On Wed, Apr 13, 2016, at 12:18 PM, Ryan Lovelett via swift-lldb-dev wrote:

In my latest builds (I just build
swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a) I've noticed that when I
attempt to open the REPL and `import Glibc` the REPL reports:

warning: <REPL>:1:1: warning: #line directive is deprecated, please use
#sourceLocation instead
#line 2 "repl.swift"
^~~~~
#sourceLocation

warning: repl.swift:3:1: warning: #line directive is deprecated, please
use #sourceLocation instead
#line
^~~~~
#sourceLocation

error: repl.swift:2:8: error: missing required module 'SwiftGlibc'
import Glibc

Also lldb seems to suffer from this same issue as well. If I compile a
source and attach to the process and stop at a breakpoint it reports
similar (e.g., `error: missing required module 'SwiftGlibc'`).

I'd use `git bisect` to track down when it started doing that.
Unfortunately this is probably the first time I've ever actually opened
the REPL. So it might have been broken all along.

Incidentally it works just find if I compile a source (`swiftc`) that
imports Glibc.

Is this a known issue? Any suggestions on where I should begin my
investigation into resolving this?
_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev


(Kate Stone) #3

It works as expected in the 3-16 snapshot but exhibits the failure you’ve cited below in the 3-24 and later snapshots. I see SR-1109 <https://bugs.swift.org/browse/SR-1109> has been filed to track the issue which is definitely not related to the #line directive warning. We’ll clean up the source of the warning but it should be (a) completely innocuous and (b) hidden from view given that it relates to code you didn’t actually type in the REPL. We’re already tracking both of these minor issues.

… which just leaves the bigger question about what regressed between 3-16 and 3-24. I’ll prompt members of my team to give some suggestions about where to start investigating.

Kate Stone k8stone@apple.com <mailto:k8stone@apple.com>
 Xcode Low Level Tools

···

On Apr 13, 2016, at 9:18 AM, Ryan Lovelett via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

In my latest builds (I just build
swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a) I've noticed that when I
attempt to open the REPL and `import Glibc` the REPL reports:

warning: <REPL>:1:1: warning: #line directive is deprecated, please use
#sourceLocation instead
#line 2 "repl.swift"
^~~~~
#sourceLocation

warning: repl.swift:3:1: warning: #line directive is deprecated, please
use #sourceLocation instead
#line
^~~~~
#sourceLocation

error: repl.swift:2:8: error: missing required module 'SwiftGlibc'
import Glibc

Also lldb seems to suffer from this same issue as well. If I compile a
source and attach to the process and stop at a breakpoint it reports
similar (e.g., `error: missing required module 'SwiftGlibc'`).

I'd use `git bisect` to track down when it started doing that.
Unfortunately this is probably the first time I've ever actually opened
the REPL. So it might have been broken all along.

Incidentally it works just find if I compile a source (`swiftc`) that
imports Glibc.

Is this a known issue? Any suggestions on where I should begin my
investigation into resolving this?
_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev