-
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: ban @experimental #14070
chore: ban @experimental #14070
Conversation
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.
Nice! Only minor comments.
packages/awslint/lib/rules/docs.ts
Outdated
@@ -71,6 +72,21 @@ docsLinter.add({ | |||
}, | |||
}); | |||
|
|||
docsLinter.add({ | |||
code: 'no-experimental-apis', | |||
message: 'The use of @experimental in not allowed (either directly or via parent class)', |
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.
(either directly or via parent class)
what's this mean?
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.
I removed it, I agree it does not add value to the error. What I was referring to is the fact that if a parent class will add a @experimental annotation, the error will be thrown for every child class as well as the parent, regardless of whether the inherited property have the annotation. But since we don't allow the annotation at all, it will not be on the parent class.
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 we should add support in JSII to disallow experimental APIs, no?
@eladb I don't think we need to remove the @experimental annotation in jsii. The decision to remove experimental APIs is an AWS CDK specific decision, and the @experimental annotation is a jsii public feature that might be useful for other jsii customers. Additionally, wouldn't removing it is will breaking change in jsii? |
Agreed. I just think that it will be useful to add a jsii compiler/config flag to disallow experimental. |
Co-authored-by: Niranjan Jayakar <nija@amazon.com>
Co-authored-by: Niranjan Jayakar <nija@amazon.com>
Co-authored-by: Niranjan Jayakar <nija@amazon.com>
As a part of v2 efforts we are stabilizing all `@experimental` APIs from stable modules. A separate PR #14070, adds a lint rule that ban the usage of @experimental. #### Note on experimental modules The removal of the @experimental annotation from APIs in experimental modules does not change their stability, as it determined only by their containing module stability. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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). |
As a part of v2 efforts we are stabilizing all `@experimental` APIs from stable modules. A separate PR aws#14070, adds a lint rule that ban the usage of @experimental. #### Note on experimental modules The removal of the @experimental annotation from APIs in experimental modules does not change their stability, as it determined only by their containing module stability. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add a lint rule that disallow the use of @experimental in stable module. Ideally we would do the same for experimental modules, but for these, jsii marks all properties as experimental. Since we only care about stable modules, this is sufficient. Im open to other suggestion as well. Should only be merged after aws#14071 which removes all experimental API. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
As a part of v2 efforts we are stabilizing all `@experimental` APIs from stable modules. A separate PR aws#14070, adds a lint rule that ban the usage of @experimental. #### Note on experimental modules The removal of the @experimental annotation from APIs in experimental modules does not change their stability, as it determined only by their containing module stability. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add a lint rule that disallow the use of @experimental in stable module. Ideally we would do the same for experimental modules, but for these, jsii marks all properties as experimental. Since we only care about stable modules, this is sufficient. Im open to other suggestion as well. Should only be merged after aws#14071 which removes all experimental API. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add a lint rule that disallow the use of @experimental in stable module. Ideally we would do the same for experimental modules, but for these, jsii marks all properties as experimental. Since we only care about stable modules, this is sufficient. Im open to other suggestion as well.
Should only be merged after #14071 which removes all experimental API.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license