-
Notifications
You must be signed in to change notification settings - Fork 4k
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
chore: fix build break caused by exported deprecated functions #17719
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Functions (not member methods) aren't acknowledged by jsii, so they are not stripped out of the compiled source, even when deprecated. These two functions are deprecated and reference deprecated interfaces. When running the init template tests against JS/TS, the tests fail with: ``` node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.d.ts(110,62): error TS2304: Cannot find name 'FixedResponse'. node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.d.ts(116,68): error TS2304: Cannot find name 'RedirectResponse'. ``` By -- on v2 only -- un-exporting the functions and inlining them in their secondary usages, we can effectively "strip" these functions from the JS/TS.
rix0rrr
approved these changes
Nov 25, 2021
@Mergifyio backport v2-release |
🟠 Waiting for conditions to match
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
mergify bot
pushed a commit
that referenced
this pull request
Nov 25, 2021
Functions (not member methods) aren't acknowledged by jsii, so they are not stripped out of the compiled source, even when deprecated. These two functions are deprecated and reference deprecated interfaces. When running the init template tests against JS/TS, the tests fail with: ``` node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.d.ts(110,62): error TS2304: Cannot find name 'FixedResponse'. node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.d.ts(116,68): error TS2304: Cannot find name 'RedirectResponse'. ``` By -- on v2 only -- un-exporting the functions and inlining them in their secondary usages, we can effectively "strip" these functions from the JS/TS. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* (cherry picked from commit 12f60f5)
✅ Backports have been created
|
mergify bot
added a commit
that referenced
this pull request
Nov 25, 2021
…ort #17719) (#17720) This is an automatic backport of pull request #17719 done by [Mergify](https://mergify.com). --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com </details>
njlynch
added a commit
that referenced
this pull request
Nov 26, 2021
* chore: fix build break caused by exported deprecated functions (#17719) Functions (not member methods) aren't acknowledged by jsii, so they are not stripped out of the compiled source, even when deprecated. These two functions are deprecated and reference deprecated interfaces. When running the init template tests against JS/TS, the tests fail with: ``` node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.d.ts(110,62): error TS2304: Cannot find name 'FixedResponse'. node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.d.ts(116,68): error TS2304: Cannot find name 'RedirectResponse'. ``` By -- on v2 only -- un-exporting the functions and inlining them in their secondary usages, we can effectively "strip" these functions from the JS/TS. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* * chore: duplicate enum values not usable (#17731) There is an outstanding bug with `jsii` (aws/jsii#2782) where duplicate enum values are not available to the non-JS/TS languages. In these cases, only the first enum value defined is present in the assembly. For these cases, the first value was the deprecated one. This meant that only the deprecated values were present, and once we stripped the deprecated elements, we were left without values. For *v2 only*, we can reorder these enums so the non-deprecated values appear in the assembly. Note that we *cannot* backport this to `master` (v1), because it would introduce breaking changes to our Java/Go/Dotnet/Python customers. * chore(release): 2.0.0-rc.33 Co-authored-by: Nick Lynch <nlynch@amazon.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: AWS CDK Team <aws-cdk@amazon.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Functions (not member methods) aren't acknowledged by jsii, so they are not
stripped out of the compiled source, even when deprecated. These two functions
are deprecated and reference deprecated interfaces. When running the init
template tests against JS/TS, the tests fail with:
By -- on v2 only -- un-exporting the functions and inlining them in their
secondary usages, we can effectively "strip" these functions from the JS/TS.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license