fix: implemented change to always use __
as prefix and suffix for parameter names generated for a LambdaFunction.
#1984
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.
Issue #, if available: #1977
Description of changes:
Implemented change to always use
__
as prefix and suffix for parameter names generated for a LambdaFunction.Debugging Steps:
Referred article https://nicksnettravels.builttoroam.com/debug-code-gen/ to debug the project (needed to understand the code flow for source generator):
Amazon.Lambda.Annotations.SourceGenerator
project in the target application project:We would need to clean solution, close Visual Studio, reload project solution. It would prompt to select Visual Studio instance for debugging. If selecting current instance, it would have dialog looking for change in source files as
Generator()
constructor is debugged.Thereafter, set breakpoint in Execute() method and expand
Dependencies
>Analyzers
>Amazon.Lambda.Annotations.SourceGenerator
. It will try to inspect target application project and execute source generator logic.This PR also includes the following changes:
Executed command
autover change --project-name "Amazon.Lambda.Annotations" -m "fix: implemented change to always use __ as prefix and suffix for parameter names generated for a LambdaFunction."
to create the change file using ONLYAmazon.Lambda.Annotations
project. Per @normj, there is a single NuGet package with the both Amazon.Lambda.Annotations.dll for runtime and Amazon.Lambda.Annotaitons.SourceGenerator.dll run by the Roslyn compiler. The csproj file for Amazon.Lambda.Annotations.SourceGenerator. Refer existing commit.Updated integration test snapshots which would be changed as a result of this change.
Updated existing test to include the above scenario.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.