Skip to content

[code-infra] Port codebase to use tsgo#48616

Merged
brijeshb42 merged 4 commits into
mui:masterfrom
brijeshb42:tsgo
Jun 9, 2026
Merged

[code-infra] Port codebase to use tsgo#48616
brijeshb42 merged 4 commits into
mui:masterfrom
brijeshb42:tsgo

Conversation

@brijeshb42

@brijeshb42 brijeshb42 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

tsgo migration — test_types CI: summary

Root cause: tsgo is native Go, so the old --max-old-space-size=3072 cap is a no-op. The docs typecheck needs ~7.8 GB under tsgo (vs ~3 GB under tsc), overflowing the 6 GB box. GOMEMLIMIT can't help (live memory, not garbage). Only xlarge.gen2 (16 GB) fits.

Fix: test_types + test_types_nextresource_class: xlarge.gen2; removed dead NODE_OPTIONS. Concurrency stays 2.

Setup Box Time Credits/run vs tsc
tsc (avg from insights) medium+.gen2 8m 33s 153.9
tsgo, conc 1 (1 run) xlarge.gen2 3m 17s 157.6 +2.4%
tsgo, conc 2 (1 run) xlarge.gen2 2m 21s 112.8 −27%
tsgo, conc 3 xlarge.gen2 2m11s ~105 -31.9%
tsgo, conc 4 xlarge.gen2 2m24s ~115 -25.1%

Result: green, peak 11.2 GB / 16 GB (4.8 GB headroom) → 3.9× faster, ~32% cheaper.

@brijeshb42 brijeshb42 added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Jun 3, 2026
@brijeshb42 brijeshb42 requested a review from Copilot June 3, 2026 10:21
@code-infra-dashboard

code-infra-dashboard Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-48616--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

Copilot AI left a comment

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.

Pull request overview

Ports the repository’s TypeScript type-checking/build scripts from tsc to tsgo (via TypeScript native preview) to align the codebase with the new compiler/tooling flow managed by code-infra.

Changes:

  • Switched many workspace typescript scripts (and module augmentation checks) from tsc to tsgo.
  • Updated code-infra build invocations to use --tsgo where applicable.
  • Added @typescript/native-preview to the root devDependencies and updated pnpm-lock.yaml accordingly, plus adjusted a few TS directive comment placements in type tests.

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/package.json Switches test workspace typecheck script to tsgo.
pnpm-lock.yaml Locks new @typescript/native-preview dependency graph and peer optional wiring.
packages/mui-utils/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-types/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-system/src/styled/styled.spec.ts Adjusts @ts-expect-error placement in a styled variants type test.
packages/mui-system/scripts/testModuleAugmentation.js Runs module augmentation checks with tsgo instead of tsc.
packages/mui-system/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-stylis-plugin-rtl/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-styled-engine/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-styled-engine-sc/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-private-theming/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-material/test/typescript/OverridableComponent.spec.tsx Moves @ts-expect-error directives within JSX attribute tests (one placement needs correction).
packages/mui-material/src/styles/styled.spec.tsx Adjusts @ts-expect-error placement for a styled variants misuse test.
packages/mui-material/src/CardHeader/CardHeader.spec.tsx Refines @ts-expect-error placements inside slotProps typing tests.
packages/mui-material/scripts/testModuleAugmentation.js Runs module augmentation checks with tsgo instead of tsc.
packages/mui-material/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-material-pigment-css/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-material-nextjs/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-lab/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages/mui-icons-material/package.json Switches typescript script to tsgo.
packages-internal/scripts/package.json Switches typescript typecheck script from tsc to tsgo.
packages-internal/docs-utils/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages-internal/core-docs/src/AppLayout/navigation/AppNavDrawerItem.tsx Moves a TS ignore directive into the JSX props list.
packages-internal/core-docs/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages-internal/api-docs-builder/package.json Uses code-infra build --tsgo and switches typescript script to tsgo.
packages-internal/api-docs-builder-core/package.json Switches typescript script to tsgo.
package.json Adds @typescript/native-preview devDependency to provide tsgo.
docs/package.json Switches docs typecheck scripts to tsgo.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/mui-system/src/styled/styled.spec.ts Outdated
Comment thread packages/mui-material/test/typescript/OverridableComponent.spec.tsx
@brijeshb42 brijeshb42 force-pushed the tsgo branch 12 times, most recently from 9075108 to 1508343 Compare June 3, 2026 13:41
@brijeshb42 brijeshb42 requested a review from a team June 3, 2026 13:56
@brijeshb42 brijeshb42 force-pushed the tsgo branch 6 times, most recently from f42b302 to eed6c99 Compare June 4, 2026 05:03

@Janpot Janpot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not 100% sure all the // @ts-expect-error are equivalent, but seems fine. We should add a lint rule that makes an explanation mandatory on each // @ts-expect-error

@brijeshb42 brijeshb42 force-pushed the tsgo branch 2 times, most recently from 593aacf to 1f92d6d Compare June 8, 2026 10:49
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 8, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 8, 2026
@brijeshb42 brijeshb42 merged commit ef607d7 into mui:master Jun 9, 2026
22 checks passed
@brijeshb42 brijeshb42 deleted the tsgo branch June 9, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants