smithy-lang / smithy-dafny

Apache License 2.0
10 stars 8 forks source link

Support running `smithy diff` on smithy-dafny projects #557

Open robin-aws opened 2 months ago

robin-aws commented 2 months ago

One Smithy tool we're not using yet is Smithy Diff, which is intended to catch breaking changes as a Smithy model is evolved. This tool would have caught the exact example breaking change described in https://github.com/smithy-lang/smithy-dafny/issues/544, since removing @required is considered breaking unless you also add @default (amongst other options).

It's a little unclear whether smithy-dafny itself can help much here, since it's a matter of a smithy-dafny project enabling the right CI. But at a minimum it could document how to do it and strongly encourage it.

robin-aws commented 2 months ago

We should be able to call smithy diff --mode git ... AFAICT. And I believe that tool emit validation events, which means that we can suppress ones where additional context means the change is not actually breaking, or the breakage is acceptable.