Skip to content

Commit

Permalink
chore(events-targets): remove experimental dependency (#14537)
Browse files Browse the repository at this point in the history
A previous [PR](#13823) added a dependency from the stable module `aws-events-targets` to the experimental module `aws-batch`. Depending on experimental modules is no longer allowed.  In fact, this PR build should have failed when attempting to build `aws-cdk-lib`, preventing it from being merged. However, since the dependency was added but not used, the build succeeded, and the PR was merged.

### Why did we expect the PR build of #13823 to fail?

In the build step of `aws-cdk-lib` we strip all the L2 of experimental modules. This means that when compiling `aws-cdk-lib` the L2 types of experimental modules does not exists, if a stable module reference such a type, the build of `aws-cdk-lib` will fail. 

### Why did the PR build of #13823 succeeded?

It added a dependency on the experimental `aws-batch` but didn't use it.

### What are we doing to prevent this from happening in the future?
 #14249 adds a lint rule that disallow depending on an experimental module.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
NetaNir committed May 5, 2021
1 parent acc7bdd commit ed88aad
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/@aws-cdk/aws-events-targets/package.json
Expand Up @@ -85,7 +85,6 @@
},
"dependencies": {
"@aws-cdk/aws-apigateway": "0.0.0",
"@aws-cdk/aws-batch": "0.0.0",
"@aws-cdk/aws-codebuild": "0.0.0",
"@aws-cdk/aws-codepipeline": "0.0.0",
"@aws-cdk/aws-ec2": "0.0.0",
Expand All @@ -107,7 +106,6 @@
"homepage": "https://github.com/aws/aws-cdk",
"peerDependencies": {
"@aws-cdk/aws-apigateway": "0.0.0",
"@aws-cdk/aws-batch": "0.0.0",
"@aws-cdk/aws-codebuild": "0.0.0",
"@aws-cdk/aws-codepipeline": "0.0.0",
"@aws-cdk/aws-ec2": "0.0.0",
Expand Down

0 comments on commit ed88aad

Please sign in to comment.