vapor-community / leaf-provider

Add leaf templating into your vapor app
7 stars 9 forks source link

Needs Updated Package.swift for Swift 4 #8

Open rmecham opened 7 years ago

rmecham commented 7 years ago

I had a go at updating one of my project’s Package.swift file to the new swift-tools-version:4.0 format. Whenever I did so, however, I ran into this error:

Sources/App/Config+Setup.swift:1:8: error: no such module 'LeafProvider'
import LeafProvider
       ^

I’m not certain, but I suspect the problem arose due to the lack of a Swift 4-style Package.swift file. As soon as I reverted back to the Swift 3-style Package.swift, the project compiled without difficulty.

I’ve noticed that several other Vapor repositories have a Package@swift-4.swift file. Perhaps we just need to add one for this repository as well?

0xTim commented 7 years ago

@rmecham it should still work - are you adding it as a dependency to the App target? See https://github.com/brokenhandsio/SteamPressExample/blob/master/Package.swift#L24 for an example

0xTim commented 7 years ago

Though it does need an updated Package.swift

0xTim commented 7 years ago

@tanner0101 is Leaf 3 waiting on Vapor 3 now or will it be released before? If it's going to be a while I'll get a Swift 4 manifest done for both Leaf and the Provider

tanner0101 commented 7 years ago

@0xTim yes, it makes a couple of breaking api changes so we figured best to release it w/ 3. it's also been updated further with lazy/async on the vapor/vapor:beta branch. the vapor/leaf:beta branch is outdated. we should just update the leaf master branch w/ a new @swift4 manifest.

emilpedersen commented 5 years ago

Could you add a Package@swift-4.swift? I need to change Command Line Tools and change swift version in Xcode on leaf and leaf-provider from swift 3 to swift 4 every time I vapor update. :) Would not be necessary if there was a Package@swift-4.swift like in the https://github.com/vapor/auth-provider.git

:)

0xTim commented 5 years ago

@emilpedersen is this for a Vapor 2 project?

emilpedersen commented 5 years ago

Yes, do not have time to convert it to Vapor 3 before next year :) All the other packages are working without change in Xcode 11 but leaf I have to change from Swift 3 to 4 to get it running.

0xTim commented 5 years ago

If you could do a PR that would be massively helpful, I'm not sure when I'll be able to get around to adding one