Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/dylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Prepare prebuilt Dylint tools and driver
timeout-minutes: 10
run: |
soldr dylint prepare 2>&1 | tee "$RUNNER_TEMP/dylint-prepare.log"
env -u RUSTUP_TOOLCHAIN soldr dylint prepare 2>&1 | tee "$RUNNER_TEMP/dylint-prepare.log"
# Library UI tests invoke soldr cargo test separately, so preserve
# the prebuilt dylint-link directory for their linker config.
sed -n 's/^soldr: dylint prepare: tool bin dir //p' "$RUNNER_TEMP/dylint-prepare.log" >> "$GITHUB_PATH"
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
# every platform-gated source path on each run.
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }--cfg fbuild_platform_boundary_observation_run_${GITHUB_RUN_ID}"
rm -f "$FBUILD_PLATFORM_BOUNDARY_OBSERVED"
soldr dylint --all -- --workspace --all-targets
env -u RUSTUP_TOOLCHAIN soldr dylint --all -- --workspace --all-targets
- name: Compare scanner with actual Dylint observations
run: uv run --no-project python ci/enforce_platform_boundary.py --dylint-observed target/platform-boundary-dylint-observed.tsv --print-totals

Expand Down
3 changes: 3 additions & 0 deletions ci/run_dylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def main(argv: list[str] | None = None) -> int:
if not os.environ.get("CARGO_HOME"):
os.environ["CARGO_HOME"] = str(Path.home() / ".cargo")
env = os.environ.copy()
# setup-soldr pins the workspace's stable toolchain in this variable.
# Dylint must resolve the separate nightly from its library manifests.
env.pop("RUSTUP_TOOLCHAIN", None)
# The ordinary local check can reuse Cargo fingerprints. CI's native OS
# legs force fresh traversal and compare the independent observation ledger.
env.pop("FBUILD_PLATFORM_BOUNDARY_OBSERVED", None)
Expand Down
3 changes: 2 additions & 1 deletion ci/test_run_dylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ def test_prepares_prebuilt_tools_and_lints_workspace(self) -> None:
commands: list[list[str]] = []

def run(args: list[str], **_kwargs):
self.assertNotIn("RUSTUP_TOOLCHAIN", _kwargs["env"])
commands.append(args)
return subprocess.CompletedProcess(args, 0)

with (
patch.dict(os.environ, {"CARGO_HOME": "", "FBUILD_PLATFORM_BOUNDARY_OBSERVED": "stale"}),
patch.dict(os.environ, {"CARGO_HOME": "", "FBUILD_PLATFORM_BOUNDARY_OBSERVED": "stale", "RUSTUP_TOOLCHAIN": "1.95.0"}),
patch.object(Path, "home", return_value=Path("/tmp/fbuild-test-home")),
patch.object(run_dylint, "activate"),
patch.object(run_dylint.subprocess, "run", side_effect=run),
Expand Down
Loading