Stream: IG creation
Topic: Unable to add US Core dependency in new template
Nagesh Bashyam (Nov 06 2019 at 16:47):
@Grahame Grieve
I am trying to add IG dependency for US core and i get it to work in the old templates but not in the new template.
The dependency looks like : ( I have tried 3.1.0, 3.0.1 etc) I am dependent on FHIR Core 4.0.1
<uri value="http://hl7.org/fhir/us/core"/> <packageId value="hl7.fhir.us.core"/> <version value="3.1.0"/>
</dependsOn>
The error that i get is :
Connect to Terminology Server at http://tx.fhir.org (01:40.0500)
Dependency has no id, so can't be referred to in markdown in the IG (01:41.0424)
Publishing Content Failed: Unable to understand IG url: http://hl7.org/fhir/us/core (01:41.0425)
(01:41.0425)
Use -? to get command line help (01:41.0426)
(01:41.0426)
Stack Dump (for debugging): (01:41.0426)
org.hl7.fhir.exceptions.FHIRException: Unable to understand IG url: http://hl7.org/fhir/us/core
at org.hl7.fhir.igtools.publisher.Publisher.determineCanonical(Publisher.java:1487)
at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:2140)
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1422)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1121)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:612)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6537)
Nagesh Bashyam (Nov 06 2019 at 16:47):
Any thoughts on what may be going wrong ?
Eric Haas (Nov 06 2019 at 17:14):
{ "location": "http://hl7.org/fhir/us/core", "version": "3.1.0", "name": "uscore", "package": "hl7.fhir.us.core" }
works for me
Eric Haas (Nov 06 2019 at 18:05):
that is my ig config file
here is the ig resource....
Eric Haas (Nov 06 2019 at 18:51):
<dependsOn> <!-- 0..* Another Implementation guide this depends on --> <uri value="http://hl7.org/fhir/us/core/ImplementationGuide/hl7.fhir.us.core"> <!-- 1..1 canonical(ImplementationGuide) Identity of the IG that this depends on --> </uri> <packageId value="hl7.fhir.us.core"/> <!-- 0..1 NPM Package name for IG this depends on --> <version value="3.1.0"/><!-- 0..1 Version of the IG --> </dependsOn>
Eric Haas (Nov 06 2019 at 18:52):
I have not tested that though...
Nagesh Bashyam (Nov 06 2019 at 20:33):
That helped a little but got a new error..
Dependency has no id, so can't be referred to in markdown in the IG (01:25.0977)
Publishing Content Failed: null (01:26.0071)
(01:26.0071)
Use -? to get command line help (01:26.0071)
(01:26.0072)
Stack Dump (for debugging): (01:26.0072)
java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:2168)
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1422)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1121)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:612)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6537)
Eric Haas (Nov 06 2019 at 21:03):
I am getting it to work but is referencing the wrong version of US Core and renders it incorrectly... some of that is due to standard template which I am still working through.
Eric Haas (Nov 06 2019 at 21:12):
using the non templates (old) way works just fine for me.
Nagesh Bashyam (Nov 06 2019 at 21:35):
Yes ...it works with the old template ..but does not work with the new template
Nagesh Bashyam (Nov 06 2019 at 21:38):
THis is how my dependency looks now, the publisher is loading the version of US Core but fails after that with the IgLoad Null pointer exception.
So it is better from that standpoint but still does not work well.
<dependsOn>
<uri value="http://hl7.org/fhir/us/core/ImplementationGuide/hl7.fhir.us.core"/>
<packageId value="hl7.fhir.us.core"/>
<version value="3.1.0"/>
</dependsOn>
Grahame Grieve (Nov 06 2019 at 22:48):
can I reproduce this?
Nagesh Bashyam (Nov 07 2019 at 09:18):
Yes,
It is checked in at https://github.com/HL7/davinci-atr
Nagesh Bashyam (Nov 07 2019 at 09:18):
Let me know if you need anything else.
Grahame Grieve (Nov 08 2019 at 04:15):
fixed next release
Nagesh Bashyam (Nov 12 2019 at 20:31):
@Grahame Grieve , I tried with the latest publisher and I get the following exception after everything is fixed. The original problem is fixed but this new one appears. Is this supposed to happen ?
Installing hl7.fhir.us.davinci-atr#dev to the package cache
Fetching:|
Analysing done.
Publishing Content Failed: null (01:11.0010)
(01:11.0010)
Use -? to get command line help (01:11.0010)
(01:11.0010)
Stack Dump (for debugging): (01:11.0010)
java.lang.NullPointerException
at org.hl7.fhir.utilities.cache.PackageCacheManager.addPackageToCache(PackageCacheManager.java:569)
at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4045)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:772)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:649)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6593)
Grahame Grieve (Nov 12 2019 at 20:31):
can I reproduce this?
Nagesh Bashyam (Nov 12 2019 at 20:36):
3:36 PM
The .index.json has this weird character at the begining
<U+FEFF>
That makes the JSON invalid
Nagesh Bashyam (Nov 12 2019 at 20:37):
The .index.json in the .fhir/packages/..../.index.json is the one that has this problem
Grahame Grieve (Nov 12 2019 at 20:37):
ah thank you. Weird. And I hate Java.
Vassil Peytchev (Nov 12 2019 at 20:37):
That's a UTF byte order mark. Totally unnecessary for UTF-8
Nagesh Bashyam (Nov 12 2019 at 20:37):
Should i just delete that for now...and try it out ...
Nagesh Bashyam (Nov 12 2019 at 20:37):
looks like it
Grahame Grieve (Nov 12 2019 at 20:38):
@Vassil Peytchev The question is why some people are tripped over by some IGs and I never am when Java inserts the byte order mark when I never get it
Grahame Grieve (Nov 12 2019 at 20:38):
bet you can't delete it though. it's generated in process
Nagesh Bashyam (Nov 12 2019 at 20:45):
Removed and verified but it gets re-generated, so assume it has to be a code fix.
Removing BOM from a file on MAC/Linux , this is what i used.
vi .index.json
:set nobomb
:wq
Nagesh Bashyam (Nov 12 2019 at 20:48):
You should be able to reproduce by ..on linux/Mac using
https://github.com/HL7/davinci-atr project
Vassil Peytchev (Nov 12 2019 at 20:58):
In this particular case, is the difference between Windows and Mac/Linux? Or Java versions? Oracle JDK vs OpenJDK?
Grahame Grieve (Nov 12 2019 at 20:58):
I have no idea. That's why I hate Java.
Nagesh Bashyam (Nov 12 2019 at 21:16):
Not sure, have not tried on Windows and the different JDKs.
Grahame Grieve (Nov 12 2019 at 21:17):
ok I got a new release of IGPublisher out - can you update and try again please
Grahame Grieve (Nov 12 2019 at 21:51):
not enough. but now I've got to the bottom of this.
Nagesh Bashyam (Nov 12 2019 at 22:23):
Tried it , but something else now. It is not able to find xml.xsd from the build.fhir.org site. Dont know if that exists or was removed.
onLoad.r5-schemas:
[get] Getting: http://build.fhir.org/fhir-single.xsd
[get] To: /Users/nbashyam/git/davinci-atr/input-cache/schemas-r5/fhir-single.xsd
[get] Not modified - so not downloaded
[get] Getting: http://build.fhir.org/fhir-xhtml.xsd
[get] To: /Users/nbashyam/git/davinci-atr/input-cache/schemas-r5/fhir-xhtml.xsd
[get] Not modified - so not downloaded
[get] Getting: http://build.fhir.org/xml.xsd
[get] To: /Users/nbashyam/git/davinci-atr/input-cache/schemas-r5/xml.xsd
[get] Error opening connection java.io.FileNotFoundException: http://build.fhir.org/xml.xsd
[get] Error opening connection java.io.FileNotFoundException: http://build.fhir.org/xml.xsd
[get] Error opening connection java.io.FileNotFoundException: http://build.fhir.org/xml.xsd
[get] Can't get http://build.fhir.org/xml.xsd to /Users/nbashyam/git/davinci-atr/input-cache/schemas-r5/xml.xsd
Publishing Content Failed: Can't get http://build.fhir.org/xml.xsd to /Users/nbashyam/git/davinci-atr/input-cache/schemas-r5/xml.xsd (00:05.0657)
(00:05.0658)
Use -? to get command line help (00:05.0658)
(00:05.0658)
Stack Dump (for debugging): (00:05.0659)
/Users/nbashyam/git/davinci-atr/template/scripts/ant.xml:19: Can't get http://build.fhir.org/xml.xsd to /Users/nbashyam/git/davinci-atr/input-cache/schemas-r5/xml.xsd
at org.apache.tools.ant.taskdefs.Get$GetThread.downloadFile(Get.java:843)
at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:682)
at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:666)
Nagesh Bashyam (Nov 12 2019 at 22:25):
That was not happening with the previous version ...no other changes in the project.
Nagesh Bashyam (Nov 12 2019 at 22:31):
The file is part of the fhir-all-xsd.zip but is not available as an individual file download but the template tries to download it as part of the build
Nagesh Bashyam (Nov 12 2019 at 22:55):
@Grahame Grieve - Any thoughts on how to overcome this issue..I am using the new template
It can be reproduced by https://github.com/HL7/davinci-atr
Grahame Grieve (Nov 12 2019 at 23:13):
@Lloyd McKenzie this is a template problem
Grahame Grieve (Nov 12 2019 at 23:13):
as in, the template is accessing xml.xsd. Which, as I have said before, is not a value proposition for anyone
Grahame Grieve (Nov 12 2019 at 23:17):
@Josh Mandel this is a problem with the build infrastructure. it seems as though we have lost all files on build.fhir.org where the name starts with "v" or subsequent letters
Grahame Grieve (Nov 12 2019 at 23:19):
but @Lloyd McKenzie if you really insist on mucking around with xsds you should just include them in the tmplate
Josh Mandel (Nov 12 2019 at 23:31):
Hmmm, did these files disappear from the CI build of master, or everywhere?
Josh Mandel (Nov 12 2019 at 23:33):
Other recent branches like http://build.fhir.org/branches/Consent-performer-function/valueset appear intact.
Josh Mandel (Nov 12 2019 at 23:33):
Is the issue on master persisting across builds? (I'm not somewhere that I can debug at the moment.)
Grahame Grieve (Nov 12 2019 at 23:34):
doing a rebuild now to find out
Josh Mandel (Nov 12 2019 at 23:34):
Okay (I was just about to do the same)
Josh Mandel (Nov 12 2019 at 23:34):
Thanks
Josh Mandel (Nov 12 2019 at 23:35):
Obviously this shouldn't be allowed to occur; we try to only swap the result of a build into the public build site once it has been completely and successfully uploaded.
Grahame Grieve (Nov 12 2019 at 23:38):
can upload fail silently?
Lloyd McKenzie (Nov 13 2019 at 00:06):
I can include the xml template in the IG I suppose, but the others change
from time to time - and I don't necessarily know when/if that has happened
in order to update the template. I'd therefore prefer to continue to pull
them down from source. (And if we get to the point where JSON editors
could use the templates, I'll start pulling those down too.) Anyone who's
hand-editing XML or JSON absolutely ought to be using the schemas if they
can. (And hand-editing is still an unfortunate part of life for many
resources.)
Josh Mandel (Nov 13 2019 at 00:07):
Well, the &&
in https://github.com/FHIR/auto-ig-builder/blob/master/images/ci-build/publish#L18 is supposed to prevent that -- in other words, if the tgz extraction fails, the publish script should fail (given set -e
, which causes exit on failure).
Josh Mandel (Nov 13 2019 at 00:08):
But obviously something is wrong with my assessment :)
Josh Mandel (Nov 13 2019 at 03:58):
Still broken, so likely a systematic issue. How many files are generated in the fhir build output file these days?
Grahame Grieve (Nov 13 2019 at 04:04):
we haven't had a successful build since then. I think this PR is going to be ok....
Grahame Grieve (Nov 13 2019 at 04:29):
ok it worked, and we're all good again.
Grahame Grieve (Nov 13 2019 at 04:29):
@Nagesh Bashyam you can try again
Josh Mandel (Nov 13 2019 at 04:39):
Ah, ok -- thought you were triggering a rebuild earlier. Glad it's working now, but I'm not yet sure what happened.
Grahame Grieve (Nov 13 2019 at 04:47):
it took me that long to get a successful build
Nagesh Bashyam (Nov 13 2019 at 08:00):
@Grahame Grieve , It is all good now. The builds are successful. Thank you very much.
Last updated: Apr 12 2022 at 19:14 UTC