[swift-users] Help on how to compile a project.

Marcel Rebouças mscreboucas at gmail.com
Mon Feb 22 11:22:00 CST 2016


Hello all,


I’ve been using Swift for some time, and decided to learn deeper about the
language and the source code. I plan to try to modify a version of its
compiler in order to generate some code metrics (e.g. Depth of Inheritance
(DIT)) to the classes of the projects compiled by it. All in all, this is
the first time I am trying doing something like it - first time working in
a open source project -, and I’m lost.


*So, first, I would like to know if there is a way to compile xcode
projects (and all classes within it) using the Swift version that I built
from sources. *


I was able to correctly build Swift on my mac. Cloned the main
repositories, and built using swift/utils/build-script.

I am able to run .swift files using xcrun (i.e. xcrun
…/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swift  -Ounchecked -gnone
example.swift).


But I couldn’t find a way to compile complete xcode projects, that include
UIKit and other imports.


Is it possible to do this?



In the future, I then plan to generate extra output files from the
compilation process.


Thank you very much.


Marcel Rebouças
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160222/7da0fcaa/attachment.html>


More information about the swift-users mailing list