Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions rs/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,10 @@ _select $FILES:
' <<< "$metadata")

# A crate has to be rebuilt when anything it depends on changed, so walk the
# edges backwards until the selection stops growing.
selected=$(awk -v seeds="$seeds" '
BEGIN { split(seeds, s, "\n"); for (i in s) want[s[i]] = 1 }
# edges backwards until the selection stops growing. The seeds go through the
# environment because BSD awk (macOS) rejects a newline in a `-v` value.
selected=$(SEEDS="$seeds" awk '
BEGIN { split(ENVIRON["SEEDS"], s, "\n"); for (i in s) want[s[i]] = 1 }
{ pkg[NR] = $1; dep[NR] = $2 }
END {
do {
Expand Down Expand Up @@ -409,6 +410,11 @@ _select-test:
fail "a moq-relay diff must not drive the media contract: $(just rs _names "$relay")"
fi

# Several seeds select all of them, not just the first.
pair=$(just rs _names "$(just rs _select $'rs/moq-auth/src/lib.rs\nrs/moq-hls/src/lib.rs')")
grep -qw moq-auth <<< "$pair" && grep -qw moq-hls <<< "$pair" \
|| fail "a two-crate diff must select both: $pair"

# A crate nested inside another crate's directory is covered by its parent's
# seed. Selecting it directly would compile libFuzzer on every moq-net diff,
# and its directory name is not its crate name, so it would also mis-report.
Expand Down
Loading