smithy-lang / smithy-dafny

Apache License 2.0
8 stars 8 forks source link

Support Smithy 2.0 features #105

Open alex-chew opened 1 year ago

alex-chew commented 1 year ago

Smithy 2.0 is now available. Polymorph is built on Smithy 1.0 and should be updated.

There is a migration guide for upgrading from version 1.0 of the Smithy IDL to version 2.0: https://smithy.io/2.0/guides/migrating-idl-1-to-2.html

Most of the changes seem to only affect the IDL, and not the semantic model, but there are (at least) these notable exceptions:

robin-aws commented 1 year ago

I assume it will be far easier to ONLY support Smithy 2.0, and require updating existing Smithy 1.0 models? I'd be curious to see whether the other smithy-*** packages manage to support both at once.

The set shape is deprecated in favor of a list shape with the @uniqueItems trait

This one is interesting, will definitely be a breaking change for any model that uses set, as I assume that becomes a Dafny set<T>.

robin-aws commented 1 year ago

Qualified the title of this a bit: since upgrading to newer versions of core Smithy packages we can handle 2.0 models just fine, and the remaining work is to handle new features like @enum. But I think it's more important to first cleanly reject those features and other unsupported ones via #185.