Swift REPL doesn't work

Hopefully this isn't a dumb question. I started trying to learn Swift and for some reason the REPL doesn't work. I'm having issues using the Swift REPL in Terminal. All I have to do is type "swift" right? No matter what it keeps returning:

error: failed to launch REPL process: process exited with status -1 (Error 1)

Not sure what to do to fix this. I know I can probably use a playground too, but I was just trying to get it to work from Terminal too.

What versions of Swift, macOS, and Xcode are you using?

I'm on MacOS 10.14.6, Swift 5.0.1, and Xcode 10.3.

I actually think I may have fixed the issue. In the Xcode preferences, under Locations, I didn't have anything selected under command line tools before. However now, I get a very long output before entering the REPL.

I pasted it here:
https://pastebin.com/Swnnbnrh

I don't think that's normal. I am able to use it now though.

I pasted it here:
https://pastebin.com/Swnnbnrh

@theSearch I see the same error with Swift 5.0.1. I don't see it with Swift 5.1 however, so it appears to be fixed.

Terms of Service

Privacy Policy

Cookie Policy