[swift-users] Debugging XCTests on Linux

Ankit Agarwal ankit at ankit.im
Fri Jan 6 06:45:37 CST 2017


Yes you should be able to import Foundation in REPL using the latest
toolchain on linux. FWIW I am getting same error you are from latest
toolchain:

root at 4027f71e87ff:/swiftpm# swift -I .build/debug -L .build/debug -lResult
-I /usr/lib/clang/3.8/include
Welcome to Swift version 3.1-dev (LLVM c3e057b06a, Clang 0540ceb7ad, Swift
093e275775). Type :help for assistance.
  1> import Foundation
  2> import Result
  3> let r = Result<String, AnyError>("a")
r: Result.Result<String, Result.AnyError> = success {
  success = "a"
}
  4> let nse = NSError(domain: "Foo", code: 42, userInfo: nil)
nse: Foundation.NSError = {
  Foundation.NSObject = {}
  _domain = "Foo"
  _code = 42
  _userInfo = nil
}
  5> let ae = AnyError(nse)
ae: Result.AnyError = {
  error = <extracting data from value failed>

}
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance.)
  6> ae
$R0: Result.AnyError = {
  error = {
    instance_type = 0x0000000000000000
  }
}


On Fri, Jan 6, 2017 at 5:50 PM, Robert Atkins <
ratkins+swift-users at fastmail.fm> wrote:

> On Fri, 6 Jan 2017, at 11:14, Ankit Agarwal wrote:
>
> Thats weird, you should be able to import Foundation from the toolchain
>
>
> This is on Linux, so the toolchain stuff isn't relevant, is it?
>
> Cheers, Robert.
>



-- 
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170106/2eeac4f6/attachment.html>


More information about the swift-users mailing list