Skip to content

[IMP] build: skip sibling type builds when building owl.d.ts#1869

Merged
mcm-odoo merged 1 commit into
masterfrom
master-build-speed-ged
Apr 23, 2026
Merged

[IMP] build: skip sibling type builds when building owl.d.ts#1869
mcm-odoo merged 1 commit into
masterfrom
master-build-speed-ged

Conversation

@ged-odoo
Copy link
Copy Markdown
Contributor

The root build:types ran dts-bundle-generator four times: once per sibling package (owl-core, owl-compiler, owl-runtime), then once on the umbrella owl package. Only @odoo/owl is published, and the umbrella bundle inlines the sibling types anyway, so the three sibling passes were wasted work — ~22s of a ~31s wall clock.

Point the umbrella's dts-bundle-generator at sibling src via tsconfig paths (the same mapping tsconfig.tests.json already uses) and drop the sibling build:types steps from the root script. To keep the generated owl.d.ts byte-identical, promote four internal aliases from owl-core/types.ts (Constructor, LiteralTypes, ResolveOptionalEntries, UnionToIntersection) to exports — without them dts-bundle-generator inlines their expansions instead of keeping the named references.

build:types now runs in ~9s.

The root build:types ran dts-bundle-generator four times: once per
sibling package (owl-core, owl-compiler, owl-runtime), then once on
the umbrella owl package. Only @odoo/owl is published, and the
umbrella bundle inlines the sibling types anyway, so the three
sibling passes were wasted work — ~22s of a ~31s wall clock.

Point the umbrella's dts-bundle-generator at sibling src via tsconfig
paths (the same mapping tsconfig.tests.json already uses) and drop
the sibling build:types steps from the root script. To keep the
generated owl.d.ts byte-identical, promote four internal aliases
from owl-core/types.ts (Constructor, LiteralTypes,
ResolveOptionalEntries, UnionToIntersection) to exports — without
them dts-bundle-generator inlines their expansions instead of
keeping the named references.

build:types now runs in ~9s.
@mcm-odoo mcm-odoo merged commit 30d0615 into master Apr 23, 2026
2 checks passed
@mcm-odoo mcm-odoo deleted the master-build-speed-ged branch April 23, 2026 07:24
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.

2 participants