Stream: IG creation
Topic: IG Dependency on Argonaut
Chris Moesel (Oct 29 2018 at 14:21):
I'm working on a FHIR 1.0.2 -based IG that has a dependency on Argonaut Data Query. I have this in the control file:
"dependencyList": [ { "name": "argonaut", "location": "https://www.fhir.org/guides/argonaut/r2", "source": "argonaut", "version": "1.0.0" } ]
and the IG publisher spits out this error:
Fetch Package history from https://www.fhir.org/guides/argonaut/r2/package-list.json Publishing Content Failed: https://www.fhir.org/guides/argonaut/r2/package-list.json (10.0922sec) (10.0922sec) Use -? to get command line help (10.0922sec) (10.0922sec) Stack Dump (for debugging): (10.0922sec) java.io.FileNotFoundException: https://www.fhir.org/guides/argonaut/r2/package-list.json at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) at org.hl7.fhir.igtools.publisher.Publisher.fetchJson(Publisher.java:1545) at org.hl7.fhir.igtools.publisher.Publisher.resolveDependency(Publisher.java:1529) at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:1456) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1111) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:507) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4895) Exception in thread "main" java.lang.NullPointerException at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4905)
Chris Moesel (Oct 29 2018 at 14:26):
I tried it without the /r2
, but that basically had the same result. I also downloaded the validator.pack
and put it in a local folder argonaut
(to match the source
value in the control file).
Chris Moesel (Oct 29 2018 at 14:27):
Anyone know how to properly indicate Argonaut Data Query as an IG dependency?
Chris Moesel (Nov 01 2018 at 03:05):
So, does no response mean that no one else has tried to do this? I'm trying to understand if this is a bug, a limitation, or if I'm just doing it the wrong way...
Bryn Rhodes (Nov 01 2018 at 15:49):
My understanding is that is the correct way to do it, but because the package-list.json artifact was added after the Argonaut IG was published, it doesn't have that piece. You should be able to get around it by building the Argonaut guide locally and specifying dev in your dependency to it (so that it resolves in your local package cache). That's how I did this with QI-Core before it had a package-list.json file.
Chris Moesel (Nov 01 2018 at 16:01):
@Bryn Rhodes -- thanks for the information. It makes sense. It's too bad though... I'm trying to build a toolchain that makes this super simple for IG authors, but this extra step of having to build the Argonaut IG locally first kind of messes that up. (sigh).
Grahame Grieve (Nov 09 2018 at 04:40):
@Chris Moesel I'm catching up on things (always in that state, I guess). THe problem is that we don't have a package server... that's coming... in the meantime, I have a bunch of hacks in place, and I guess you've found a hole in my hacks
Grahame Grieve (Nov 09 2018 at 04:41):
is this something I can reproduce?
Chris Moesel (Nov 13 2018 at 18:19):
Thanks for the response, @Grahame Grieve. You should be able to reproduce it by simply trying to add the argonaut IG to the dependencyList
in any ig.json. If you're asking for a specific source repository to reproduce it, however, I don't have anything public right now. I could probably put something simple together and attach here as a zip if you think that would be helpful. Let me know.
Chris Moesel (Nov 16 2018 at 22:14):
@Grahame Grieve -- I've pushed a branch that adds the argonaut dependency to the FHIR test IG for DSTU2. The branch is called cmoesel_argonaut_dependency_example
. You can see the diff here: https://github.com/HL7/fhir/compare/cmoesel_argonaut_dependency_example
If you run the publisher against the tests/ig10
IG, you'll get a crash:
Fetch Package history from https://www.fhir.org/guides/argonaut/r2/package-list.json Publishing Content Failed: https://www.fhir.org/guides/argonaut/r2/package-list.json?nocache=1542406170409 (10.0164sec) (10.0164sec) Use -? to get command line help (10.0164sec) (10.0164sec) Stack Dump (for debugging): (10.0164sec) java.io.FileNotFoundException: https://www.fhir.org/guides/argonaut/r2/package-list.json?nocache=1542406170409 at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) at org.hl7.fhir.igtools.publisher.Publisher.fetchJson(Publisher.java:1606) at org.hl7.fhir.igtools.publisher.Publisher.resolveDependency(Publisher.java:1590) at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:1517) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:1138) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:944) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:523) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4925) Exception in thread "main" java.lang.NullPointerException at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4935)
Chris Moesel (Apr 09 2019 at 06:17):
This is still an issue for the mCODE IG which is based on Argonaut. Since we cannot register Argonaut as a dependency, all of the links to Argonaut value sets, extensions, and profiles are broken in our IG. Is there any workaround to get it to be able to properly resolve those links?
NOTE: I also updated the branch I reference above -- to rebase it on the latest code and fixed the Argonaut canonical URL from https://www.fhir.org/guides/argonaut/r2
to https://www.fhir.org/guides/argonaut
.
Chris Moesel (Apr 16 2019 at 17:14):
There is now a package-list.json at http://www.fhir.org/guides/argonaut/r2/package-list.json -- so I can get further with this config:
"dependencyList": [ { "name": "argonaut", "location": "http://fhir.org/guides/argonaut/r2", "version": "1.0.0" } ]
But... Now I'm getting this error: Attempt to import a mis-identified package. Expected fhir.argonaut.r2, got fhir.argonaut.ehr.
Fetch Package history from http://fhir.org/guides/argonaut/r2/package-list.json Fetch fhir.argonaut.r2-1.0.0 package from http://fhir.org/guides/argonaut/r2/1.0/package.tgz (10.0217sec) Installing fhir.argonaut.r2#1.0.0 to the package cache Fetching:...|Publishing Content Failed: Attempt to import a mis-identified package. Expected fhir.argonaut.r2, got fhir.argonaut.ehr (11.0132sec) (11.0132sec) Use -? to get command line help (11.0132sec) (11.0132sec) Stack Dump (for debugging): (11.0133sec) java.io.IOException: Attempt to import a mis-identified package. Expected fhir.argonaut.r2, got fhir.argonaut.ehr at org.hl7.fhir.utilities.cache.PackageCacheManager.addPackageToCache(PackageCacheManager.java:361) at org.hl7.fhir.igtools.publisher.Publisher.resolveDependency(Publisher.java:1666) at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:1580) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:1198) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:984) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:555) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:5172) Exception in thread "main" java.lang.NullPointerException at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:5182)
Chris Moesel (Apr 18 2019 at 17:00):
@Grahame Grieve, @Eric Haas -- are you aware of this issue? Is there an easy fix? (See my last comment for the most recent update on it).
Grahame Grieve (May 04 2019 at 09:52):
should be fixed now
Chris Moesel (May 04 2019 at 15:04):
Thank you-- I'll give it a shot!
Chris Moesel (May 06 2019 at 15:49):
(deleted)
Chris Moesel (May 06 2019 at 15:51):
So after some trial and error, I ended up declaring the dependency on Argonaut like this:
"dependencyList": [ { "name": "argonaut", "location": "http://fhir.org/guides/argonaut/r2", "version": "1.0.0" } ]
This gets me further than ever before, but now I'm getting this error instead:
Fetch Package history from http://fhir.org/guides/argonaut/r2/package-list.json Fetch fhir.argonaut.r2-1.0.0 package from http://fhir.org/guides/argonaut/r2/1.0/package.tgz (46.0535sec) Installing fhir.argonaut.r2#1.0.0 to the package cache Fetching:...| Analysing.. done. Load argonaut (http://fhir.org/guides/argonaut/r2) from null#1.0.0 (49.0972sec) Publishing Content Failed: Unable to find the file other/spec.internals in the package fhir.argonaut.r2 (49.0972sec) (49.0972sec) Use -? to get command line help (49.0972sec) (49.0973sec) Stack Dump (for debugging): (49.0973sec) java.io.IOException: Unable to find the file other/spec.internals in the package fhir.argonaut.r2 at org.hl7.fhir.utilities.cache.NpmPackage.load(NpmPackage.java:252) at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:2106) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:1611) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1078) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:591) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:5678) Exception in thread "main" java.lang.NullPointerException at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:5688)
Grahame Grieve (May 06 2019 at 15:53):
hmm
Grahame Grieve (May 06 2019 at 15:53):
you shouldn't need location - what happens if you don't have that?
Grahame Grieve (May 06 2019 at 16:08):
I should have fixed the actual error now, but you will have to blow your package cache since the error is in the cache material
Chris Moesel (May 06 2019 at 16:22):
Thanks, @Grahame Grieve. I've deleted my cache (both $USER/.fhir
and txCache
just to be sure), but still running into the same issue above. I've also tried deleting the location
from the config, but them I get the following stack trace:
exception generating new IG java.lang.NullPointerException at org.hl7.fhir.utilities.cache.PackageCacheManager.getPackageId(PackageCacheManager.java:273) at org.hl7.fhir.igtools.publisher.ConfigFileConverter.convert(ConfigFileConverter.java:205) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:1554) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1078) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:591) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:5678)
Chris Moesel (May 06 2019 at 16:23):
And to be clear, with the location
back in the config, I'm getting the other stack trace (java.io.IOException: Unable to find the file other/spec.internals in the package fhir.argonaut.r2
).
Chris Moesel (May 06 2019 at 16:26):
In case it helps, I'll create a branch on fhir-ig-publisher
and update the ig10
test to demonstrate the problem.
Chris Moesel (May 06 2019 at 18:16):
OK, @Grahame Grieve -- I've forked the fhir-ig-publisher, created a branch w/ a new (failing) test case for depending on argo, and issued it as a PR (just to make it easy to find). You can find the PR here: https://github.com/HL7/fhir-ig-publisher/pull/3
Last updated: Apr 12 2022 at 19:14 UTC