Stream: shorthand
Topic: IG file not being created
Jean Duteau (Dec 01 2020 at 19:43):
Hmm, I'm setting up a new FHIR IG repository and I am getting an error where the ImplementationGuide file says it's being created but it actually isn't which causes the IG publisher to fail. Here is the sushi messages I'm getting:
info Assembling Implementation Guide sources...
info Generated ImplementationGuide-hl7.fhir.spl.json
info Assembled Implementation Guide sources; ready for IG Publisher.
But there is no file and the IG Publisher rightfully tells me so:
Publishing Content Failed: Error Parsing File /Users/jeanduteau/Documents/DDIWork/Samvit/FDA-SPL/fhir-spl/input/ImplementationGuide-hl7.fhir.spl.json: /Users/jeanduteau/Documents/DDIWork/Samvit/FDA-SPL/fhir-spl/input/ImplementationGuide-hl7.fhir.spl.json (No such file or directory) (00:01.0760)
I'm not sure what I'm doing wrong here.
Jose Costa Teixeira (Dec 01 2020 at 20:36):
is your implementationguide .json being created in fsh-generated/resources by any chance?
Jose Costa Teixeira (Dec 01 2020 at 20:38):
(it should be in input/ instead)
Elliot Silver (Dec 01 2020 at 20:45):
Isn't implementationguide.json created based on the sushi-config.yaml file?
Jose Costa Teixeira (Dec 01 2020 at 20:48):
Yes. Today I noticed in one IG that the json was created in fsh-generated/resources, and I did not want it there. That could explain @Jean Duteau 's issue
Elliot Silver (Dec 01 2020 at 20:52):
I also noticed you needed to have an ignoreWarnings file in input/ even if you don't have any warnings you want to ignore.
Jean Duteau (Dec 01 2020 at 21:00):
I looked in fsh-generated just in case and it's not there. SUSHI says it is creating it but it's nowhere in my repository.
Jean Duteau (Dec 01 2020 at 21:02):
ah, actually it is there! I missed it the first time I looked
Jean Duteau (Dec 01 2020 at 21:02):
I have a feeling that it should not be created there....
Jean Duteau (Dec 01 2020 at 21:07):
maybe it is okay being there, but then I need to change my ig.ini to point to fsh-generated/resources
Jose Costa Teixeira (Dec 01 2020 at 21:25):
@Chris Moesel this wasn't discussed but I think the IG json should be created in input - thoughts?
Chris Moesel (Dec 01 2020 at 21:31):
@Lloyd McKenzie felt pretty strongly that _all_ generated content should be in a generated folder -- and I think I agree with him. Since we generate the IG JSON, I don't think it should go in input
. The IG Publisher does just fine w/ the IG in fsh-generated/resources
as long as the ig.ini
correctly points to it. That said, I could probably be convinced to put it at the root of fsh-generated
instead, but that might require further changes to the base template?
Elliot Silver (Dec 01 2020 at 21:35):
Jean Duteau said:
maybe it is okay being there, but then I need to change my ig.ini to point to fsh-generated/resources
I recall that issue now... I think Chris or Mark was going to update the fish 0.x -> 1.0 migration instructions. I wonder if the "project structure" documentation was updated as well.
Jose Costa Teixeira (Dec 01 2020 at 21:38):
At least I did not anticipate that _all_ included the ig.json.. :)
Jose Costa Teixeira (Dec 01 2020 at 21:42):
I guess one condition to keep it in the fsh-generated
folder is that the ig.ini must be updated/generated too
Jose Costa Teixeira (Dec 01 2020 at 21:44):
@Chris Moesel when you say the publisher does fine - does that include BYOx? I presume so but would be good to test
Chris Moesel (Dec 01 2020 at 21:51):
@Elliot Silver -- the migration instructions were updated. See the end of the warning in step 4: https://fshschool.org/docs/sushi/migration/#4---run-sushi-and-follow-instructions
I don't think we updated the project structure documentation. We could, but if the author is following the general instructions for creating ig.ini
, hopefully they will know that ig
needs to point to the IG JSON file (wherever it is) anyway. If they use sushi --init
then ig.ini
will already point to it in the correct location. Still, perhaps it is worth adding to the doc just to make it clear.
Chris Moesel (Dec 01 2020 at 21:53):
@Jose Costa Teixeira -- we're talking about when SUSHI generates the IG JSON, so I'm not sure how/why XML comes into play. If you're providing your own IG XML (rather than having SUSHI provide it), then your ig.ini
should point to wherever you put that XML. Or did I misunderstand your question?
Jose Costa Teixeira (Dec 01 2020 at 21:53):
I mean other resources (other json files and xml files) in input/...
Chris Moesel (Dec 01 2020 at 21:56):
Yeah, that should work just fine.
Jose Costa Teixeira (Dec 01 2020 at 21:56):
I just haven't tested the scripts and publisher if the IG includes mixed content and the paths are different (relatively). Those paths are all parameters in the IG, so I think it should be OK
Elliot Silver (Dec 01 2020 at 21:58):
@Chris Moesel I don't have a real preference.
I forgot though -- does sushi-config.yaml generate ig.ini each time? Will an existing ig.ini be overwritten? I ask because the project structure page says "You can populate your project as follows: ... ig.ini..." If ig.ini is generated from sushi-config.yaml, there's not much point in populating it in your project.
John Moehrke (Dec 01 2020 at 22:13):
FSHOnly works swimmingly
Chris Moesel (Dec 01 2020 at 23:05):
As of SUSHI 1.0, SUSHI does not generate ig.ini
anymore (except for the backwards-compatible "legacy" mode). Generating ig.ini
was controversial and it's a very simple file that hardly ever changes -- so it didn't seem too much of a burden to have users maintain their own. So sushi --init
will create one for you at the start, but after that you're on your own.
Last updated: Apr 12 2022 at 19:14 UTC