Stream: conformance
Topic: Bug in FHIR Package Servers
Patrick Werner (Mar 06 2021 at 14:09):
I reported an Issue with finding packages from Simplifier here: https://chat.fhir.org/#narrow/stream/179177-conformance/topic/packages.20from.20simplifier.20missing
I now found out what actually causes the issue: upper_lowecase String missmatches...
Patrick Werner (Mar 06 2021 at 14:09):
java -jar validator_cli.jar example.json -ig KBV.Basis
doesn't work
Patrick Werner (Mar 06 2021 at 14:10):
java -jar validator_cli.jar Coverage-example.json -ig kbv.basis
works.
Patrick Werner (Mar 06 2021 at 14:14):
fyi: @Grahame Grieve @Ward Weistra
To fix this i suppose:
- enforcing only lowercase letters in Simplifier and other package creating tooling (as stated in the FHIR package spec)
- in the java Validator convert -ig Strings to lowercase before asking the Server
Patrick Werner (Mar 07 2021 at 12:11):
@Alexander Zautke just pointed out, that we can't fix old "illegal" packages. If all tooling applies .toLowerCase()
to the packageID before searching/comparing this shouldn't be an issue.
Ward Weistra (Mar 08 2021 at 11:20):
Yes @Patrick Werner, we should prevent this on creation. We're already enforcing it, I believe, on all places where our tool stack searches for them.
Patrick Werner (Mar 08 2021 at 11:21):
hmm i still can create them. Just added this test package: https://simplifier.net/packages/patricks.sandbox/1.0.0
Ward Weistra (Mar 08 2021 at 11:34):
@Patrick Werner We SHOULD is future :wink: However if you make a dependency on patricks.sandbox
anywhere in Forge/Firely Terminal/Simplifier.net I assume it would resolve fine.
Patrick Werner (Mar 08 2021 at 11:34):
Ahh! Missunderstood, thanks for the explanation :sunglasses:
Ward Weistra (Mar 09 2021 at 09:29):
@Grahame Grieve Until all packages with capitals are weeded out, perhaps the Java stack could also lowercase any package name inputted by the user?
Patrick Werner (Mar 10 2021 at 08:02):
just tested again: The java validator works if you just use the smaller letter representation. But in between package dependencies can brake atm:
java -jar validator_cli.jar Coverage-example.json -ig patricks.sandbox
Terminology server http://tx.fhir.org - Version 1.9.369 (00:01.0973)
Load KBV.Basis#1.1.3Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Unable to find/resolve/read -ig KBV.Basis#1.1.3
at org.hl7.fhir.validation.IgLoader.loadIgSource(IgLoader.java:195)
Patrick Werner (Mar 10 2021 at 08:02):
will see if i can add the toLowerCase
at the correct places today.
Sergej Reiser (Mar 23 2021 at 10:31):
@Patrick Werner have you been able to fix the issue? Since our Package also depends on KBV.Basis we are running into the same Exception with validator_cli.jar 5.3.6.
Patrick Werner (Mar 23 2021 at 13:33):
i hadn't had time to fix it yet.
Ward Weistra (Mar 25 2021 at 09:11):
@Patrick Werner I think this should be solved right now. Lowercase variants like https://packages.simplifier.net/kbv.basis nicely return the right package.
Ward Weistra (Mar 25 2021 at 09:14):
Another tricky thing we noticed is that semver on the other hand are case sensitive (eg. version 0.1.2-Preview
!= 0.1.2-preview
(see https://github.com/semver/semver/issues/176). We're considering whether we should deviate from semver here.
Patrick Werner (Mar 25 2021 at 09:45):
Hey @Ward Weistra thanks for the update!
That's funny, i was wondering the same thing. I personally would like to deviate from semver, but i also think this would be a bad idea.
Patrick Werner (Mar 25 2021 at 09:45):
The FHIR package spec states:
All packages have a mandatory version. [SemVer] 2 SHALL be used
Patrick Werner (Mar 25 2021 at 09:47):
And people have adopted semver already (including the stupid case-sensitive pre-release labels) and i think using semver here was a wise choice.
Julian Sass (Mar 25 2021 at 11:00):
Patrick Werner said:
just tested again: The java validator works if you just use the smaller letter representation. But in between package dependencies can brake atm:
java -jar validator_cli.jar Coverage-example.json -ig patricks.sandbox Terminology server http://tx.fhir.org - Version 1.9.369 (00:01.0973) Load KBV.Basis#1.1.3Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Unable to find/resolve/read -ig KBV.Basis#1.1.3 at org.hl7.fhir.validation.IgLoader.loadIgSource(IgLoader.java:195)
Ah I also ran into this: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Error.20loading.20package.20in.20java.20validator
Just discovered you're discussing this here
Last updated: Apr 12 2022 at 19:14 UTC