From 900e9cb5e30de6e66610cbe09259249053b2108c Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Sun, 7 Dec 2025 23:58:05 -0800 Subject: [PATCH 1/3] Prepare Amazon.Lambda.Annotations for upcoming .NET 10 managed runtime --- .../changes/162006ac-8789-42fc-a36b-a68119f3885b.json | 11 +++++++++++ .../Amazon.Lambda.Annotations.SourceGenerator.csproj | 2 +- .../Generator.cs | 7 ++++--- .../LambdaGlobalPropertiesAttribute.cs | 6 +++--- 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .autover/changes/162006ac-8789-42fc-a36b-a68119f3885b.json diff --git a/.autover/changes/162006ac-8789-42fc-a36b-a68119f3885b.json b/.autover/changes/162006ac-8789-42fc-a36b-a68119f3885b.json new file mode 100644 index 000000000..b005d414f --- /dev/null +++ b/.autover/changes/162006ac-8789-42fc-a36b-a68119f3885b.json @@ -0,0 +1,11 @@ +{ + "Projects": [ + { + "Name": "Amazon.Lambda.Annotations", + "Type": "Minor", + "ChangelogMessages": [ + "Prepare Amazon.Lambda.Annotations for upcoming .NET 10 managed runtime" + ] + } + ] +} \ No newline at end of file diff --git a/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj b/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj index ca772979c..13d2909e5 100644 --- a/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj +++ b/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj @@ -20,7 +20,7 @@ true false - 1.7.0 + 1.7.100 diff --git a/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Generator.cs b/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Generator.cs index 69ef75620..3001b6144 100644 --- a/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Generator.cs +++ b/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Generator.cs @@ -16,7 +16,6 @@ namespace Amazon.Lambda.Annotations.SourceGenerator [Generator] public class Generator : ISourceGenerator { - private const string DEFAULT_LAMBDA_SERIALIZER = "Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer"; private readonly IFileManager _fileManager = new FileManager(); private readonly IDirectoryManager _directoryManager = new DirectoryManager(); @@ -26,7 +25,8 @@ public class Generator : ISourceGenerator internal static readonly Dictionary _targetFrameworksToRuntimes = new Dictionary(2) { { "net6.0", "dotnet6" }, - { "net8.0", "dotnet8" } + { "net8.0", "dotnet8" }, + { "net10.0", "dotnet10" } }; internal static readonly List _allowedRuntimeValues = new List(4) @@ -34,7 +34,8 @@ public class Generator : ISourceGenerator "dotnet6", "provided.al2", "provided.al2023", - "dotnet8" + "dotnet8", + "dotnet10" }; public Generator() diff --git a/Libraries/src/Amazon.Lambda.Annotations/LambdaGlobalPropertiesAttribute.cs b/Libraries/src/Amazon.Lambda.Annotations/LambdaGlobalPropertiesAttribute.cs index 5bdd71ef0..dfaa46334 100644 --- a/Libraries/src/Amazon.Lambda.Annotations/LambdaGlobalPropertiesAttribute.cs +++ b/Libraries/src/Amazon.Lambda.Annotations/LambdaGlobalPropertiesAttribute.cs @@ -1,4 +1,4 @@ - + using System; namespace Amazon.Lambda.Annotations @@ -17,8 +17,8 @@ public class LambdaGlobalPropertiesAttribute : Attribute public bool GenerateMain { get; set; } /// - /// The runtime to set in the generated CloudFormation template. Either 'dotnet6', 'provided.al2', 'provided.al2023', or 'dotnet8'. + /// The runtime to set in the generated CloudFormation template. Either 'dotnet6', 'provided.al2', 'provided.al2023', 'dotnet8', or 'dotnet10'. /// public string Runtime { get; set; } } -} \ No newline at end of file +} From 6d67a4496f0dbb3e3b6f188eca9d23e879df616f Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Mon, 8 Dec 2025 11:03:12 -0800 Subject: [PATCH 2/3] Reset version number from local test version --- .../Amazon.Lambda.Annotations.SourceGenerator.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj b/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj index 13d2909e5..ca772979c 100644 --- a/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj +++ b/Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj @@ -20,7 +20,7 @@ true false - 1.7.100 + 1.7.0 From 27545357896d2f1e905c087ed6d5b7eaba175053 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Mon, 8 Dec 2025 11:13:03 -0800 Subject: [PATCH 3/3] Fix unit test --- .../SourceGeneratorTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/SourceGeneratorTests.cs b/Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/SourceGeneratorTests.cs index 640da8e9e..8258d884c 100644 --- a/Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/SourceGeneratorTests.cs +++ b/Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/SourceGeneratorTests.cs @@ -264,7 +264,7 @@ public async Task TestInvalidGlobalRuntime_ShouldError() }, ExpectedDiagnostics = { - new DiagnosticResult("AWSLambda0112", DiagnosticSeverity.Error).WithMessage("The runtime selected in the Amazon.Lambda.Annotations.LambdaGlobalPropertiesAttribute is not a supported value. The valid values are: dotnet6, provided.al2, provided.al2023, dotnet8"), + new DiagnosticResult("AWSLambda0112", DiagnosticSeverity.Error).WithMessage("The runtime selected in the Amazon.Lambda.Annotations.LambdaGlobalPropertiesAttribute is not a supported value. The valid values are: dotnet6, provided.al2, provided.al2023, dotnet8, dotnet10"), } } };