Repository navigation
fix(build): ignore target dirs when watching guest dependencies - #3026
Merged
Merged
Conversation
fakedev9999
reviewed
Oct 23, 2026
Contributor
|
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
sp1-buildemitscargo:rerun-if-changedfor every path dependency of a guest program. Cargo scans those directories recursively.crates/verifiercontainsguest-verify-programs/target, andcrates/test-artifactscontains the other guest programs'target/directories. Every guest build writes to these directories, sotest-artifactswas always dirty. Everycargo testthen recompiled it and 7 crates that depend on it (sp1-core-machine,sp1-prover,sp1-sdk, …).This change keeps watching each dependency directory, but skips
target/directories and the program's own target directory, even before it exists. A directory is emitted as one path when nothing inside it is skipped.It also removes the
SP1_SKIP_PROGRAM_BUILDworkaround from.oss-scanner/Dockerfile. That cuts the image build from 10.6 to 6.8 minutes, so it should fit in the OSS Scanner CI's 40-minute limit (anthropics/oss-scanner#1032).Test plan
cargo test -p sp1-build paths_excludingcargo build --release -p test-artifactstwice: second build isFresh(wasDirty: the file crates/verifier has changed)crates/verifier/src/lib.rs,crates/test-artifacts/programs/fibonacci/src/main.rsorcrates/zkvm/entrypoint/src/lib.rsstill rebuildstest-artifacts.oss-scanner/Dockerfilefrom a fresh clone: offlinecargo sp1-test --no-runis a no-op on the first run, andtest_fibonacci_prove_simplepasses with 2 CPUs and 8 GBcargo fmt --all -- --check,cargo clippy -p sp1-build --all-targets --all-features🤖 Generated with Claude Code