#JWT 5 Requires Swift 6?

1 messages · Page 1 of 1 (latest)

peak flame
#

I was trying to update my Vapor packages and JWT fails due to:

error: Dependencies could not be resolved because root depends on 'jwt' 5.0.0-beta.4..<6.0.0.
'jwt' >= 5.0.0-beta.4 cannot be used because 'jwt' >= 5.0.0 contains incompatible tools version (6.0.0) and no versions of 'jwt' match the requirement 5.0.0-beta.4..<5.0.0.

Right now I'm running Xcode 15.4 with swift 5.10 and my app's package specifies 5.0.0-beta.4. Looks like I cannot upgrade to the latest unless I run Xcode 16? Is this correct?

strange jay
#

this is correct

vagrant token
#

Yes.

peak flame
#

🙏🏻 Thank you

weak phoenix
#

It requires the Swift 6 compiler.
You can update your package to Swift 6 in Package.swift but mark all targets with a swiftSettings containing .languageMode(.v5)

strange jay
#

Well, the question was whether it needs Xcode 16, which is the standard way to get a Swift 6 compiler 🙂

weak phoenix
#

o right

#

not sure if downloading toolchains can help

#

but again i might have not been too much off the mark

#

because i don't see why one can install Xcode 15.4

#

<that came too soon>

#

but not Xcode 16.

peak flame
#

Hello again! Been spending an hour or so upgrading everything. While it runs fine locally, I have some trouble with some code @vagrant token graciously shared with me a while ago. The error looks like:

209.1 /build/Sources/App/Private/Extensions/URL+LinuxOnlyPolyfill.swift .swift:68:75: error: ambiguous type name 'DirectoryHint' in 'URL'

I suppose I need updated polyfills? Or is this obsolete now?

peak flame
#

I went YOLO and commented the entire file. Compiles fine, deployed to docker successfully and all integration tests have passed. Woohoo! 🎉

dense juniper
#

Yeah URL stuff should now be the same across all platforms