From 53242ae22e93ce3a8bc445d95f549ab258058551 Mon Sep 17 00:00:00 2001 From: zackees Date: Tue, 7 Jul 2026 12:14:31 -0700 Subject: [PATCH 1/2] fix: canonicalize compile cwd for cache paths --- crates/fbuild-core/src/path.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/crates/fbuild-core/src/path.rs b/crates/fbuild-core/src/path.rs index 53051410..1f0a26bc 100644 --- a/crates/fbuild-core/src/path.rs +++ b/crates/fbuild-core/src/path.rs @@ -387,7 +387,7 @@ pub fn path_arg_for_compile_cwd(path: &Path, cwd: &Path) -> String { path.to_path_buf() } else { let stable_path = canonicalize_lexical(path).unwrap_or_else(|| path.to_path_buf()); - let stable_cwd = strip_unc_prefix(cwd); + let stable_cwd = canonicalize_lexical(cwd).unwrap_or_else(|| strip_unc_prefix(cwd)); stable_path .strip_prefix(&stable_cwd) .map(|tail| tail.to_path_buf()) @@ -787,6 +787,21 @@ mod tests { assert_eq!(path_arg_for_compile_cwd(&source, &cwd), "src/main.cpp"); } + #[test] + #[cfg(unix)] + fn path_arg_for_compile_cwd_canonicalizes_symlinked_cwd() { + let tmp = tempfile::TempDir::new().unwrap(); + let real = tmp.path().join("real"); + let link = tmp.path().join("link"); + let cwd = link.join("project"); + let source = cwd.join("src/main.cpp"); + std::fs::create_dir_all(real.join("project/src")).unwrap(); + std::os::unix::fs::symlink(&real, &link).unwrap(); + std::fs::write(&source, "int main() { return 0; }\n").unwrap(); + + assert_eq!(path_arg_for_compile_cwd(&source, &cwd), "src/main.cpp"); + } + #[test] #[cfg(windows)] fn path_arg_for_compile_cwd_forces_forward_slashes_on_windows() { From ef5f5267fb69bbd192517d4ee4eb8997e0e8ca4f Mon Sep 17 00:00:00 2001 From: zackees Date: Tue, 7 Jul 2026 12:17:51 -0700 Subject: [PATCH 2/2] ci: pin latest soldr setup --- .github/workflows/acceptance-205.yml | 3 ++- .github/workflows/bench-205.yml | 6 ++++-- .github/workflows/check-macos.yml | 3 ++- .github/workflows/check-ubuntu.yml | 3 ++- .github/workflows/docs.yml | 3 ++- .github/workflows/dylint.yml | 3 ++- .github/workflows/fmt.yml | 3 ++- .github/workflows/msrv.yml | 3 ++- .github/workflows/release-auto.yml | 12 ++++++------ .github/workflows/template_build.yml | 3 ++- .github/workflows/template_native_build.yml | 12 ++++++------ .github/workflows/update-data.yml | 3 ++- ci/docker-mac-cross/Dockerfile | 4 ++-- ci/docker-profile/Dockerfile | 2 +- ci/publish.py | 2 +- 15 files changed, 38 insertions(+), 27 deletions(-) diff --git a/.github/workflows/acceptance-205.yml b/.github/workflows/acceptance-205.yml index 338313ed..ec9c93b2 100644 --- a/.github/workflows/acceptance-205.yml +++ b/.github/workflows/acceptance-205.yml @@ -52,8 +52,9 @@ jobs: - uses: actions/checkout@v6 - uses: astral-sh/setup-uv@v3 - name: Setup soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true diff --git a/.github/workflows/bench-205.yml b/.github/workflows/bench-205.yml index a06c868e..1e584a91 100644 --- a/.github/workflows/bench-205.yml +++ b/.github/workflows/bench-205.yml @@ -36,8 +36,9 @@ jobs: - uses: actions/checkout@v6 - uses: astral-sh/setup-uv@v3 - name: Setup soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true @@ -76,8 +77,9 @@ jobs: - uses: actions/checkout@v6 - uses: astral-sh/setup-uv@v3 - name: Setup soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true diff --git a/.github/workflows/check-macos.yml b/.github/workflows/check-macos.yml index 418e10b3..d81ec633 100644 --- a/.github/workflows/check-macos.yml +++ b/.github/workflows/check-macos.yml @@ -21,8 +21,9 @@ jobs: - uses: actions/checkout@v6 - name: Setup soldr id: setup-soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true diff --git a/.github/workflows/check-ubuntu.yml b/.github/workflows/check-ubuntu.yml index 05f6765e..26337774 100644 --- a/.github/workflows/check-ubuntu.yml +++ b/.github/workflows/check-ubuntu.yml @@ -22,8 +22,9 @@ jobs: - uses: astral-sh/setup-uv@v3 - name: Setup soldr id: setup-soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cdf91486..b52008e5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,8 +21,9 @@ jobs: - uses: actions/checkout@v6 - name: Setup soldr id: setup-soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true diff --git a/.github/workflows/dylint.yml b/.github/workflows/dylint.yml index 2ed63d8f..44e5cd12 100644 --- a/.github/workflows/dylint.yml +++ b/.github/workflows/dylint.yml @@ -24,8 +24,9 @@ jobs: steps: - uses: actions/checkout@v6 - uses: astral-sh/setup-uv@v3 - - uses: zackees/setup-soldr@v0.9.65 + - uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true toolchain: 1.94.1 cache-key-suffix: dylint diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml index cae6d49a..112d26a2 100644 --- a/.github/workflows/fmt.yml +++ b/.github/workflows/fmt.yml @@ -19,8 +19,9 @@ jobs: - uses: actions/checkout@v6 - name: Setup soldr id: setup-soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: false diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index b6b4fdf1..21b9a514 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -19,8 +19,9 @@ jobs: - uses: actions/checkout@v6 - name: Setup soldr id: setup-soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true diff --git a/.github/workflows/release-auto.yml b/.github/workflows/release-auto.yml index 6766e794..88046bc0 100644 --- a/.github/workflows/release-auto.yml +++ b/.github/workflows/release-auto.yml @@ -170,14 +170,14 @@ jobs: linux_cross: true macos_cross: false - # macOS lanes restored on soldr v0.7.98 + setup-soldr - # v0.9.64. They were dropped when every usable soldr + # macOS lanes restored on soldr v0.8.0 + setup-soldr + # v0.9.66. They were dropped when every usable soldr # version still pointed the Apple SDK fetch at the retired # manifest branch (HTTP 404); the "setup-soldr version # --json incompatibility" that blocked bumping soldr was a # misdiagnosis — soldr v0.7.85/v0.7.87 shipped silent - # binaries. v0.7.98 fixes the Apple SDK URL and - # setup-soldr@v0.9.65 hardens against silent binaries. + # binaries. v0.8.0 carries the Apple SDK URL fix and + # setup-soldr@v0.9.66 hardens against silent binaries. # # aarch64-apple-darwin cross-compiles from the Linux # runner via soldr + cargo-zigbuild + soldr's managed @@ -205,7 +205,7 @@ jobs: # Windows x86_64 now uses the same Linux -> MSVC soldr build path # as aarch64-pc-windows-msvc. The native windows-latest release # lane repeatedly exceeded the 45 minute release-binary step while - # compiling fbuild-cli, blocking the v2.4.0 publish. soldr v0.7.98's + # compiling fbuild-cli, blocking the v2.4.0 publish. soldr v0.8.0's # clang-cl shim fixes the earlier cargo-xwin/ring header routing # issue that forced native Windows on the 2.3.12 cut. - target: x86_64-pc-windows-msvc @@ -214,7 +214,7 @@ jobs: linux_cross: false macos_cross: false - # aarch64-pc-windows-msvc — restored on soldr v0.7.98, + # aarch64-pc-windows-msvc — restored on soldr v0.8.0, # whose release archive ships the soldr-clang-shim that # routes ring 0.17.x's hardcoded `c.compiler("clang")` # to clang-cl when `--target=*-pc-windows-msvc` (the diff --git a/.github/workflows/template_build.yml b/.github/workflows/template_build.yml index 0998c8dc..d4410b3c 100644 --- a/.github/workflows/template_build.yml +++ b/.github/workflows/template_build.yml @@ -41,8 +41,9 @@ jobs: - name: Setup soldr id: setup-soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" # cache-preset: foundation expands to: # build-cache: true, target-cache: false, # cargo-registry-cache: false, prebuild-deps: soldr-cook diff --git a/.github/workflows/template_native_build.yml b/.github/workflows/template_native_build.yml index 8f63ca91..eb9e9c19 100644 --- a/.github/workflows/template_native_build.yml +++ b/.github/workflows/template_native_build.yml @@ -93,14 +93,14 @@ jobs: # v0.7.85/v0.7.87 were broken releases that shipped silent # binaries (no output at all), which setup-soldr@v0.9.63 # surfaced as a version-JSON parse failure. - # Now pinned to v0.7.98: Apple SDK URL fix, soldr-clang-shim + # Now pinned to v0.8.0: Apple SDK URL fix, soldr-clang-shim # shipped in every release archive, cargo:rustc-env wrapper # forwarding, managed cmake/ninja — all 7 soldr cross lanes - # verified green upstream. setup-soldr@v0.9.65 hardens + # verified green upstream. setup-soldr@v0.9.66 hardens # against the silent-binary failure mode. - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: - version: "0.7.98" + version: "0.8.0" cache: true build-cache: true target-cache: true @@ -203,7 +203,7 @@ jobs: # on PATH — without it, ring + cc-rs fail with # `failed to find tool "clang-cl": No such file or # directory` during `cargo xwin build`. Create the symlink - # ourselves so the env vars resolve. soldr >= v0.7.98 ships + # ourselves so the env vars resolve. soldr >= v0.8.0 ships # `soldr-clang-shim` in its release archive and `soldr build` # installs it on PATH (zackees/soldr#1032); the symlink stays # as a safety belt for any direct `cargo xwin` invocation. @@ -287,7 +287,7 @@ jobs: # passthrough. cargo-xwin is still installed (handles # SDK download); soldr build delegates to cargo-xwin via # internal env vars when the catalogue xwin-cache row is - # absent for the target arch. Requires soldr >= v0.7.98 + # absent for the target arch. Requires soldr >= v0.8.0 # (first pin whose release archive ships the shim). soldr build --release --target ${{ inputs.target }} \ -p fbuild-cli \ diff --git a/.github/workflows/update-data.yml b/.github/workflows/update-data.yml index 35471434..cf31cbcb 100644 --- a/.github/workflows/update-data.yml +++ b/.github/workflows/update-data.yml @@ -121,8 +121,9 @@ jobs: --worktree "${WWW_WORKTREE}" --branch "${WWW_BRANCH}" - name: Setup soldr - uses: zackees/setup-soldr@v0.9.65 + uses: zackees/setup-soldr@v0.9.66 with: + version: "0.8.0" cache: true build-cache: true target-cache: true diff --git a/ci/docker-mac-cross/Dockerfile b/ci/docker-mac-cross/Dockerfile index a32e976d..65af41d5 100644 --- a/ci/docker-mac-cross/Dockerfile +++ b/ci/docker-mac-cross/Dockerfile @@ -57,7 +57,7 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh \ # to an unrelated squatted `soldr-0.1.0` placeholder package. The tarball # is built against glibc 2.17 (manylinux_2_17 floor) so it runs on every # remotely-recent distro. Issue tracked at zackees/soldr#1005 (forthcoming). -ARG SOLDR_VERSION=0.7.98 +ARG SOLDR_VERSION=0.8.0 RUN mkdir -p /opt/soldr-bin \ && curl -fsSL \ "https://github.com/zackees/soldr/releases/download/v${SOLDR_VERSION}/soldr-v${SOLDR_VERSION}-x86_64-unknown-linux-gnu.tar.zst" \ @@ -68,7 +68,7 @@ RUN mkdir -p /opt/soldr-bin \ # `soldr-clang-shim` must live next to the running soldr binary — # soldr's blessed cross-compile path resolves it relative to its own # exe (zackees/soldr#1015/#1016) and ships it in every release -# archive as of v0.7.92+. +# archive as of v0.8.0+. RUN for bin in soldr soldr-clang-shim cargo-chef crgx; do \ [ -f "/opt/soldr-bin/$bin" ] && cp "/opt/soldr-bin/$bin" "/usr/local/bin/$bin" && chmod +x "/usr/local/bin/$bin"; \ done diff --git a/ci/docker-profile/Dockerfile b/ci/docker-profile/Dockerfile index cf9e0a68..fc5ec1e9 100644 --- a/ci/docker-profile/Dockerfile +++ b/ci/docker-profile/Dockerfile @@ -62,7 +62,7 @@ RUN test -f /etc/machine-id || cat /proc/sys/kernel/random/uuid | tr -d '-\n' > # Soldr binary tarball from GitHub Releases — same rationale and pin as # ci/docker-mac-cross/Dockerfile (pip wheel is manylinux_2_39-tagged and # falls back to a squatted placeholder on older glibc). -ARG SOLDR_VERSION=0.7.98 +ARG SOLDR_VERSION=0.8.0 RUN mkdir -p /opt/soldr-bin \ && curl -fsSL \ "https://github.com/zackees/soldr/releases/download/v${SOLDR_VERSION}/soldr-v${SOLDR_VERSION}-x86_64-unknown-linux-gnu.tar.zst" \ diff --git a/ci/publish.py b/ci/publish.py index 4fa767de..bb79e92c 100644 --- a/ci/publish.py +++ b/ci/publish.py @@ -58,7 +58,7 @@ "binaries-x86_64-unknown-linux-musl": "linux-x86_64", "binaries-aarch64-unknown-linux-musl": "linux-aarch64", # Restored alongside the release-auto.yml macOS matrix entries on - # soldr v0.7.98 + setup-soldr v0.9.64 (Apple SDK URL fix). + # soldr v0.8.0 + setup-soldr v0.9.66 (Apple SDK URL fix). "binaries-aarch64-apple-darwin": "macos-aarch64", "binaries-x86_64-pc-windows-msvc": "windows-x86_64", }