Stream: shorthand
Topic: IG off Local Build
Hugh Glover (Mar 18 2021 at 11:28):
Can I use FSH and the IG builder based on a build on my local machine rather than an "official" build? I think I must be able to change some of the configuration paths, but I'm not clear which, and I can't find it in the documentation anywhere.
Oliver Egger (Mar 18 2021 at 11:53):
use "dev" (instead of current or the published version) in FSH and/or IG. In FSH you have a sushi-config.yaml where the dependencies are specified, in the IG Publisher you specify the dependency in the ImplementationGuide resource provided to the IGPublisher.
Chris Moesel (Mar 18 2021 at 12:51):
Right. I believe when you specify a dependency version as dev
it uses the last local build of the dependency -- so do note that if you make changes to the dependency locally, you need to build the dependency (using IG Publisher) in order for those changes to be reflected in the project that depends on it.
Hugh Glover (Mar 18 2021 at 20:49):
Thanks both - I've added dependencies with an id and DEV and sushi is finding something it thinks matches that, but it doesn't have the content my local build has created. I suspect the local build is putting stuff into one cache and sushi is looking in another. Beyond that I don't really know what I'm looking for or how to fix it. Words of wisdom and experience would be appreciated.
Hugh Glover (Mar 18 2021 at 21:59):
OK some progress ... doing a full build updates a folder .fhir with hl7.fhir.r5.core#current
If I put this in the dependencies in Sushi-config.yaml Sushi finds it but then says "Downloading hl7.fhir.r5.core#current since SUSHI cannot determine if the version in the local cache is the most recent build"
My IG then fails to build because it cant see my local updates. Is this a reasonable analysis and if so how do I force it to use the local copy not download a copy?
Chris Moesel (Mar 19 2021 at 12:25):
Are you trying to use a local build of a dependency IG or a local build of FHIR R5? Do you mind sharing your configuration.yaml file (either here or via direct message to me and @Nick Freiter )?
The current
version is supposed to mean "last auto build", so when you specify the version as current
SUSHI will always try to download and use the last build from the build server.
Hugh Glover (Mar 19 2021 at 15:53):
We are making significant changes to a resource for R5 and my plan was to build some examples on my local instance before putting anything into the official current build. The reason being to allow people to consider and understand the effects of changes (and it is very likely they will change their minds on some things) before going through the formal process. This will also give me examples I can put into the resource documentation. I'm not at this point actually trying to build an IG though this almost certainly will morph into one at some point in the future.
Hugh Glover (Mar 19 2021 at 15:54):
id: fhir.example.brandr.researchstudy
canonical: http://example.org/brandr/researchstudy
name: ResearchStudyIG
title: "HL7 FHIR ResearchStudy Example"
description: An illustrtation of representing a real regulated study in the ResearchStudy resource
status: draft
version: 0.1.0
fhirVersion: 4.0.1
copyrightYear: 2021+
releaseLabel: draft
publisher:
name: HL7 International - BR&R Work Group
url: https://confluence.hl7.org/display/BRR/Biomedical+Research+and+Regulation
dependencies:
hl7.fhir.r5.core : current
menu:
Home: index.html
Artifacts: artifacts.html
Hugh Glover (Mar 19 2021 at 16:02):
Thinking about it and what you said about current the queston is how I get the local FHIR build to generate hl7.fhir.r5.core : dev
Chris Moesel (Mar 19 2021 at 16:10):
Ah.. OK. So I think there are a few things going on here:
-
I think you're running into trouble because your
fhirVersion
says4.0.1
, but you're trying to pull in FHIR R5 as a dependency. I don't think an R4 project can depend on R5. So you really need to change thefhirVersion
and remove thehl7.fhir.r5.core
from the dependencies. -
Right now, we support
fhirVersion: current
, but as I noted before, this will always pull down the latest build from the build server. What you really want isfhirVersion: dev
, but right now SUSHI will not allow that. -
It sounds like you've also found that when you do a local core FHIR build, it is not creating
~/.fhir/packages/hl7.fhir.r5.core#dev
-- so even if SUSHI allowed for it, it wouldn't be able to find it. @Grahame Grieve / @Mark Iantorno -- when you build core FHIR locally, does it put a package anywhere in the local FHIR cache? If so, where? If not, any ideas on where/how SUSHI could find a locally built FHIR core package?
Chris Moesel (Mar 19 2021 at 16:20):
I ended up asking #3 above in committers, as it seems that's probably the right place to ask. https://chat.fhir.org/#narrow/stream/179165-committers/topic/Cached.20R5.20.23dev.20packages.3F
Hugh Glover (Mar 21 2021 at 10:07):
My core build does produce a new hl7.fhir.r5.core#current .user/.FHIR so I need to produce a dev version of that
Hugh Glover (Mar 29 2021 at 14:12):
I've now got the changes to the resource into the current build (rather than trying to do it locally). Setting fhirVersion
to current
downloads the latest build and sushi runs correctly. However the IG publisher (I think) then complains it doesn't like current
. I can make it work by renaming hl7.fhir.r5.core#
to hl7.fhir.r5.core#4.5.0
but this is a hack. What am I tripping over?
Chris Moesel (Mar 29 2021 at 16:14):
I can confirm. When I try to build a simple project w/ fhirVersion current
, the IG Publisher emits this error:
java.lang.Exception: Error Parsing File /Users/cmoesel/dev/fsh/R5Test/fsh-generated/resources/ImplementationGuide-fhir.example.json: Unknown FHIRVersion code 'current'
I'm 99% sure this used to work. @Grahame Grieve / @Jose Costa Teixeira / @Lloyd McKenzie -- do you have any insight into this? Shouldn't the IG publisher support IG builds based on the "current" version of FHIR? If so, is there a special way to do this? We're currently setting "fhirVersion": ["current"]
in the IG JSON file. I think this used to work (unless we somehow missed testing it?).
Jose Costa Teixeira (Mar 29 2021 at 16:16):
I don't recall if it ever worked - "current" is not in the valueset, so an IG with that value would be non-conformant.
Jose Costa Teixeira (Mar 29 2021 at 16:17):
I do not know if there was an exception for the publisher to support "current".
Jose Costa Teixeira (Mar 29 2021 at 16:19):
the place where "current" shows up is in the package-list
Chris Moesel (Mar 29 2021 at 17:17):
Good point re: the value set. Perhaps I am remembering it wrong... But it seems we must have some way of building IGs against FHIR current, right?
Lloyd McKenzie (Mar 29 2021 at 17:18):
'current' is fine for IG dependencies, I don't think it's ever worked for fhirVersion. That's a fixed enumeration. Right now, it should be 4.5.0
Gino Canessa (Mar 29 2021 at 17:22):
How does it determine if you want the 'local' 4.5.0 vs. the published 4.5.0 (September 2020)?
Chris Moesel (Mar 29 2021 at 18:17):
Right. In our case, I believe @Hugh Glover needs to build against changes that were just recently made in R5 (not in the preview 3 release that was published as 4.5.0
).
Lloyd McKenzie (Mar 29 2021 at 18:19):
I presume Grahame will increment the release to 4.6.0 soon-ish. I don't know what 4.5.0 resolves to right now...
Hugh Glover (Mar 29 2021 at 19:02):
Looks like I have to keep hacking it to work ... sigh ...
Last updated: Apr 12 2022 at 19:14 UTC