Skip to content
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

Merged
merged 9 commits into from
Jun 5, 2019
Merged

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Jun 3, 2019

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.

Also, renders a package-info.json file for packages that have
documentation (a README.md file, deprecation notice, or stability
indication).

Implements awslabs/cdk-ops#367

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).
@RomainMuller RomainMuller requested a review from a team as a code owner June 3, 2019 16:44
@RomainMuller RomainMuller self-assigned this Jun 3, 2019
packages/jsii-calc/package.json Show resolved Hide resolved
packages/jsii-pacmak/lib/targets/java.ts Show resolved Hide resolved
packages/jsii-calc/test/assembly.jsii Outdated Show resolved Hide resolved
packages/jsii-pacmak/lib/targets/sphinx.ts Outdated Show resolved Hide resolved
packages/jsii-pacmak/lib/targets/java.ts Outdated Show resolved Hide resolved
packages/jsii-spec/lib/spec.ts Outdated 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
Copy link
Contributor

@eladb eladb left a 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 :-(

packages/jsii/lib/project-info.ts Show resolved Hide resolved
packages/jsii/lib/assembler.ts Outdated Show resolved Hide resolved
packages/jsii/lib/assembler.ts Show resolved Hide resolved
packages/jsii-spec/lib/spec.ts Show resolved Hide resolved
packages/jsii-pacmak/lib/targets/java.ts Outdated Show resolved Hide resolved
packages/jsii-pacmak/lib/targets/java.ts Show resolved Hide resolved
packages/jsii/lib/assembler.ts Outdated Show resolved Hide resolved
@RomainMuller RomainMuller requested a review from costleya as a code owner June 4, 2019 14:04
@RomainMuller RomainMuller requested a review from eladb June 4, 2019 15:49
Copy link
Contributor

@eladb eladb left a 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:

  1. Stability/deprecation at the package level
  2. Stability/deprecation at the class + method + property + enum + enum-member levels

We need to get this right the first time.

/** @deprecated for the show */
export class DeprecatedClass {
/** @deprecated for the show */
public readonly readonlyProperty: string = 'wazoo';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YaS!

packages/jsii-calc/lib/stability.ts Outdated Show resolved Hide resolved
@RomainMuller RomainMuller merged commit efae447 into master Jun 5, 2019
@RomainMuller RomainMuller deleted the rmuller/api-stability branch June 5, 2019 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants