Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Oct 22, 2025

When new a tool is using jsii-reflect to read a jsii assembly, it must declare what JSII features it supports. If the assembly uses new features that the tool doesn't support yet, the load will fail.

However, jsii-reflect itself must also support those features, so the set of features that the tool declares must be a subset of the set of features that jsii-reflect itself supports.

This used to be checked dynamically, but that is easy to get wrong. We can lift this information into the TypeScript type system, so that it becomes a type error to call jsii-reflect with features that it doesn't know about yet.


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

When new a tool is using `jsii-reflect` to read a jsii assembly, it must
declare what JSII features it supports. If the assembly uses new features
that the tool doesn't support yet, the load will fail.

However, `jsii-reflect` *itself* must also support those features, so
the set of features that the tool declares must be a subset of the set
of features that `jsii-reflect` itself supports.

This used to be checked dynamically, but that is easy to get wrong. We
can lift this information into the TypeScript type system, so that
it becomes a type error to call `jsii-reflect` with features that
it doesn't know about yet.
@rix0rrr rix0rrr requested a review from a team October 22, 2025 14:11
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Oct 22, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 22, 2025

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Oct 22, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 22, 2025

Merging (with squash)...

@mergify mergify bot added the queued label Oct 22, 2025
@mergify mergify bot merged commit 17bf498 into main Oct 22, 2025
40 checks passed
@mergify mergify bot deleted the huijbers/statically-guarantee-subset branch October 22, 2025 14:47
@mergify mergify bot removed pr/ready-to-merge This PR is ready to be merged. queued labels Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants