Skip to content

feat(jsii-diff): also check stability transitions#592

Merged
rix0rrr merged 1 commit intomasterfrom
huijbers/diff-stability
Jul 12, 2019
Merged

feat(jsii-diff): also check stability transitions#592
rix0rrr merged 1 commit intomasterfrom
huijbers/diff-stability

Conversation

@rix0rrr
Copy link
Copy Markdown
Collaborator

@rix0rrr rix0rrr commented Jul 9, 2019

Once an API element is marked @stable, it is not allowed to
retract that stability guarantee anymore by changing it back to
@experimental. This is now verified by jsii-diff.

This was always intended to be checked, but was missed as an oversight
in the initial implementation.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Once an API element is marked @stable, it is not allowed to
retract that stability guarantee anymore by changing it back to
@experimental. This is now verified by `jsii-diff`.

This was always intended to be checked, but was missed as an oversight
in the initial implementation.
@rix0rrr rix0rrr requested a review from a team as a code owner July 9, 2019 14:04
// Nothing to do in these cases
if (original.docs.stability === undefined || original.docs.stability === updated.docs.stability) { return; }

// Not allowed to disavow stability
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is that the case where stability is inherited? What happens if you change the stability of the oRent module/type, is it inherited by the Jsii compiler! Can we evened even have an undefined stability for an api?

Also, wasn’t this what we wanted to do for the CFN layer?

Copy link
Copy Markdown
Collaborator Author

@rix0rrr rix0rrr Jul 12, 2019

Choose a reason for hiding this comment

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

Inheritance has already been calculated at this level. I thought for the CFN layer we introduce a new explicit stability level (imported), not (nothing).

@rix0rrr rix0rrr merged commit 15f77b5 into master Jul 12, 2019
@rix0rrr rix0rrr deleted the huijbers/diff-stability branch July 12, 2019 08:53
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.

3 participants