fix(build): build every dist-types a filtered mobile typecheck needs
Merged
SA
2mo ago+5+5+0123456789-1-1-0123456789
Summary
Mobile's typecheck reads the host-service router types from generated dist-types. There were two gaps in how those get built.
build:typesonly depended on^build. Host-service emitted its declarations, but port-scanner, pty-daemon and workspace-fs never built theirs. Theirexports.typespointed at missing files, so mobile typechecked their Node source files instead (Property 'unref' does not exist on type 'number'). CI passes only because it checks the whole repo, and desktop's typecheck happens to build those packages' types first.bunx turbo typecheck --filter=@superset/mobilefrom a clean checkout fails every time. Fix:dependsOn: ["^build", "^build:types"].build:typesshared the base config's incrementaltsbuildinfo. Once a build had written it, a rebuild afterdist-typeswent missing emitted 0 files, becausetsctrusted the build-info file. Everything in the missing declarations then resolved toany(ChangesetFile,HostWorkspaceItem). That's how my main checkout ended up with 324 of 507 host-service.d.tsfiles. Fix:"incremental": falsein the fourtsconfig.types.jsonfiles.build:typesis turbo-cached, so this costs little.
Test plan
- Clean
dist-typesand.cachein all four packages, main's config:turbo typecheck --filter=@superset/mobilefails (2/3 tasks, three packages never built) - Same with this change: 6/6 pass
- Host-service
build:types, deletedist-types,build:typesagain: main's config emits 0.d.ts, this change emits 507 -
bun run lint
Summary by cubic
Fixes turbo typecheck --filter=@superset/mobile failing from a clean checkout because the dist-types it typechecks against were never built or silently went stale.
build:typesnow also depends on^build:types, so host-service, port-scanner, pty-daemon, and workspace-fs all emit their declarations before mobile typechecks.- Declaration builds are no longer incremental, so a rebuild after
dist-typesis deleted still emits all.d.tsfiles. The cost is negligible becausebuild:typesis turbo-cached.
Summary by CodeRabbit
- Chores
- Updated build settings across several components. Type-generation tasks now follow upstream build and type-generation tasks in the build pipeline, keeping these tasks aligned across the project. These changes affect the development and build process; no user-facing features or behavior have changed.