CurtHagenlocher opened a new pull request, #505: URL: https://github.com/apache/arrow-dotnet/pull/505
## What's wrong On macOS, `verify_rc.sh` can fail with dozens of spurious compile errors in the test step: "type or namespace name 'FlightTicket' could not be found", `K4os` not found in the compression tests, and so on, even though the same projects built successfully moments earlier in the build step. The cause is the temporary directory. On macOS it's under `/var`, which is a symlink to `/private/var`, and the script works under the symlinked path. Tools can then see the same files under both `/var/folders/…` and `/private/var/folders/…`. When that happens, MSBuild treats each project as two different projects and builds them concurrently into the same output folder, so builds read references that another build is still writing. ## Evidence From the `Verify (8.0.x, macos-latest)` job of the RC workflow on #504: | Run | Runner image | Restores under `/var` | Restores under `/private/var` | Result | |---|---|---:|---:|---| | [Failing run](https://github.com/apache/arrow-dotnet/actions/runs/43776728836/job/133004801520) | `20261103.629` | 25 | 20 | 127 compile errors | | [Rerun of the same commit](https://github.com/apache/arrow-dotnet/actions/runs/43776728836/attempts/2) | `20261028.624` | 0 | 34 | Passed | | Earlier runs, and the latest run on `main` | `20261028.624` | 0 | 34 | Passed | Every run reports its sandbox under `/var/folders/…`, but only the run on the newer image ended up with both paths in use. So this is likely to start failing on `main` too once that image becomes the default for `macos-latest`. ## The fix `setup_tmpdir` now resolves `VERIFY_TMPDIR` to its physical path with `pwd -P` before anything works in it, so the shell's `$PWD` and the operating system's view of the current directory agree. This applies both when the script creates the directory with `mktemp` and when the caller supplies `VERIFY_TMPDIR`. The cleanup trap removes the same directory either way. On Linux and Windows, where the path normally has no symlinks, nothing changes. ## Testing - With a real symlinked directory, both branches of `setup_tmpdir` (`mktemp` and a caller-supplied `VERIFY_TMPDIR`) resolve to the physical path, `$PWD` is physical after the `cd`, and the cleanup trap still removes the directory. - `shellcheck` 0.10.0 (the version pinned in `.pre-commit-config.yaml`) and `shfmt` report no issues. - I couldn't run the script on macOS locally; this PR's own RC workflow run exercises it on `macos-latest`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
