-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rosetta): generate rosetta tablets next to each assembly (#3223)
Rather than write our Rosetta translations to a single tablet file which we throw away at the end of the build, `rosetta extract` will now write translations to individual `.jsii.tabl.json` files, located next to the assemblies themselves. Construct library authors can publish these to NPM, so that downstream tools that process JSII modules for documentation have access to the translations and don't need to redo the work (especially relevant for large libraries with lots of examples, where otherwise a lot of CPU time would be wasted). The "single output tablet" can still be used, but is now intended to be used as a cache to speed up repeated runs of `rosetta extract` (to skip translating unchanged snippets). Add options to trim the cache files down so they won't grow without bounds. This PR also contains a bugfix: `infuse` did not re-inject a copied snippet's metadata into the assembly's `exampleMetadata` field. This is strictly speaking not a problem as long as the tablet always stays with the assembly, but better to fix anyway. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information
Showing
14 changed files
with
675 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.