Repository navigation
Speed up public SDK declaration generation with the installed native compiler - #6259
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Public SDK declaration generation ran the JavaScript TypeScript emitter inside Rollup over roughly 200 reachable workspace sources. This serial stage sits inside the bb-app build used by packaging CI. Paired CI measurements put it at 13.9 seconds on Linux and 9.0 seconds on macOS on average.
What changed
On supported Linux and Apple Silicon platforms, use the already installed native TypeScript compiler (
tsrs) to emit the reachable workspace declarations into a temporary directory, then bundle those declarations with the existing Rollup declaration bundler. Preserve workspace package resolution and external dependencies. Compiler errors fail the build and temporary files are removed on success or failure.Windows, Intel macOS, and unsupported architectures retain the existing JavaScript emitter. No dependencies, caches, shards, runtime behavior, or public SDK API are intentionally changed. This does change how the published SDK declaration artifact is generated; its textual declaration ordering can differ.
How you verified
49a82607fcc1b9fc5b81f48d7c1fca2b05477efd678044bc7a790e8139c0be77).433773655484fb6a54994b25f74b88e89a05b999, including Linux/macOS tarball packaging, Linux AppImage lifecycle, Windows app tarball and desktop smoke checks, and all selected package tests.pnpm exec turbo run typecheck test --filter=bb-app: all 216 tests in 23 files passed. Formatting, lint, and diff checks passed. Independent review covered declaration compatibility, workspace resolution, cleanup and platform routing.