Repository navigation
Conversation
… Rust-only repositories Plain cargo test never reads rustfmt/clippy/deny/typos/release-tool configuration or GitHub's templates, CODEOWNERS, FUNDING, Dependabot and Renovate files. At the repository root or a crate root, such a change now selects nothing instead of the full suite, unless a build script or Rust code that names such a file (or climbs out of its crate) may read it. Older cached profiles without the new reader list keep the full suite. Signed-off-by: FredApps <[email protected]>
|
#258 is merged (it brought in #232, #248, #250 and #254), along with #228-#231 and #233, so this branch now conflicts with Could you merge |
|
Thanks! The Rust-only gating and failing closed on older cached profiles both look right. One case is unsafe, though: programs that read these config files aren't counted as readers.
A local probe gave Suggested fix: count The PR also needs main merged in. There are conflicts in |
…aths Signed-off-by: FredApps <[email protected]> # Conflicts: # docs/using-diffci.md # src/repo/adapters/rust.ts # src/repo/adapters/types.ts # tests/repo/rust-integration.test.ts
A test that runs `cargo fmt --check`, `cargo clippy`, rustfmt, typos or pre-commit (through Command or xshell's cmd!) reads rustfmt.toml, clippy.toml and the like without naming them, so rustMetadataReaders stayed empty and a tool-config change selected no tests. Sources that compile or run programs are now metadata readers, which keeps the full suite for such changes. Signed-off-by: FredApps <[email protected]>
|
Thanks, agreed. I merged Merge conflicts:
The fix: I used your first suggestion. A source is a metadata reader if Tests: five bodies are added to the existing "tool configuration and GitHub metadata select nothing unless Rust code may read them" integration test:
Each must give Locally, As I noted on #256, bridge packages aren't counted as metadata readers yet, because that code lives in #256. Whichever PR lands second, I'll merge |
|
#256 is merged (d23a582), so this now conflicts with |
Part of #131 (non-code paths).
In a Rust repository, any changed file that isn't a Rust source, a modelled asset or documentation keeps the full suite ("Rust runtime inputs outside crate metadata…", or "Unknown changed file"). That includes files plain
cargo testnever reads, so a Renovate ordeny.tomltweak ran everything. This PR lets those select no tests, only where that's safe:rustfmt.toml,clippy.toml(with or without a dot),deny.toml,typosconfigs,committed.toml,release.toml,cliff.toml,taplo.toml,.pre-commit-config.yaml,codecov.yml,.editorconfig, markdownlint configs,CODEOWNERSand Renovate files..github/*.md,CODEOWNERS,FUNDING,dependabot,release,labeler,labels,stale,settings,codecov,configYAML, and Renovate..githubfiles (a workflow could run a script there),.cargo/config.toml,rust-toolchain(.toml),.gitattributes, test-tool configs (insta, nextest), and tool names outside a crate root, such as a UI-test fixture'sclippy.toml.rustMetadataReaders: every build script, every source that climbs out of its crate, and every source with a string literal naming a.githubpath, a TOML, YAML or JSON name or bare extension ("toml"in an extension check), or a dotfile. If there's any reader, these files keep the full suite. An older cached profile without the field also keeps it..editorconfigor.githubfiles.Test: "tool configuration and GitHub metadata select nothing unless Rust code may read them" in
rust-integration.test.ts. It covers the accepted paths, the paths that must stay full, an older cached profile, five kinds of reader code and a build script. One docs sentence is added.Locally, six Renovate- or
deny.toml-only commits from anstyle's history now get a SELECTIVE plan with no tests.Local checks: typecheck,
npm testwithDIFFCI_REQUIRE_CARGO=1(1168 pass), build,audit:boundary,agent:check. Hosted CI passed on this head.Merge order (#131 series: #232, #234, #248, #250, #252, #254, #256, #277, #258). These all edit the one-line Rust paragraph in
docs/using-diffci.md, and some also touchrust.ts/types.ts, so they conflict textually with each other. #258 already includes #232, #248, #250 and #254 with those conflicts resolved. The simplest path: merge #258 (GitHub marks those four as merged), then #234, #252, #256 and #277. After each one lands I mergemaininto the next and resolve the docs line. Merging them one at a time in number order works too, with the samemainmerge after each.