-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(inits): .NET semantic fixes for init templates #5154
Conversation
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
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.
remove .ionide/sysmbolCache.db
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.
- remove this binary
- confirming that you've tested these as well
Fixed |
@@ -4,7 +4,7 @@ namespace %name.PascalCased% | |||
{ | |||
public class %name.PascalCased%Stack : Stack | |||
{ | |||
public %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) | |||
public %name.PascalCased%Stack(Construct scope, string id) : base(scope, id) |
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.
@RomainMuller pointed out that this would not be a good practice earlier so please hang on until he gets a chance to take a look
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.
Yes - the best practice is for Stack subclasses fo accept a StackProps
parameter and forward it to the base. I wouldn't encourage users to omit this by encoding it in the template.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
...cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs
Outdated
Show resolved
Hide resolved
.../init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs
Outdated
Show resolved
Hide resolved
...ages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs
Outdated
Show resolved
Hide resolved
packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs
Outdated
Show resolved
Hide resolved
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Several minor semantic .NET template fixes to ensure idiomatic C#. Parameters that default to null do not need to be included by inheritors.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license