diff --git a/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dotnet/dafny-4.9.0.patch b/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dotnet/dafny-4.9.0.patch new file mode 100644 index 000000000..1bd005085 --- /dev/null +++ b/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dotnet/dafny-4.9.0.patch @@ -0,0 +1,46 @@ +diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs +index 8f7200422..2f36dbdaa 100644 +--- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs ++++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs +@@ -1,6 +1,7 @@ + // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + // SPDX-License-Identifier: Apache-2.0 + // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. ++using System.Collections.Generic; + using System; + using AWS.Cryptography.MaterialProviders; + namespace AWS.Cryptography.MaterialProviders +@@ -8,9 +9,17 @@ namespace AWS.Cryptography.MaterialProviders + public class CollectionOfErrors : Exception + { + public readonly System.Collections.Generic.List list; +- public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } ++ public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } + public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } + public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } ++ private static string ListAsString(List list) ++ { ++ if (list.Count < 1) return ""; ++ string[] msgArr = new string[list.Count]; ++ for (int i = 0; i < list.Count; i++) ++ msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; ++ return String.Join("\n\t", msgArr); ++ } + } + + } +diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs +index d5ab49915..be1c1fae3 100644 +--- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs ++++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs +@@ -3946,7 +3946,9 @@ namespace AWS.Cryptography.MaterialProviders + dafnyVal._ComAmazonawsDynamodb + ); + case software.amazon.cryptography.materialproviders.internaldafny.types.Error_ComAmazonawsKms dafnyVal: +- return Com.Amazonaws.KMS.TypeConversion.FromDafny_CommonError( ++ // BEGIN MANUAL EDIT ++ return Com.Amazonaws.Kms.TypeConversion.FromDafny_CommonError( ++ // END MANUAL EDIT + dafnyVal._ComAmazonawsKms + ); + case software.amazon.cryptography.materialproviders.internaldafny.types.Error_AwsCryptographicMaterialProvidersException dafnyVal: diff --git a/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographyKeyStore/dotnet/dafny-4.9.0.patch b/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographyKeyStore/dotnet/dafny-4.9.0.patch new file mode 100644 index 000000000..4d1f6aed1 --- /dev/null +++ b/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographyKeyStore/dotnet/dafny-4.9.0.patch @@ -0,0 +1,57 @@ +diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs +index e752a715a..ec2d9c7c2 100644 +--- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs ++++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs +@@ -1,6 +1,7 @@ + // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + // SPDX-License-Identifier: Apache-2.0 + // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. ++using System.Collections.Generic; + using System; + using AWS.Cryptography.KeyStore; + namespace AWS.Cryptography.KeyStore +@@ -8,9 +9,17 @@ namespace AWS.Cryptography.KeyStore + public class CollectionOfErrors : Exception + { + public readonly System.Collections.Generic.List list; +- public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } ++ public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } + public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } + public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } ++ private static string ListAsString(List list) ++ { ++ if (list.Count < 1) return ""; ++ string[] msgArr = new string[list.Count]; ++ for (int i = 0; i < list.Count; i++) ++ msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; ++ return String.Join("\n\t", msgArr); ++ } + } + + } +diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs +index b7ee7eb89..723714736 100644 +--- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs ++++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs +@@ -736,7 +736,9 @@ namespace AWS.Cryptography.KeyStore + dafnyVal._ComAmazonawsDynamodb + ); + case software.amazon.cryptography.keystore.internaldafny.types.Error_ComAmazonawsKms dafnyVal: +- return Com.Amazonaws.KMS.TypeConversion.FromDafny_CommonError( ++ // BEGIN MANUAL EDIT ++ return Com.Amazonaws.Kms.TypeConversion.FromDafny_CommonError( ++ // END MANUAL EDIT + dafnyVal._ComAmazonawsKms + ); + case software.amazon.cryptography.keystore.internaldafny.types.Error_KeyStoreException dafnyVal: +@@ -761,7 +763,9 @@ namespace AWS.Cryptography.KeyStore + { + case "Com.Amazonaws.KMS": + return software.amazon.cryptography.keystore.internaldafny.types.Error.create_ComAmazonawsKms( +- Com.Amazonaws.KMS.TypeConversion.ToDafny_CommonError(value) ++ // BEGIN MANUAL EDIT ++ Com.Amazonaws.Kms.TypeConversion.ToDafny_CommonError(value) ++ // END MANUAL EDIT + ); + case "Com.Amazonaws.Dynamodb": + return software.amazon.cryptography.keystore.internaldafny.types.Error.create_ComAmazonawsDynamodb( diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs index 8f7200422..2f36dbdaa 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/CollectionOfErrors.cs @@ -1,6 +1,7 @@ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +using System.Collections.Generic; using System; using AWS.Cryptography.MaterialProviders; namespace AWS.Cryptography.MaterialProviders @@ -8,9 +9,17 @@ namespace AWS.Cryptography.MaterialProviders public class CollectionOfErrors : Exception { public readonly System.Collections.Generic.List list; - public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } + public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } + private static string ListAsString(List list) + { + if (list.Count < 1) return ""; + string[] msgArr = new string[list.Count]; + for (int i = 0; i < list.Count; i++) + msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; + return String.Join("\n\t", msgArr); + } } } diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs index e752a715a..ec2d9c7c2 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/CollectionOfErrors.cs @@ -1,6 +1,7 @@ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +using System.Collections.Generic; using System; using AWS.Cryptography.KeyStore; namespace AWS.Cryptography.KeyStore @@ -8,9 +9,17 @@ namespace AWS.Cryptography.KeyStore public class CollectionOfErrors : Exception { public readonly System.Collections.Generic.List list; - public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } + public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } + private static string ListAsString(List list) + { + if (list.Count < 1) return ""; + string[] msgArr = new string[list.Count]; + for (int i = 0; i < list.Count; i++) + msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; + return String.Join("\n\t", msgArr); + } } } diff --git a/AwsCryptographyPrimitives/codegen-patches/dotnet/dafny-4.9.0.patch b/AwsCryptographyPrimitives/codegen-patches/dotnet/dafny-4.9.0.patch new file mode 100644 index 000000000..4ee310b07 --- /dev/null +++ b/AwsCryptographyPrimitives/codegen-patches/dotnet/dafny-4.9.0.patch @@ -0,0 +1,31 @@ +diff --git a/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs b/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs +index ed41bb43b..6f4b2c03a 100644 +--- a/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs ++++ b/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs +@@ -1,6 +1,7 @@ + // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + // SPDX-License-Identifier: Apache-2.0 + // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. ++using System.Collections.Generic; + using System; + using AWS.Cryptography.Primitives; + namespace AWS.Cryptography.Primitives +@@ -8,9 +9,17 @@ namespace AWS.Cryptography.Primitives + public class CollectionOfErrors : Exception + { + public readonly System.Collections.Generic.List list; +- public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } ++ public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } + public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } + public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } ++ private static string ListAsString(List list) ++ { ++ if (list.Count < 1) return ""; ++ string[] msgArr = new string[list.Count]; ++ for (int i = 0; i < list.Count; i++) ++ msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; ++ return String.Join("\n\t", msgArr); ++ } + } + + } diff --git a/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs b/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs index ed41bb43b..6f4b2c03a 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs +++ b/AwsCryptographyPrimitives/runtimes/net/Generated/CollectionOfErrors.cs @@ -1,6 +1,7 @@ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +using System.Collections.Generic; using System; using AWS.Cryptography.Primitives; namespace AWS.Cryptography.Primitives @@ -8,9 +9,17 @@ namespace AWS.Cryptography.Primitives public class CollectionOfErrors : Exception { public readonly System.Collections.Generic.List list; - public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } + public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } + private static string ListAsString(List list) + { + if (list.Count < 1) return ""; + string[] msgArr = new string[list.Count]; + for (int i = 0; i < list.Count; i++) + msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; + return String.Join("\n\t", msgArr); + } } } diff --git a/TestVectorsAwsCryptographicMaterialProviders/codegen-patches/KeyVectors/dotnet/dafny-4.9.0.patch b/TestVectorsAwsCryptographicMaterialProviders/codegen-patches/KeyVectors/dotnet/dafny-4.9.0.patch new file mode 100644 index 000000000..582084508 --- /dev/null +++ b/TestVectorsAwsCryptographicMaterialProviders/codegen-patches/KeyVectors/dotnet/dafny-4.9.0.patch @@ -0,0 +1,31 @@ +diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs b/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs +index b73757100..1a1f88736 100644 +--- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs ++++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs +@@ -1,6 +1,7 @@ + // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + // SPDX-License-Identifier: Apache-2.0 + // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. ++using System.Collections.Generic; + using System; + using AWS.Cryptography.MaterialProvidersTestVectorKeys; + namespace AWS.Cryptography.MaterialProvidersTestVectorKeys +@@ -8,9 +9,17 @@ namespace AWS.Cryptography.MaterialProvidersTestVectorKeys + public class CollectionOfErrors : Exception + { + public readonly System.Collections.Generic.List list; +- public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } ++ public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } + public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } + public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } ++ private static string ListAsString(List list) ++ { ++ if (list.Count < 1) return ""; ++ string[] msgArr = new string[list.Count]; ++ for (int i = 0; i < list.Count; i++) ++ msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; ++ return String.Join("\n\t", msgArr); ++ } + } + + } diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs b/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs index b73757100..1a1f88736 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/net/Generated/KeyVectors/CollectionOfErrors.cs @@ -1,6 +1,7 @@ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +using System.Collections.Generic; using System; using AWS.Cryptography.MaterialProvidersTestVectorKeys; namespace AWS.Cryptography.MaterialProvidersTestVectorKeys @@ -8,9 +9,17 @@ namespace AWS.Cryptography.MaterialProvidersTestVectorKeys public class CollectionOfErrors : Exception { public readonly System.Collections.Generic.List list; - public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message) { this.list = list; } + public CollectionOfErrors(System.Collections.Generic.List list, string message) : base(message + $"\n List: \n{ListAsString(list)}") { this.list = list; } public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List(); } public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List(); } + private static string ListAsString(List list) + { + if (list.Count < 1) return ""; + string[] msgArr = new string[list.Count]; + for (int i = 0; i < list.Count; i++) + msgArr[i] = $"{list[i].GetType().Name} :: {list[i].Message}"; + return String.Join("\n\t", msgArr); + } } }