Skip to content

Commit

Permalink
fix: Remove 4.4 DDB and KMS patches, abstract test to work on later D…
Browse files Browse the repository at this point in the history
…afny versions (#611)

These `dafny-4.4.0.patch` files only forced the generated code back to the Dafny 4.2 style of not passing type descriptors to generic data constructors. This was intended to help address the incompatibility between the MPL and consuming libraries when built with a newer Dafny version, but there are two better options available:

1. smithy-dafny emits the right code if given the right `--dafny-version` argument. This doesn't address the incompatibility, but does ensure type descriptors are set correctly which enables more features in the future such as `--general-traits`.
2. Dafny itself now has a `--legacy-data-constructors` flag that makes it emit deprecated overloads that just set type descriptors to null. This is the actual plan for upgrading the MPL, but it is more complicated to set conditionally in the project build system.

On that note, also refactored a unit test slightly to let Dafny generate the relevant code.
  • Loading branch information
robin-aws authored and lucasmcdonald3 committed Sep 24, 2024
1 parent 50d12b1 commit d10b1ad
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19,977 deletions.
Loading

0 comments on commit d10b1ad

Please sign in to comment.