Declare build-cli's dependency on @galaxy-foundry/foundry#364
Merged
Conversation
build-cli imports `@galaxy-foundry/foundry/meta` (validate.ts) and `@galaxy-foundry/foundry` (cast-mold.ts) but never declared the package as a workspace dependency. pnpm orders the recursive build topologically from declared deps, so nothing forced foundry to build before build-cli — it worked only by scheduling luck. #359 added vitest to build-cli, which reshuffled that scheduling and surfaced the latent bug: build-cli's tsc ran before foundry/dist existed, failing with TS2307: Cannot find module '@galaxy-foundry/foundry/meta' breaking the packages-build step on main and the deploy that depends on it. Declare the dep (matching note-schema / planemo-cli-meta) so the ordering is guaranteed. Verified with a from-clean `rm -rf packages/*/dist && packages-build`: foundry now builds before build-cli. No cycle — foundry does not depend on build-cli. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description written by Claude (AI assistant) on behalf of @jmchilton.
Symptom
packages-buildfailed onmain(run 29770964925), breaking the deploy:Root cause
build-cliimports@galaxy-foundry/foundry—.../foundry/metainvalidate.ts, the package root incast-mold.ts— but never declared it as a workspace dependency. pnpm builds the workspace in topological order derived from declared deps, so nothing forcedfoundryto build beforebuild-cli. It happened to work by scheduling luck.#359 added
vitesttobuild-cli, which reshuffled the parallel build scheduling.build-cli'stscthen started beforefoundry/distexisted, and the./metasubpath export (./dist/meta/index.d.ts) couldn't resolve — hence both errors (the second is fallout:foundryCliMetabecameany).This is latent, not introduced by #359 — the missing declaration has been there since
foundrywas packaged for npm (bf3485b). #359 just perturbed the ordering enough to expose it.Fix
Declare
"@galaxy-foundry/foundry": "workspace:*"inbuild-cli's dependencies, matching hownote-schemaandplanemo-cli-metaare already declared. No cycle —foundrydoes not depend onbuild-cli.Verification
rm -rf packages/*/dist && npm run packages-build) the failure reproduces onmainand is gone with this change;foundry build: Donenow precedesbuild-cli build: Done.packages-typecheckclean across all 6 packages.packages-test: 152 tests pass (build-cli 9, foundry 43, summarize-nextflow 87, note-schema 5, planemo-cli-meta 3, planemo-test-report-schema 5).link:../foundryentry.Follow-up worth considering (not in this PR)
The build passing depended on scheduling luck for a while. A from-clean
rm -rf packages/*/distbuild in CI — orpnpm -r execdependency-graph validation — would catch a missing workspace-dep declaration deterministically instead of waiting for an unrelated change to reshuffle ordering. Happy to open an issue.🤖 Generated with Claude Code