Skip to content

ci(quasar): support multi-program projects; re-enable cross-program-invocation/quasar#55

Merged
mikemaccana merged 1 commit into
mainfrom
claude/cpi-quasar-fix
Jun 5, 2026
Merged

ci(quasar): support multi-program projects; re-enable cross-program-invocation/quasar#55
mikemaccana merged 1 commit into
mainfrom
claude/cpi-quasar-fix

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Summary

basics/cross-program-invocation/quasar was excluded because it contains two separate Quasar programs (hand/ and lever/) instead of a single program with a root Quasar.toml. The Quasar workflow ran quasar build && cargo test directly in the project dir, but quasar build requires ./src/lib.rs and is single-program only, so it failed.

The example itself is fine (builds + tests pass locally — hand calls lever via CPI and its test loads lever's compiled .so). The only problem was CI integration.

Fix (workflow only — example unchanged)

Teach quasar.yml's build_and_test to detect a project's program directories:

  • if the project dir has a Quasar.toml, use it as-is (unchanged behavior for all 46 existing quasar examples);
  • otherwise, use its immediate subdirectories that each contain a Quasar.toml (the CPI example's hand/ + lever/).

It then builds all of a project's programs first, then tests all of them — so hand's test, which loads lever's freshly-built .so to exercise the CPI, finds it regardless of order. (Order matters because the 47 quasar projects shard across parallel jobs, so cross-project build order can't be relied on; building both before testing within the one project makes it deterministic.)

Then drop the example from .github/.ghaignore.

Verification

Locally with the quasar CLI (v0.0.0) on the CI toolchain, simulating the new workflow logic against the project: detects hand + lever, builds both, and cargo test passes for both (hand 3 tests, lever 4). quasar.yml validated as well-formed YAML; confirmed normal single-program projects still resolve to the . path (no behavior change).

https://claude.ai/code/session_013dpnF6uSGWXjkJJZseqzcP


Generated by Claude Code

…nvocation/quasar

The CPI quasar example contains two separate Quasar programs (hand/ and lever/)
rather than a single program with a root Quasar.toml, so the Quasar workflow —
which ran `quasar build && cargo test` directly in the project dir — failed
(quasar build requires ./src/lib.rs and is single-program only), and the
example was excluded in .ghaignore.

Teach the workflow's build_and_test to detect a project's program directories:
the project itself when it has a Quasar.toml (unchanged for every existing
example), otherwise its immediate subdirectories that each contain one. It now
builds all of a project's programs first, then tests them all — so hand's test,
which loads lever's freshly-built .so to exercise the CPI, finds it regardless
of directory order (the 47 quasar projects shard across parallel jobs, so
cross-project build order can't be relied on).

Verified locally with the quasar CLI: both programs build and all tests pass
(hand 3, lever 4). Drop the example from .github/.ghaignore.
@mikemaccana mikemaccana merged commit 3db55d3 into main Jun 5, 2026
29 checks passed
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