You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-3280 Package manager should link main swiftmodule in executables
relates to:
SR-3280 Package manager should link main swiftmodule in executables
Issue Description:
Very often, when I try to use lldb on Linux (with Swift 5.0.x or 5.1) I get
(lldb) po ev
error: warning: failed to get module "NIO" from AST context
error: in auto-import:
failed to get module "NIO" from AST context
here's a very straightforward repro without having any dependencies (but Docker):
cd /tmp && git clone https://github.com/apple/swift-nio && cd swift-nio && git reset --hard f548a29a27d7e533f1714d2d282ca0d79f6086dd && docker run -it --rm -v "$PWD:$PWD" -w "$PWD" swift:5.1 swift build --build-tests && docker run -it --rm -v "$PWD:$PWD" -w "$PWD" --privileged swift:5.1 lldb .build/debug/swift-nioPackageTests.xctest
which will compile the NIO test suite and run LLDB on the test suite. Once you're in lldb:
(lldb) break set -f EventLoop.swift -l 857
(lldb) run NIOTests.ChannelTests/testHalfClosure
and once you hit the breakpoint do
po ev
Expected: prints ev
Actual:
(lldb) po ev
error: warning: failed to get module "NIO" from AST context
error: in auto-import:
failed to get module "NIO" from AST context
macOS
This also doesn't work in macOS. The setup is similar:
cd /tmp && git clone https://github.com/apple/swift-nio && cd swift-nio && git reset --hard f548a29a27d7e533f1714d2d282ca0d79f6086dd && swift build --build-tests
after this, the tests are built. Now, open a new terminal window and type
lldb -w -n xctest
and in your first window type
swift test --filter NIOTests.ChannelTests/testHalfClosure
now, lldb should've attached and in lldb you type
(lldb) break set -f EventLoop.swift -l 857 # ignore the warning
(lldb) cont
Soon after, the breakpoint should be hit and then you type
(lldb) po ev
which leads to
(lldb) po ev
Cannot create Swift scratch context (couldn't load the Swift stdlib)Cannot create Swift scratch context (couldn't load the Swift stdlib)Shared Swift state for xctest could not be initialized.
The REPL and expressions are unavailable.
(lldb)
versions:
$ swift --version && sw_vers
Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
Target: x86_64-apple-darwin19.0.0
ProductName: Mac OS X
ProductVersion: 10.15
BuildVersion: 19A558d
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 34d8edffa7e6295e40791aa573b01e24
duplicates:
relates to:
Issue Description:
Very often, when I try to use lldb on Linux (with Swift 5.0.x or 5.1) I get
here's a very straightforward repro without having any dependencies (but Docker):
which will compile the NIO test suite and run LLDB on the test suite. Once you're in lldb:
and once you hit the breakpoint do
Expected: prints ev
Actual:
macOS
This also doesn't work in macOS. The setup is similar:
after this, the tests are built. Now, open a new terminal window and type
and in your first window type
now, lldb should've attached and in lldb you type
Soon after, the breakpoint should be hit and then you type
which leads to
versions:
The text was updated successfully, but these errors were encountered: