Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove 4.4 DDB and KMS patches, abstract test to work on later Dafny versions #611

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

robin-aws
Copy link
Contributor

@robin-aws robin-aws commented Aug 19, 2024

Description of changes:
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.

Squash/merge commit message, if applicable:

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

@robin-aws robin-aws changed the title Remove 4.4 DDB and KMS patches fix: Remove 4.4 DDB and KMS patches, abstract test to work on later Dafny versions Aug 20, 2024
@robin-aws robin-aws marked this pull request as ready for review August 20, 2024 18:09
@robin-aws robin-aws requested a review from a team as a code owner August 20, 2024 18:09
@robin-aws robin-aws merged commit d51d648 into main Aug 20, 2024
102 of 118 checks passed
@robin-aws robin-aws deleted the robin-aws/correct-4-4-patches branch August 20, 2024 18:10
texastony pushed a commit that referenced this pull request Aug 23, 2024
…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.
lucasmcdonald3 pushed a commit that referenced this pull request Aug 29, 2024
…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.
josecorella pushed a commit that referenced this pull request Sep 10, 2024
* add ECDH error message for Rust ([#574](#574)) ([473a34a](473a34a))
* **DDB-Model:** DDB Supports 100 actions per Transaction ([#692](#692)) ([8a67843](8a67843))
* GetCurrentTimeStamp returns ISO8601 format ([#575](#575)) ([c07a51f](c07a51f))
* maintain order in test vectors for languages with parallel tests ([#641](#641)) ([8c8a38f](8c8a38f))
* Remove 4.4 DDB and KMS patches, abstract test to work on later Dafny versions ([#611](#611)) ([d51d648](d51d648))
* Remove uses of `:|` ([#618](#618)) ([f12fe5b](f12fe5b))
* test vector help text ([#657](#657)) ([0fedaf1](0fedaf1))

* bump dafny verification and code gen to dafny 4.8.0 ([#520](#520)) ([e16539e](e16539e))
* **post-release:** Change back to 1.5.1-SNAPSHOT ([09cd9a4](09cd9a4))
lucasmcdonald3 pushed a commit that referenced this pull request Sep 24, 2024
…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.
lucasmcdonald3 pushed a commit to lucasmcdonald3/aws-cryptographic-material-providers-library that referenced this pull request Sep 26, 2024
…afny versions (aws#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.
lucasmcdonald3 pushed a commit to lucasmcdonald3/aws-cryptographic-material-providers-library that referenced this pull request Oct 1, 2024
…afny versions (aws#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.
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.

2 participants