Loosen ChangedMemberTarget diff evaluator and make ModelDiff a bit more flexible#2796
Merged
JordonPhillips merged 3 commits intomainfrom Oct 28, 2025
Merged
Loosen ChangedMemberTarget diff evaluator and make ModelDiff a bit more flexible#2796JordonPhillips merged 3 commits intomainfrom
ChangedMemberTarget diff evaluator and make ModelDiff a bit more flexible#2796JordonPhillips merged 3 commits intomainfrom
Conversation
4264199 to
1272e4d
Compare
This introduces a builder to the Differences class that allows it to be constructed with only a specific, limited set of changes. This enables comparison of two separate shapes.
This adds a new, defaulted method to DiffEvaluator that additionally takes a ClassLoader. This may be used for a number of reasons, but was added particularly to allow running ModelDiff on synthetic changes from an evaluator.
1272e4d to
19705d7
Compare
Contributor
Author
|
Windows line separators strike again |
This updates the ChangedMemberTarget diff evaulator to emit a warning instead of an error when the new target has a different set of traits. It now is expected to only emit an error when the new target is not expected to be generated as a compatible type. The messages generally have been updated. It now generates messages about traits by generating a syntehtic ChangedShape and calling ModelDiff on that. This is also how it deals with knowing whether a trait change is compatible or not - it just checks if there's any DANGER or worse events in the new set of events.
19705d7 to
1488f71
Compare
yasmewad
approved these changes
Oct 27, 2025
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.
This loosens the
ChangedMemberTargetdiff evaluator to not reportERRORlevel events so often. Now it will always report anERRORif the change is expected to result in codegen type errors, but otherwise it will default toWARNINGunless differing traits between the targets would result in a higher severity event had those trait changes been applied to the original target.This is accomplished by re-running
ModelDiffwith a set of synthetic changes, comparing the new and old targets as if they were the same shape that just got changed. To facilitate this,ModelDiffandDifferenceshad to be updated to allow running based on a curated list of changes rather than only allow running based on auto-detected changes.DiffEvaluatoralso had to be updated to allow passing along theClassLoader.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.