JSONFeed icon indicating copy to clipboard operation
JSONFeed copied to clipboard

Having trouble setting up SPM

Open perryprog opened this issue 8 years ago • 5 comments

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.

perryprog avatar May 28 '17 17:05 perryprog

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 avatar Jun 01 '17 05:06 totocaster

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.

totocaster avatar Jun 01 '17 06:06 totocaster

@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.

perryprog avatar Jun 01 '17 10:06 perryprog

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.

totocaster avatar Jun 01 '17 10:06 totocaster

Awesome!

perryprog avatar Jun 01 '17 11:06 perryprog