Repository navigation
Conversation
Preprocessing now extracts each document's aliases and parameterized RuleSets before applying them, entity name checks share one helper, and Package lists its fish candidates in one place. No behaviour change.
With --incremental or SUSHI_INCREMENTAL=1, each file's import is cached by content hash with the aliases, RuleSets and duplicate names it used, and reused while those are unchanged. Export runs as before.
Each SD, ValueSet, CodeSystem and Instance export is recorded with what it read and did, and replayed while those reads give the same answers. Anything unexpected abandons the replay and exports everything again.
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:
Adds opt-in incremental builds (
--incremental, orSUSHI_INCREMENTAL=1). Unchanged files reuse their cached import, and unchanged entities whose lookups still give the same answers replay their cached export. Output and error/warning counts match a normal build. Without the option, nothing changes.In a large R5 IG (511 FSH files, 676 exports):
sushi-config.yamlchangeThe cache lives in
<project>/.sushi-cache, orSUSHI_CACHE_DIR. It is keyed on the SUSHI build, Node version, CLI options, config, dependencies and predefined resources. Anything unexpected abandons the replay and exports normally. Most of the diff is new code undersrc/incremental/; the exporters only gain hooks that do nothing unless the option is on.Three commits, best reviewed in order: a no-behaviour-change refactor, import reuse, export replay. This replaces #1655-#1658.
Testing Instructions:
Run
sushi . --incrementaltwice; the second run reportsIncremental build: reused N of N files, M of M exports.Edit a file, run again, and comparefsh-generated/with a build without the option.Related Issue:
#544