Repository navigation
test(cli): build the command-line tests only with the cli feature - #4
Merged
adammharris merged 1 commit intoNov 3, 2026
Merged
Conversation
tests/cli.rs runs the fig-schema binary, which needs the cli feature, but as an auto-discovered test target it compiled without it, so `cargo test --no-default-features` failed all 33 tests on a binary cargo had not built. Declaring it a [[test]] with required-features = ["cli"], as the binary is, skips it there; default-feature runs are unchanged. Closes docs/tasks/cli-tests-run-without-the-cli.md.
adammharris
deleted the
agent/backlog-fix-cli-tests-run-without-the-cli
branch
November 3, 2026 04:43
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.
What changed
Cargo.tomldeclarestests/cli.rsas a[[test]]namedcliwithrequired-features = ["cli"], the same requirement thefig-schemabinary has. The task file is markeddonewith a Status section.Why
tests/cli.rsruns the binary throughenv!("CARGO_BIN_EXE_fig-schema"). As an auto-discovered test target it compiled without theclifeature, but the binary did not, socargo test --no-default-features(the configuration prov, flower and twig-export build) failed all 33 CLI tests withNotFound. The library's own tests were passing all along; only the test setup was wrong.Closes
docs/tasks/cli-tests-run-without-the-cli.md. Whether CI should also get a job that runs the library without default features is still the separate decision the task leaves open.Verification
cargo test --no-default-features --no-fail-fastgavetests/cli.rs: 0 passed, 33 failed.cliis skipped).cargo testwith default features still runs all 33 CLI tests, and they pass.ship ci: all 5 jobs passed (fmt, clippy-D warnings, test, doc, msrv).