Skip to content

fix(build): build workspaces in dependency order so a clean checkout builds - #12

Merged
Kidkender merged 2 commits into
mainfrom
fix/build
Nov 13, 2026
Merged

Kidkender merged 2 commits into
mainfrom
fix/build

Conversation

@Kidkender

@Kidkender Kidkender commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

CI on main has failed since at least 2026-10-15: npm run build --workspaces builds alphabetically, so on a clean checkout aql is compiled before protocol has a dist/ and tsc cannot resolve it. Merge this first — the other open PRs need it for a green build.

Changes

  • scripts/build-workspaces.mjs builds each workspace after the workspaces it depends on (dependencies / peerDependencies hard, devDependencies soft — dropped only to get past a cycle). The root build script runs it.

  • explainer: exclude src/__tests__ and src/benchmark from the tsc build. They are already left out of the published package, and compiling them made explainer need scorer (scorer → llm-client → prompt-builder → explainer).

  • nestjs-parser: declare laravel-parser and springboot-parser as devDependencies; its cross-framework tests import them.

  • lsp: keep @kidkender/archmind-analysis external. Bundling it pulled in go-parser, whose tree-sitter-go native module esbuild cannot bundle and which needs tree-sitter 0.25 while lsp runs 0.21.

  • go-parser: findGoFiles returns /-separated paths on every OS (the scanner tests failed on Windows); the mcp-server cache test looks files up the same way.

  • retrieval, nestjs-parser, mcp-server: maxWorkers: 50 (one Jest process per test file). Once the build passed on CI, retrieval's regression and cross-framework suites failed every run: their tests load the tree-sitter parsers, whose module-level parser breaks when Jest reuses a worker across files, and the GitHub runner gives Jest few workers. Same change as in fix: explainer FormRequest semantics, NestJS ir:wraps, silent Laravel pass errors, flaky test workers #13, so the two merge cleanly.

Verified

  • Clean worktree: npm ci, npm run build (22 workspaces), npm test — all pass on Windows.
  • CI on this branch: green (build + all tests, Linux).

…builds

CI on main has failed since at least 2026-10-15: `npm run build --workspaces`
builds alphabetically, so on a fresh checkout `aql` is compiled before
`protocol` has a dist/ and tsc cannot resolve it.

- scripts/build-workspaces.mjs builds each workspace after the workspaces it
  depends on (dependencies/peerDependencies hard, devDependencies soft — dropped
  only to get past a cycle); the root `build` script runs it.
- explainer: exclude src/__tests__ and src/benchmark from the tsc build. They
  are already left out of the published package, and compiling them made
  explainer need scorer (scorer -> llm-client -> prompt-builder -> explainer).
- nestjs-parser: declare laravel-parser and springboot-parser as
  devDependencies; its cross-framework tests import them.
- lsp: keep @kidkender/archmind-analysis external. Bundling it pulled in
  go-parser, whose tree-sitter-go native module esbuild cannot bundle and which
  needs tree-sitter 0.25 while lsp runs 0.21.
- go-parser: findGoFiles returns `/`-separated paths on every OS (the scanner
  tests failed on Windows); the mcp-server cache test looks files up the same way.

Verified on a clean worktree: npm ci, build (22 workspaces), npm test all pass.
…sers

retrieval, nestjs-parser and mcp-server load the tree-sitter parsers, whose
module-level parser fails when Jest reuses a worker process across test files.
On the GitHub runner Jest has few workers, so retrieval's regression and
cross-framework suites failed every run once the build itself was fixed.
maxWorkers 50 gives each file its own process, as laravel-parser already does.
Same change as in fix/minor-issues, so both merge cleanly.
@Kidkender
Kidkender merged commit d7ef077 into main Nov 13, 2026
1 check passed
@Kidkender
Kidkender deleted the fix/build branch November 13, 2026 04:45
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.

1 participant