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
Swift 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.4) [REPL]
macOS 10.14.4 (18E226)
Additional Detail from JIRA
Votes
0
Component/s
LLDB for Swift, Package Manager
Labels
Bug
Assignee
None
Priority
Medium
md5: 1469ee70b760a7d4bb3eb5472d17ec18
Issue Description:
I have a Vapor application that I am running in the Swift REPL using the --repl flag. I expect that when I then import one of the modules from this app, that I can not only access public code, but internal code also, considering the REPL will most likely be used for testing. But no, I can't do that.
I then tried to enable testing by passing in the -Xswiftc -enable-testing flags and importing my modules with the @testable attribute, but that didn't do the trick.
This is by design. The REPL is an environment for using other people's libraries as much as it is one for playing with your own; if not compiled with -enable-testing, the internal entry points may not even exist in the final binary.
Environment
Swift 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.4) [REPL]
macOS 10.14.4 (18E226)
Additional Detail from JIRA
md5: 1469ee70b760a7d4bb3eb5472d17ec18
Issue Description:
I have a Vapor application that I am running in the Swift REPL using the --repl flag. I expect that when I then import one of the modules from this app, that I can not only access public code, but internal code also, considering the REPL will most likely be used for testing. But no, I can't do that.
I then tried to enable testing by passing in the -Xswiftc -enable-testing flags and importing my modules with the @testable attribute, but that didn't do the trick.
This behavior can be displayed with any project module with internal code. Here is an [example project on GitHub|https://github.com/calebkleveter/REPLTest].
The text was updated successfully, but these errors were encountered: