jmespath.swift
jmespath.swift copied to clipboard
Doesn't compile under Linux
I'm getting
/build/.build/checkouts/jmespath.swift/Sources/JMESPath/Variable.swift:118:96: error: type 'JSONSerialization.WritingOptions' has no member 'fragmentsAllowed'
guard let jsonData = try? JSONSerialization.data(withJSONObject: array, options: [.fragmentsAllowed]) else {
What version of swift are you compiling with?
The CI says swift 5.2 - 5.5 are all compiling fine
I'm compiling with 5.2 - I'm sure it works under MacOS but Linux doesn't seem to have quite the same version of swift (yet).
GitHub CI says swift:5.2 docker image works and I tested it locally as well. What is the output of swift --version
I am getting the same issue with Vapor docker images, specifically vapor/swift:5.2
.
Ok swift:5.2
work fine but vapor/swift:5.2
doesn't. I'm guessing .fragmentsAllowed
appeared in a patch release of swift 5.2 and it never managed to make it into the vapor images. I'll ask on the Vapor discord.
The vapor swift docker images are no longer maintained. You should be able to use the swift:5.2
image instead of vapor/swift:5.2
. Unless @proggeramlug says he is using another docker image in the next couple of days I am closing this
I had no idea the Vapor Swift Docker images are not maintained, their documentation still recommends you use vapor/swift:5.2
.
I switched to using the latest official Swift image, swift:5.5.1
, and that fixed the issue.
Thanks for the very quick replies @adam-fowler ! 👏
@CLoutas Thanks for the heads-up about the docs, I'll take care of updating that right now!
No worries, thanks for looking into this, great to see that we got to the bottom of it so quickly! 👍