-
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
codebuild: LinuxBuildImage enum does not resolve correctly #1027
Comments
I am unable to reproduce the bad behavior using the |
Good (well, kind of) news! I can reproduce the issue on the using Amazon.CDK;
using Amazon.CDK.AWS.CodeBuild;
namespace Repro1027
{
class Program
{
static void Main(string[] args)
{
var app = new App();
var stack = new Stack(app, "TestStack", new StackProps());
new Project(stack, "CodeBuild", new ProjectProps
{
Environment = new BuildEnvironment { BuildImage = LinuxBuildImage.UBUNTU_14_04_DOTNET_CORE_2_1 }
}
);
app.Run();
}
}
} |
The
Apparently, the |
A part of the problem is aws/jsii#285, where another issue (which I am yet to put my finger on) in JSII should have made your CDK App crash instead of returning incorrect results. |
I reckon I've identified the bug in the |
The `jsii` compiler incorrectly mapped types homonym with a standard type (`String`, `Number`, ...) to the primitive type on usage sites. This commit corrects this behavior and adjusts the C# tests accordingly. Additionally, when the return type of a callback was an interface, the C# runtime was unable to determine the correct JSII type to use, despite it has the information on the type of the callback method available. The resolution behavior has also been fixes, as well as a couple of other glitches that became apparent as a result of the `Number` type starting to be correctly represented as the `@scope/jsii-calc-lib.Number` type. Fixes aws/aws-cdk#1027
Use the type data available on the deputy object to determine the relevant JSII type for the result of callbacks, instead of trying to map into `PrimitiveType.Any`. Fixes #290 Fixes aws/aws-cdk#1027
The `jsii` compiler incorrectly mapped types homonym with a standard type (`String`, `Number`, ...) to the primitive type on usage sites. This commit corrects this behavior and adjusts the C# tests accordingly. Additionally, when the return type of a callback was an interface, the C# runtime was unable to determine the correct JSII type to use, despite it has the information on the type of the callback method available. The resolution behavior has also been fixes, as well as a couple of other glitches that became apparent as a result of the `Number` type starting to be correctly represented as the `@scope/jsii-calc-lib.Number` type. Fixes #290 Fixes aws/aws-cdk#1027
The `jsii` compiler incorrectly mapped types homonym with a standard type (`String`, `Number`, ...) to the primitive type on usage sites. This commit corrects this behavior and adjusts the C# tests accordingly. Additionally, when the return type of a callback was an interface, the C# runtime was unable to determine the correct JSII type to use, despite it has the information on the type of the callback method available. The resolution behavior has also been fixes, as well as a couple of other glitches that became apparent as a result of the `Number` type starting to be correctly represented as the `@scope/jsii-calc-lib.Number` type. Fixes #290 Fixes aws/aws-cdk#1027
The `jsii` compiler incorrectly mapped types homonym with a standard type (`String`, `Number`, ...) to the primitive type on usage sites. This commit corrects this behavior and adjusts the C# tests accordingly. Additionally, when the return type of a callback was an interface, the C# runtime was unable to determine the correct JSII type to use, despite it has the information on the type of the callback method available. The resolution behavior has also been fixes, as well as a couple of other glitches that became apparent as a result of the `Number` type starting to be correctly represented as the `@scope/jsii-calc-lib.Number` type. Fixes #290 Fixes aws/aws-cdk#1027
Amazon.CDK.AWS.CodeBuild.LinuxBuildImage.UBUNTU_14_04_DOTNET_CORE_2_1 resolves to "aws/codebuild/ubuntu-base:14.04" instead of "aws/codebuild/dot-net:core-2.1"
The text was updated successfully, but these errors were encountered: