Stream: shorthand
Topic: SUSHI 0.11.2
Chris Moesel (Apr 03 2020 at 21:41):
Announcing SUSHI 0.11.2. This release contains the following enhancements and bug fixes:
- Adds support for caret rules on the root element using the
.
path (#277) - Adds do-not-edit warning to generated IG files where allowed (#309)
- Adds new
SUSHI-GENERATED-FILES.md
file in IG output - Adds user-friendly results summary at end of console output
- Enforces requirement that invariant names be valid FHIR ids (#290)
- Fixes issue w/ sparse differentials and slice paths (#293)
- Fixes duplicate entries for instances used in inline references (#333)
- Fixes issue w/ single-line block comments (#155)
- Updates various application dependencies to their more recent versions
See the RELEASE NOTES for details, examples, and links to resolved issues.
Chris Moesel (Apr 03 2020 at 21:44):
@Pétur Valdimarsson and @Keith Boone -- this release fixes some bugs you reported. Thanks for your help!
Bob Milius (Apr 03 2020 at 22:51):
I appreciate the new release, but I'm now getting an error
onGenerate: Error on line 1 column 1 SXXP0003: Error reported by XML parser: Content is not allowed in prolog. Exception generating page /Users/bmilius/Documents/src/fsh/hla-reporting-ig/build/temp/pages/_includes/index.xml: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. (00:26.0198)
If I revert to the 0.11.1 version, I don't see this error and it builds fine.
I'm writing my pages in xml, so I'm using index.xml instead of index.md
Grahame Grieve (Apr 03 2020 at 23:13):
what version of the ig publisher are you using?
Bob Milius (Apr 03 2020 at 23:15):
Most recent, updated before I ran it.
Bob Milius (Apr 03 2020 at 23:17):
I’m running it in two steps, first running sushi, then the IG publisher in the build dir
Vassil Peytchev (Apr 03 2020 at 23:31):
Make sure the editor you use for the XML file doesn't prepend a byte order mark for utf-8
Chris Moesel (Apr 04 2020 at 00:31):
Hi @ Bob Milius -- we're outputting some Jekyll liquid comments in files that we copy or generate now (because users were getting confused between the source and destination files). I wonder if this is causing the problem. I know we tested it thoroughly w/ the publisher and custom .md
files, but maybe we missed some tests on .xml
files (specifically w/ the publisher). We'll take a look. Sorry for the inconvenience -- if it's working w/ SUSHI 0.11.1 for you, you might want to stick with that for now.
Chris Moesel (Apr 04 2020 at 00:32):
If your FSH project is open source and publicly available, we can use it as a test case. If so, please provide a link. Thanks!
Chris Moesel (Apr 04 2020 at 00:33):
@Grahame Grieve -- if it works with SUSHI 0.11.1 but not with SUSHI 0.11.2, then I'm assuming this is our problem, not yours.
Grahame Grieve (Apr 04 2020 at 01:03):
I'm not assuming it's so simple. But what I can say is, I can't hack the XML processor the way I the JSON, but I shouldn't need to... xml comments should work
Chris Moesel (Apr 04 2020 at 04:01):
We’re using Jekyll liquid style comments so they don’t persist to the final rendered html files. Maybe we’re applying it to files that aren’t actually going through the Jekyll parser?
Chris Moesel (Apr 06 2020 at 17:15):
I've looked into this... It looks like the publisher (or Jekyll) tries to parse the XML file without ignoring the comments first. If I surround it in normal XML comments it works. I've logged a bug and will work on a solution. See: https://github.com/FHIR/sushi/issues/338
David Hay (Apr 06 2020 at 21:30):
The puns (in the sushi output) are atrocious. Well done!
David Hay (Apr 07 2020 at 02:00):
If you have an ig-data folder, then sushi will generate an IG containing all the resources it created - which is great for when you add new profiles or extensions. However, the IG also contains the page node that is needed to support customizations to the menu, which seems to be replaced with a default each time sushi runs. Is there a way to define the page node in the ig-data folder so that it is merged with the generated IG ?
Chris Moesel (Apr 07 2020 at 13:09):
Hi @David Hay -- when you say "page node", do you mean the pages elements in the ImplementationGuide JSON file that we generate? And if so, how does it affect the menu? Last I checked the two were not linked in any way (you had to manually specify your own menu). It does affect the TOC though...
David Hay (Apr 07 2020 at 18:17):
Hi Chris - yep, that one. I thought you had to put the the pages that you create in there - at least, the IG publisher doesn't seem to generate the page if you don't...
Chris Moesel (Apr 07 2020 at 19:54):
OK. Yes, it does affect what pages get processed -- so your pages must be listed there. Currently, using SUSHI, if you put any .md
or .xml
files in ig-data/pagecontent
, then SUSHI will enumerate them and add them to the ImplementationGuide JSON. If you prefix the file names with numbers (e.g., 1_Servers.md
, 2_Clients.md
, etc) then that will affect the order they are listed in (but index.md
/index.xml
always gets listed first).
Chris Moesel (Apr 07 2020 at 19:55):
As for the menu, you can add your own menu.xml
in ig-data/input
and that will be used.
Chris Moesel (Apr 07 2020 at 19:56):
A future version of SUSHI will support a more elaborate config file that gives you more control over these things.
David Hay (Apr 07 2020 at 20:37):
Ah. though I did hit the issue I mentioned in another stream with the sushi header seeming to muck up page generation with .xml files. For now I just added a 'pre-processing' stop in the build process that updates the IG so all good.
Etienne Cantineau (Apr 08 2020 at 10:59):
Thank you for the previous answers as i was experiencing the same problem of prolog!
@Chris Moesel thank you, good to know about the number prefix, is there a way to give a number to the Artifacts Summary too? As he it is not in the ig-data/input/pagecontent
Jose Costa Teixeira (Apr 08 2020 at 11:56):
The artifacts summary page is automatically generated by the template. So yes, there is a way.
Chris Moesel (Apr 09 2020 at 12:34):
@Etienne Cantineau -- we don't have control over the naming of the Artifact Summary page, so I'm not sure how you would currently indicate where you want it to go in the order. This will be possible with our new config file, however, which we start work on next week.
Chris Moesel (Apr 09 2020 at 12:35):
Also, the prolog issue should be fixed in SUSHI 0.12.0, which we expect to release today.
Last updated: Apr 12 2022 at 19:14 UTC