Stream: hapi
Topic: Java reference code for current build
Rik Smithies (Sep 04 2019 at 11:17):
When I build https://github.com/hapifhir/org.hl7.fhir.core it is generates stuff for R5 in src\main\java\org\hl7\fhir\r5\model. But it seems the same as the R4 classes in src\main\java\org\hl7\fhir\r4\model.
Is there a way to generate the java reference code for what is in the current build?
Rob Hausam (Sep 04 2019 at 12:33):
Yes, that is very similar to the situation and question that I have right now. I'm updating ConceptMap in the current build and I need to be able to generate r5.model classes that correspond to that - without it the build will fail. Grahame said that it is about time and he would generate the updates for org.hl7.fhir.core for the current build (as it is now). But that alone won't solve my issue, as I need to be able to update org.hl7.fhir.core locally first to match my local build changes (in the resource spreadsheets, etc.) so that I can get a successful local build and then create pull requests for both repos so that the changes to the build can be made in sync. @James Agnew?
James Agnew (Sep 04 2019 at 19:57):
The model classes get built in the FHIR spec build- Once in a while Grahame syncs them into org.hl7.fhir.core. I believe the current R5 models are from December so they're not far off from the R4 ones.
The challenge is that when they get moved into org.hl7.fhir.core, various other things will often break (converters, validator, fhirpath) as a result of changes to the model so Grahame resolves those things too. I suspect that task is an arduous one, which is why it doesn't happen super frequently.
Technically anyone could probably replace the contents of the src\main\java\org\hl7\fhir\r5\model
package with the new contents from the spec build, and submit it in a PR along with fixes to anything that breaks. No idea if this would be easy to do, or easy to review...
Grahame Grieve (Sep 04 2019 at 20:08):
The problem is that there's a few resources where changes to the resources requires changes to the core package. Successfully committing them is an arduous process that requires full access to the various packages so you can manage commit dependencies and PRs
Rob Hausam (Sep 04 2019 at 20:16):
Yes, that's exactly the case. I'm near to the end of this for the agreed changes to ConceptMap, but I need to figure out how to (most expeditiously) get it to the final endpoint with the spec updated and building correctly.
Rob Hausam (Sep 04 2019 at 20:18):
I'm not quite sure if "replace the contents of the src\main\java\org\hl7\fhir\r5\model package with the new contents from the spec build" actually works, because (at least what I've experienced with what I'm doing) you can't get a successful fhir spec build without first updating the src\main\java\org\hl7\fhir\r5\model package - a chicken and egg problem, it seems.
Rob Hausam (Sep 04 2019 at 20:20):
Any further thoughts/corrections/suggestions on it, @James Agnew?
Grahame Grieve (Sep 04 2019 at 20:28):
I need to do the merge. No one else can do it
Grahame Grieve (Sep 04 2019 at 20:28):
so you can't get a build that works?
Grahame Grieve (Sep 04 2019 at 20:28):
I think the only way is for you to send me a diff so that I can do it.
Rob Hausam (Sep 04 2019 at 20:43):
Hmm, that seems like a potentially major bottleneck and rather unfortunate (especially for you). If the model code is generated (which I thought you said before?), it seems that possibly others could do that? I don't really have a diff available to send. What I have now is the updated ConceptMap spreadsheet (which is creating the need for most of the other updates) and quite a bit of hand-edited code reflecting most of the other required changes, which I was hoping to get to the point of being able to generate pull request(s) from (I don't think I'm too far off at this point from being able to that, actually). And you're right that I can't get a build that works unless first I have a working updated r5 model.
Grahame Grieve (Sep 04 2019 at 20:52):
breaking changes to the following resources create this issue: CapabilityStatement, ValueSet, CodeSystem, StructureDefinition, ConceptMap
Grahame Grieve (Sep 04 2019 at 20:52):
all but 1 of them are normative. So ConceptMap is the only one that has this problem
Rob Hausam (Sep 04 2019 at 21:01):
Yes, that does make sense. So how best to proceed in this case? I kind of don't want to throw away the work that I've done and dump it all back in your lap to do over - unless it's actually easy for you to do that. But it's your call for what will work best.
Grahame Grieve (Sep 04 2019 at 21:05):
send me 2 patches for core and main spec
For patches, see 2nd answer here: https://stackoverflow.com/questions/5159185/create-a-git-patch-from-the-changes-in-the-current-working-directory
Rob Hausam (Sep 04 2019 at 21:48):
ok - I'll do that
Last updated: Apr 12 2022 at 19:14 UTC