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

Having trouble setting up SPM #3

Open
perryprog opened this issue May 28, 2017 · 5 comments
Open

Having trouble setting up SPM #3

perryprog opened this issue May 28, 2017 · 5 comments

Comments

@perryprog
Copy link

I'm trying to get SPM to work, and I'm worried that we might need to change the file layout.

If you look at any project that supports SPM, they all have the typical Swift package layout, while this project has the Xcode framework layout.

I think we should either make a new repo, build on SPM, and the Swift package layout
(this thing)

├── Package.swift
├── Sources
│   └── hellothere.swift
└── Tests
    ├── LinuxMain.swift
    └── hellothereTests
        └── hellothereTests.swift

Or, we could just make a fork (or something similar, idk) that completely overwrites everything we had. Or, just not support SPM. (I don't think we should do that however)

Using my second option we can easily support Linux, all platforms, Carthage and Coccapods, and have a simpler directory format. Obliviously this is completely up to you, as you wrote all the code.

@totocaster
Copy link
Owner

Hey @perryprog, there is a reason it's pre-1.0 so we can make source and structure breaking changes. I'm not super familiar with SPM, but I'll have a look this weekend. Feel free to branch/PR with any changes you think are reasonable and necessary SPM to work. Thanks!

@totocaster
Copy link
Owner

I've pushed spm branch with all the folders and files restructured to match SPM requirements, but I still get this:

error: the package has an unsupported layout, unexpected source file(s) found:...
fix: move the file(s) inside a module

I'm not sure where the issue is, though.

@perryprog
Copy link
Author

@totocaster hmm, I'm not sure. I'll check it out this weekend, then I'll just do swift init and all that stuff by hand, then copy over the source files.

@totocaster
Copy link
Owner

totocaster commented Jun 1, 2017

Progress, I flattened folder and it worked since SPM treats subfolders as submodules. Live and learn. 😄

Now I have different kind of error when building/testing. I'll tackle it on weekend too.

@perryprog
Copy link
Author

Awesome!

Repository owner locked and limited conversation to collaborators Feb 3, 2019
Repository owner unlocked this conversation Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants