Skip to content

Conversation

JordonPhillips
Copy link
Contributor

This loosens the ChangedMemberTarget diff evaluator to not report ERROR level events so often. Now it will always report an ERROR if the change is expected to result in codegen type errors, but otherwise it will default to WARNING unless 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 ModelDiff with 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, ModelDiff and Differences had to be updated to allow running based on a curated list of changes rather than only allow running based on auto-detected changes. DiffEvaluator also had to be updated to allow passing along the ClassLoader.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@JordonPhillips JordonPhillips requested a review from a team as a code owner October 16, 2025 14:55
@JordonPhillips JordonPhillips requested a review from yefrig October 16, 2025 14:55
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.
@JordonPhillips
Copy link
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant