Use Official Cross-Version (xver) Packages#1620
Merged
Merged
Conversation
- Auto-switch dependencies from hl7.fhir.extensions.rX to hl7.fhir.uv.xver-rX.rY - Warn user when dependencies are switched - Warn user when xver extension is used without xver dependency - Remove all code related to former "implied" extensions approach See: https://chat.fhir.org/#narrow/channel/179252-IG-creation/topic/issue.20with.20link.20to.20xver.20extension/near/582031656
* If it is a [x] extension, fix the URL and log a warning * If cross-version URL is not found but xver package is loaded, direct user to package doc * Otherwise direct user to load the correct xver package
jduteau
approved these changes
Apr 15, 2026
jduteau
left a comment
Collaborator
There was a problem hiding this comment.
argh, this affects one of my guides! But a good PR in any case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description: SUSHI implemented cross-version extensions in 2021 by allowing authors to put special cross-version extension packages in their dependencies. The package names and versions followed the conventions described in the spec here and we interpreted it as
hl7.fhir.extensions.r5:4.0.1indicating the R5 extensions in the R4 format. We processed cross-version extensions by using pattern-matching to find the corresponding targeted element in the target version of FHIR (which we loaded as "supplemental" FHIR definitions).Now that official cross-version packages are available (see FAQs and #IG creation > issue with link to xver extension @ 💬), SUSHI's old implementation is no longer necessary. This PR makes the following changes:
hl7.fhir.extensions.r5:4.0.1) with the corresponding new cross-version package dependencies (e.g.,hl7.fhir.uv.xver-r5.r4) and logs a warning telling the user to fix it in their sushi-config.yaml.[x]or URL-encoded%5Bx%5Dand strips the[x]suffix since the new cross-version packages do not expect it. In this case, SUSHI also warns the user to fix it in their source code.Since SUSHI implemented cross-version extensions before all of the rules were worked out, there are differences between SUSHI's implementation and the final implementation. As a result, some IGs will see new errors for cross-version extensions that differ between the two implementations.
I ran a regression over 1000+ existing SUSHI projects and found there were 61 projects that used the old SUSHI cross-version extension packages. Of those 61, here are how the regression results turned out:
[x]I've attached a zip of the regression results. You may review them if you'd like by unzipping it and opening the
index.htmlfile in your browser: xver-regression.zipI'm also including a screenshot of the affect projects below:
Testing Instructions:
Review the regression results above to ensure they are as expected.
Create a project with cross-version extensions using SUSHI's old cross-version extension packages or clone one of the affected projects from the regression. Run this version of SUSHI against it to determine it works as expected (
ts-node src/app.ts build /path/to/project).Related Issue: N/A