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/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 +} 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"), } } };