[swift-dev] SR-3423 Starter questions
David Sweeris
davesweeris at mac.com
Mon Nov 13 09:25:00 CST 2017
> On Nov 13, 2017, at 6:00 AM, Brent Royal-Gordon via swift-dev <swift-dev at swift.org> wrote:
>
>> On Nov 11, 2017, at 2:59 PM, Mohammed Ennabah via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>>
>> I dug into the codebase as stated in the steps you mentioned, and tried to change one of the errors to see if it really change when I use Swift REPL, but nothing changed. Is it possible that I change something and directly affect the Swift compiler? (maybe I need to do a build first? Or maybe related to xcode-select?)
>
> If you just type "swift" at the command line, you'll run the version of Swift built into Xcode. You will need to build Swift first ("utils/build-script" is the easiest way, but not the fastest), and you will also need to run the version of the Swift interpreter you just built. You can do that with a command like:
>
> ../build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swift
>
> (The path will be a little different if you use the "-x" flag to build-script, which generates an Xcode project, albeit one that's a pain to use.)
If you're in Xcode, you can also put code that will trigger whatever you're working on in one or more files and pass them to the compiler via the "Arguments Passed On Launch" setting in the "Arguments" tab of "Run" section of the relevant scheme ("swift", in this case), by clicking the scheme menu (in the top of the project window, just to the right of the button with the stop icon) and selecting "Edit Scheme...". That all sounds confusing but isn't that bad... if we could embed images, it'd take all of 5 seconds to see what I'm talking about (pun intended, naturally).
For example, I've been working on SR-4102 lately, so I've got the scheme set to pass "/path/to/my/swift/files/TestProjects/SR-4102/SR-4102/main.swift".
- Dave Sweeris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20171113/0c3a8cdb/attachment.html>
More information about the swift-dev
mailing list