Skip to content

Conversation

@Kasdejong
Copy link
Member

@Kasdejong Kasdejong commented Oct 22, 2024

Description

  • Changed the SnapshotGenerator to use the new RegenerationBehaviour setting. Also aligned this behaviour more with the "expected" behaviour.
  • Removed the obsolete warnings from our own code
  • In doing so, changed the signature of EvaluationContext.WithResourceOverrides. This is breaking, but since this member has only existed for a month or so and the current signature was confusing and impractical, we deemed it necessary to change this BEFORE 6.x.x

@Kasdejong Kasdejong changed the title Feature/use proper snapshot generation settings Use proper snapshot generation settings Oct 22, 2024
… old behaviour. There is still a key difference in root elementDef handling
…ration-settings' into feature/use-proper-snapshot-generation-settings

# Conflicts:
#	src/Hl7.Fhir.Conformance/Specification/Snapshot/SnapshotGenerator.cs
#	src/Hl7.Fhir.STU3/Specification/Snapshot/SnapshotGenerator.cs
@Kasdejong Kasdejong marked this pull request as ready for review October 22, 2024 13:05
@Kasdejong Kasdejong requested a review from ewoutkramer October 22, 2024 13:05
@Kasdejong Kasdejong changed the title Use proper snapshot generation settings Use proper snapshot generation settings, fixed obsolete warnings Oct 22, 2024
public SnapshotEvaluationContext(
string testPath, IResourceResolver resolver, string id,
StructureDefinition input, StructureDefinition generated) : base(generated.ToTypedElement())
StructureDefinition input, StructureDefinition generated)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this set the WithResource()?

Assert.AreEqual("contained-1", patBundle.Scalar("%resource.id", ctx));
Assert.AreEqual("patient-1", patBundle.Scalar("%rootResource.id", ctx));
testNode = patBundle.Select("entry.first().resource.contained.id")?.FirstOrDefault() as ScopedNode;
ctx = new FhirEvaluationContext();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to re-create a new context every time?

@ewoutkramer ewoutkramer enabled auto-merge October 22, 2024 15:53
@Kasdejong Kasdejong added the breaking change This issue/commit causes a breaking change, and requires a major version upgrade label Oct 22, 2024
@ewoutkramer ewoutkramer merged commit a4230b7 into develop Oct 22, 2024
16 checks passed
@ewoutkramer ewoutkramer deleted the feature/use-proper-snapshot-generation-settings branch October 22, 2024 16:23
mmsmits added a commit that referenced this pull request Nov 20, 2024
…napshot-generation-settings"

This reverts commit a4230b7, reversing
changes made to 962f408.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change This issue/commit causes a breaking change, and requires a major version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants