Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .autover/changes/162006ac-8789-42fc-a36b-a68119f3885b.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Projects": [
{
"Name": "Amazon.Lambda.Annotations",
"Type": "Minor",
"ChangelogMessages": [
"Prepare Amazon.Lambda.Annotations for upcoming .NET 10 managed runtime"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed because it wasn't ever referenced.

private readonly IFileManager _fileManager = new FileManager();
private readonly IDirectoryManager _directoryManager = new DirectoryManager();

Expand All @@ -26,15 +25,17 @@ public class Generator : ISourceGenerator
internal static readonly Dictionary<string, string> _targetFrameworksToRuntimes = new Dictionary<string, string>(2)
{
{ "net6.0", "dotnet6" },
{ "net8.0", "dotnet8" }
{ "net8.0", "dotnet8" },
{ "net10.0", "dotnet10" }
};

internal static readonly List<string> _allowedRuntimeValues = new List<string>(4)
{
"dotnet6",
"provided.al2",
"provided.al2023",
"dotnet8"
"dotnet8",
"dotnet10"
};

public Generator()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


using System;

namespace Amazon.Lambda.Annotations
Expand All @@ -17,8 +17,8 @@ public class LambdaGlobalPropertiesAttribute : Attribute
public bool GenerateMain { get; set; }

/// <summary>
/// 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'.
/// </summary>
public string Runtime { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}
}
};
Expand Down