smart-on-fhir/Swift-FHIR

versioning errors when using swift-fhir as a package.swift dependency

scheid opened this issue · 2 comments

I am using swift-fhir in IBM Bluemix which runs swift on Ubuntu. In my package.swift file, I am specifying the swift fhir dependency for my app like this:

.Package(url: "https://github.com/smart-on-fhir/Swift-FHIR.git", majorVersion: 2, minor: 9)

Then, during the build phase, while trying to clone the swift fhir repository, I get this error:

swift-build: error: The dependency graph could not be satisfied. The package (https://github.com/smart-on-fhir/Swift-FHIR.git) with version tag in range (2.9.0..<2.9.9223372036854775807) is not found. Found tags ([2.2.1, 2.2.2, 2.2.3, 2.2.4])

If I instead change the swift fhir dependency to this:

.Package(url: "https://github.com/smart-on-fhir/Swift-FHIR.git", versions: Version(2, 0, 0)..<Version(2, 9, 0) )

then it will resolve, but only to version 2.2.4

Any ideas? Is there a more correct way to specify the version(s) for swift-fhir ?

Thanks.

p2 commented

I have not had the pleasure to actually use Swift Package Manager for dependency resolving, and it looks like it requires strict semver tags. I've added all missing tags (2.9.0 instead of 2.9 and similar) and have also tagged 2.8.1 and 2.9.1 because only these will compile on Linux. Does it work?

Yes, thank you, it works now. When I specify:

.Package(url: "https://github.com/smart-on-fhir/Swift-FHIR.git", majorVersion: 2, minor: 9)

now it resolves to version 2.9.1.