-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat: Register module-level stability #515
Conversation
Adds the necessary code to detect and forward module-level stability indications to the assembly, so it can be used by downstream languages. This effectively removes the `markdown` attribute from the `Assembly` in favor of using the `docs` attribute. If a stability indication, a specific badge _must_ be present in the accompanying `README.md` file (which as a consequence is required to exist), to denote the maturity of the module in user-visible documentation, too. The tool prescribes what the badge must look like. Also, renders a `package-info.json` file for packages that have documentation (a `README.md` file, deprecation notice, or stability indication).
packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii
Show resolved
Hide resolved
- Moved `readme` back to it's own property - Stopped enforcing the stability banner in readme (belongs to another tool/layer) - Added `Stability.Deprecated`, and enforced that deprecated packages use it - Used the NodeJS stability index in documentation
4dad3d0
to
c935c0f
Compare
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.
What about python/.NET? How will stability/deprecation look like for them?
Also, add a test that will demonstrate how deprecation is code-gened across the languages...
@rix0rrr can you remind me how this will propagate to individual API elements?
Sorry... This is jsii :-(
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.
Please make sure we have tests that cover all the cases (all stability levels) for all languages:
- Stability/deprecation at the package level
- Stability/deprecation at the class + method + property + enum + enum-member levels
We need to get this right the first time.
...cted.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/DeprecatedClass.java
Outdated
Show resolved
Hide resolved
packages/jsii-pacmak/test/expected.jsii-calc/python/src/jsii_calc/__init__.py
Show resolved
Hide resolved
packages/jsii-calc/lib/stability.ts
Outdated
/** @deprecated for the show */ | ||
export class DeprecatedClass { | ||
/** @deprecated for the show */ | ||
public readonly readonlyProperty: string = 'wazoo'; |
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.
YaS!
Adds the necessary code to detect and forward module-level stability
indications to the assembly, so it can be used by downstream languages.
This effectively removes the
markdown
attribute from theAssembly
infavor of using the
docs
attribute.Also, renders a
package-info.json
file for packages that havedocumentation (a
README.md
file, deprecation notice, or stabilityindication).
Implements awslabs/cdk-ops#367