Host build fails: tsdown workspace cannot find entry lib/types/{index,invariant,startup}.js #6089
Replies: 2 comments 2 replies
|
Confirmed against the current source (
So Two things worth settling before a fix:
Disclosure of scope: I verified the configuration and the missing directory statically on |
|
Upstream fix is now proposed: rolldown/tsdown#1069 —
Evidence: in tsdown's own suite the case added in Version boundary: this repository pins |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Environment
deepseek-ai/deepseek-harness(current master)Repro
Expected
Host lib build completes.
Actual
The Host pass fails during tsdown's workspace resolution:
Root cause
The repo root
@deepseek-ai/dsh-rootis a solution-only aggregate (tsconfig.host.jsonsetsnoEmit: true) — it has nolib/typesoutput. But the currentworkspacearray (['vendor/*', 'packages/*/*', 'apps/cli', 'apps/desktop', 'apps/desktop-host']) is applied as tsdown'sincludeglob, so every package.json under those globs enters the workspace. Root config'sentry(lib/types/{index,invariant,startup}.js) is then merged (viamergeConfig) into each package; packages that neither declare their owntsdown.config.tsnor own a tsc-emittedlib/typescannot resolve that inherited entry and throwCannot find entry.Suggested fix
Replace the hand-written whitelist with tsdown's
autodiscovery plus a runtime-probedexcludelist: probe every package.json (excludingnode_modules/dist/test/tmp) and exclude any package that has neithertsdown.config.tsnorlib/types. Restate tsdown's default exclusions alongside the probe, since tsdown replaces them wholesale whenexcludeis supplied (otherwise glob recurses intonode_modulesand the build hangs).Patch attached (
git am-able):PTAL whether this direction is acceptable. Happy to iterate.
Patch
All reactions