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

Add Package.swift for Swift 4.2 #233

Closed
wants to merge 1 commit into from
Closed

Add Package.swift for Swift 4.2 #233

wants to merge 1 commit into from

Conversation

keith
Copy link

@keith keith commented Sep 10, 2018

This allows Stencil to be compiled with Swift 4.2

We should wait for new releases including kylef/PathKit#56 and kylef/Spectre#37

Also once Swift 4.2 is officially released we can add a CI job for it.

This allows Stencil to be compiled with Swift 4.2
@keith
Copy link
Author

keith commented Sep 10, 2018

It would be nice once this was merged if there was a new release with this for upstream libraries

@djbe
Copy link
Contributor

djbe commented Sep 11, 2018

Do we really need a separate package.swift for this? Can't we just add the supported versions to the existing one?

@keith
Copy link
Author

keith commented Sep 11, 2018

The format for supported versions changed from an array of integers to an array of a new set of enum values with the 4.2 compiler.

@keith
Copy link
Author

keith commented Sep 11, 2018

There's a possibility we could use a compiler version check in the Package.swift to set the right type, I can try that path if you'd like

@djbe
Copy link
Contributor

djbe commented Sep 11, 2018

I don't know if all that's necessary.

With the old format, we can only say [4] right? But can you confirm that, as it stands right now, Stencil doesn't work with Swift 4.2? Or is this just to have the nicer syntax with the enums?

@keith
Copy link
Author

keith commented Sep 11, 2018

Right now if a package depends on Stencil, it will build it with the 4.0 mode of the 4.2 compiler. By adding this file and these supported versions, it would build it with the 4.2 mode of the 4.2 compiler. Users can continue to use it in the 4.0 mode successfully, but at some point it makes sense to support 4.2 like this

@djbe
Copy link
Contributor

djbe commented Sep 11, 2018

Right, but we only just added 4.1 support, partially (see #226). I agree that, when we migrate to 4.2 (if there's anything to migrate), we should update our podspec and Package.swift to reflect this.

For now, I think this is too early.

@keith keith closed this Sep 11, 2018
@keith keith deleted the ks/swift-4.2 branch September 11, 2018 21:48
@keith keith restored the ks/swift-4.2 branch September 11, 2018 21:48
@djbe
Copy link
Contributor

djbe commented Sep 11, 2018

Whoa, I wouldn't close it, let's keep it for when we're ready. I'm pretty sure that once we figure #226 out, we can do the 4.2 migration.

(I'm not able to reopen this)

@keith
Copy link
Author

keith commented Sep 11, 2018

Ah, I thought you meant longer term. I deleted my fork which is why you can't reopen

@djbe
Copy link
Contributor

djbe commented Sep 11, 2018

Going through #226 again, I'm pretty sure that full Swift 4.1 migration is going to take a while...

Well when we do the migration we'll base the package.swift on this one.

@djbe djbe added this to the 0.13.0 milestone Sep 21, 2018
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

Successfully merging this pull request may close these issues.

2 participants