-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: add dotnet8 support #6429
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3cec175
feat: add dotnet8 support
Beau-Gosse-dev f712e18
Merge branch 'feat/dotnet8' into develop
hawflau b341a09
Update dotnet8 test dependencies and remove extra using directives
Beau-Gosse-dev 8613b68
Update samcli/lib/utils/preview_runtimes.py
hawflau 3edc239
Merge branch 'feat/dotnet8' into develop
hawflau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/integration/testdata/buildcmd/Dotnet8/HelloWorld.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" /> | ||
<PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="1.1.3" /> | ||
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.4.0" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Net.Http; | ||
using System.Net.Http.Headers; | ||
using Newtonsoft.Json; | ||
|
||
using Amazon.Lambda.Core; | ||
using Amazon.Lambda.APIGatewayEvents; | ||
|
||
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. | ||
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] | ||
|
||
namespace HelloWorld | ||
{ | ||
|
||
public class Function | ||
{ | ||
|
||
public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) | ||
{ | ||
return "{'message': 'Hello World'}"; | ||
} | ||
} | ||
|
||
public class FirstFunction | ||
{ | ||
|
||
public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) | ||
{ | ||
return "Hello World"; | ||
} | ||
} | ||
|
||
public class SecondFunction | ||
{ | ||
|
||
public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) | ||
{ | ||
return "Hello Mars"; | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/integration/testdata/buildcmd/Dotnet8/aws-lambda-tools-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"Information" : [ | ||
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.", | ||
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.", | ||
|
||
"dotnet lambda help", | ||
|
||
"All the command line options for the Lambda command can be specified in this file." | ||
], | ||
|
||
"profile":"", | ||
"region" : "", | ||
"configuration": "Release", | ||
"framework": "net8.0", | ||
"function-runtime":"dotnet8", | ||
"function-memory-size" : 256, | ||
"function-timeout" : 30, | ||
"function-handler" : "HelloWorld::HelloWorld.Function::FunctionHandler" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably doesn't matter but this test Lambda project is using old references including the older Serialization package. From a test point of view it probably doesn't matter but it might be worth updating so people don't copy and paste this somewhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Also removed the extra usings from the function