Repository navigation
test(locallibrary): build the CLI's test helpers only with the features that use them - #343
Merged
Merged
Conversation
…es that use them with_directory and typed_ahead are only called from tests behind the account feature, so --no-default-features builds, and the scheduled feature-powerset run, failed clippy on them as dead code. Each now has its callers' cfg.
bnb
approved these changes
Oct 30, 2026
botandbang
enabled auto-merge
October 30, 2026 23:26
Contributor
Author
|
Closing and reopening so CI reruns with the destinations test fix (#344) now on main. Branch unchanged. |
auto-merge was automatically disabled
October 31, 2026 00:29
Pull request was closed
botandbang
enabled auto-merge
October 31, 2026 00:30
auto-merge was automatically disabled
October 31, 2026 01:01
Pull request was closed
botandbang
enabled auto-merge
October 31, 2026 01:01
Rust coverageFrom run 639. Both are held to the thresholds in .cargo/config.toml.
|
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 and why
cargo clippy -p locallibrary-cli --no-default-features --all-targets -- -D warningsfailed onwith_directoryandtyped_aheadinapps/locallibrary/tests/it/support.rsbeing unused: every caller is behindfeature = "account". The scheduled feature-powerset job (locallibrary-scheduled.yml) runs that kind of build.Changed:
with_directorygets#[cfg(feature = "account")]andtyped_ahead#[cfg(all(unix, feature = "account"))], matching their callers.terminal(), whichtyped_aheaduses, has other callers and stays as it is.How it was tested
cargo hack clippy -p locallibrary-cli --feature-powerset --all-targets --locked -- -D warnings: all 13 combinations pass; with the gates removed,--no-default-featuresfails as reported.cargo fmt --all --check, default-feature clippy.Checklist