-
Notifications
You must be signed in to change notification settings - Fork 246
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
Cannot implement (non-struct) interface in C# #2870
Labels
bug
This issue is a bug.
closed-for-staleness
effort/medium
Medium work item – a couple days of effort
p1
Comments
skinny85
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 2, 2021
Note that this isn't just a problem with missing using System;
using Amazon.JSII.Runtime.Deputy;
using Amazon.CDK;
using Amazon.CDK.AWS.Cognito;
using Amazon.CDK.AWS.IoT;
using Amazon.CDK.AWS.Route53;
using Amazon.CDK.AWS.CodeBuild;
using Amazon.CDK.AWS.CodeCommit;
using Amazon.CDK.AWS.CodePipeline;
using Amazon.CDK.AWS.CodePipeline.Actions;
using Amazon.CDK.AWS.Events;
namespace CsharpCognitoL1
{
public class ElasticBeanStalkDeployActionProps : CommonAwsActionProps
{
public string ApplicationName;
public string EnvironmentName;
public Artifact_ Input;
}
public class ElasticBeanStalkDeployAction : DeputyBase, IAction
{
private readonly ElasticBeanStalkDeployActionProps props;
public ElasticBeanStalkDeployAction(ElasticBeanStalkDeployActionProps props)
{
this.props = props;
}
public IActionProperties ActionProperties => new ActionProperties()
{
Provider = "ElasticBeanstalk",
Category = ActionCategory.DEPLOY,
ArtifactBounds = new ActionArtifactBounds() { MaxInputs = 1, MinInputs = 1, MinOutputs = 0, MaxOutputs = 0 },
Inputs = new Artifact_[] { props.Input },
Role = props.Role,
ActionName = props.ActionName,
RunOrder = props.RunOrder,
VariablesNamespace = props.VariablesNamespace,
Owner = "Custom"
};
public IActionConfig Bind(Construct scope, IStage stage, IActionBindOptions options)
{
options.Bucket.GrantRead(options.Role);
return new ActionConfig() {
Configuration = new
{
ApplicationName = props.ApplicationName,
EnvironmentName = props.EnvironmentName,
}
};
}
public Rule OnStateChange(string name, IRuleTarget target = null, IRuleProps options = null)
{
throw new Exception("Unsupported");
}
}
public class CsharpCognitoL1Stack : Stack
{
internal CsharpCognitoL1Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props)
{
var sourceOutput = new Artifact_();
var buildOutput = new Artifact_();
new Pipeline(this, "Pipeline", new PipelineProps
{
Stages = new Amazon.CDK.AWS.CodePipeline.StageProps[]
{
new Amazon.CDK.AWS.CodePipeline.StageProps
{
StageName = "Source",
Actions = new IAction[]
{
new CodeCommitSourceAction(new CodeCommitSourceActionProps
{
ActionName = "Source",
Output = sourceOutput,
Repository = Repository.FromRepositoryName(this, "Repo", "my-repo"),
}),
},
},
new Amazon.CDK.AWS.CodePipeline.StageProps
{
StageName = "Build",
Actions = new IAction[]
{
new CodeBuildAction(new CodeBuildActionProps
{
ActionName = "Build",
Input = sourceOutput,
Outputs = new Artifact_[] { buildOutput },
Project = Project.FromProjectName(this, "Project", "my-build"),
}),
},
},
new Amazon.CDK.AWS.CodePipeline.StageProps
{
StageName = "Deploy_Application",
Actions = new IAction[]
{
new ElasticBeanStalkDeployAction(new ElasticBeanStalkDeployActionProps
{
ActionName = "Deploy",
ApplicationName = "applicationName",
EnvironmentName = "environmentName",
Input = buildOutput,
}),
},
},
},
});
}
}
} It still fails:
|
RomainMuller
added
p1
effort/medium
Medium work item – a couple days of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 11, 2021
This issue has not received any attention in 2 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
github-actions
bot
added
closing-soon
This issue will automatically close in 4 days unless further comments are made.
closed-for-staleness
and removed
closing-soon
This issue will automatically close in 4 days unless further comments are made.
labels
Jun 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
This issue is a bug.
closed-for-staleness
effort/medium
Medium work item – a couple days of effort
p1
🐛 Bug Report
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)Go
General Information
1.29.0
What is the problem?
When trying to implement the
IAction
interface from the CodePipeline library, by extending theAction
class from thecodepipeline-actions
library in C#:Fails with:
(If you uncomment the entire stage that contains
ElasticBeanStalkDeployAction
, everything synthesizes correctly)Verbose Log
Show
The text was updated successfully, but these errors were encountered: