Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Package.swift for Swift Package Manager support #47

Merged
merged 1 commit into from
Feb 26, 2016

Conversation

mluisbrown
Copy link
Contributor

Tested using swift build from the latest development drop of Swift.

@dmcrodrigues
Copy link
Member

Build ✅

@dmcrodrigues
Copy link
Member

Closes #46.

dmcrodrigues added a commit that referenced this pull request Feb 26, 2016
Added Package.swift for Swift Package Manager support
@dmcrodrigues dmcrodrigues merged commit 976707e into Velhotes:master Feb 26, 2016
@RuiAAPeres
Copy link
Member

Not sure if this is still up to date but:

You will need to make sure your .Swift files are in a Sources folder.

All the packages here follow that.

@dmcrodrigues
Copy link
Member

I'm not sure if that is still required.

It is acceptable to have no Sources directory, in which case the root directory is treated as a single module (place your sources there) or sub directories of the root are considered modules.
Reference: Source Layouts

Maybe we should run some tests to be sure.

@RuiAAPeres
Copy link
Member

I think we should go with Source to be sure:

(...)or sub directories of the root are considered modules.

In our case it would work.

@mluisbrown
Copy link
Contributor Author

I tested it with the layout we have now and it works. swift build in the root creates .build/debug/Vinyl.swiftmodule. .swiftmodule files can be imported into other projects. I had to add an exclude section in Package.swift so that VinylTests and Carthage folders are ignored.

@RuiAAPeres
Copy link
Member

@mluisbrown y good job.

@mluisbrown
Copy link
Contributor Author

Also, see this thread on swift-users mailing list. Confirms that .swiftmodule output is all you need to import module into a client package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants