ci(quasar): support multi-program projects; re-enable cross-program-invocation/quasar#55
Merged
Merged
Conversation
…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.
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.
Summary
basics/cross-program-invocation/quasarwas excluded because it contains two separate Quasar programs (hand/andlever/) instead of a single program with a rootQuasar.toml. The Quasar workflow ranquasar build && cargo testdirectly in the project dir, butquasar buildrequires./src/lib.rsand is single-program only, so it failed.The example itself is fine (builds + tests pass locally —
handcallslevervia CPI and its test loads lever's compiled.so). The only problem was CI integration.Fix (workflow only — example unchanged)
Teach
quasar.yml'sbuild_and_testto detect a project's program directories:Quasar.toml, use it as-is (unchanged behavior for all 46 existing quasar examples);Quasar.toml(the CPI example'shand/+lever/).It then builds all of a project's programs first, then tests all of them — so
hand's test, which loadslever's freshly-built.soto 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, andcargo testpasses for both (hand3 tests,lever4).quasar.ymlvalidated 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