Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Swift Package Manager Support#475

Closed
SlaunchaMan wants to merge 6 commits intoswisspol:masterfrom
SlaunchaMan:swift-package-manager
Closed

Swift Package Manager Support#475
SlaunchaMan wants to merge 6 commits intoswisspol:masterfrom
SlaunchaMan:swift-package-manager

Conversation

@SlaunchaMan
Copy link
Copy Markdown

This PR enables GCDWebServer to be used as a Swift package. It required me to create the GCDWebServer/include directory with an umbrella header and symlinks to all of the public headers, as well as defining a SWIFT_PACKAGE build macro to change the imported paths to be relative to one another. But, using this, I am able to use SPM to import GCDWebServer into a test target and run a server in my Swift package’s tests!

@jccr
Copy link
Copy Markdown

jccr commented Apr 22, 2020

I'm facing issues with this PR when using Xcode 13:

using Swift tools version 5.2.0 but the installed version is 5.1.0

Not sure if this is a real issue moving forward, but not everyone or every CI env has migrated to Xcode 14 yet.

@SlaunchaMan
Copy link
Copy Markdown
Author

@jccr I don’t think I’m using any 5.2-specific features, that’s just the version I used to create Package.swift. If you change 5.2 to 5.1 in the first line of Package.swift, does it build for you? I don’t have an older Xcode on this computer to test with.

@jccr
Copy link
Copy Markdown

jccr commented Apr 23, 2020

@jccr I don’t think I’m using any 5.2-specific features, that’s just the version I used to create Package.swift. If you change 5.2 to 5.1 in the first line of Package.swift, does it build for you? I don’t have an older Xcode on this computer to test with.

Yes. It does work for me if that change is made 👍

@SlaunchaMan
Copy link
Copy Markdown
Author

@jccr I’ve updated the PR to require Swift 5.1 instead.

@noamtamim
Copy link
Copy Markdown

@SlaunchaMan, @jccr how can I test this in my Package.swift?

@SlaunchaMan
Copy link
Copy Markdown
Author

Here’s my Package.swift file: https://github.com/SlaunchaMan/DadJokes/blob/master/Package.swift

@swisspol
Copy link
Copy Markdown
Owner

Thanks for sending this PR: this is a rather large change I don’t feel comfortable merging at this time. GCDWebServer is used by a lot of apps so only small and low-risk change make it these days.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants