Skip to content

fix(cargo): skip execroot symlink collisions in build script runner - #1

Open
erikackermann wants to merge 2 commits into
mgeisler:proton-patchesfrom
erikackermann:fix/execroot-symlink-collision
Open

fix(cargo): skip execroot symlink collisions in build script runner#1
erikackermann wants to merge 2 commits into
mgeisler:proton-patchesfrom
erikackermann:fix/execroot-symlink-collision

Conversation

@erikackermann

@erikackermann erikackermann commented Aug 18, 2026

Copy link
Copy Markdown

Summary

  • Only track execroot symlinks the build script runner actually created when experimental_symlink_execroot is enabled.
  • Skip symlink creation when the manifest dir already has an entry at that path.
  • On cleanup, remove symlinks only (via symlink_metadata), not real directories.

Fixes intermittent failures where execroot paths (e.g. top-level ci/) collide with crate runfile trees and cleanup failed with Is a directory.

When experimental_symlink_execroot is enabled, only track symlinks the
runner created and remove symlinks on cleanup. Avoids failing with "Is a
directory" when an execroot path collides with an existing manifest dir
entry (e.g. monorepo ci/ vs crate runfiles).
Fix buildifier-lint unsorted-dict-items on urls.bzl so pre-commit passes.
@mgeisler

Copy link
Copy Markdown
Owner

Fixes intermittent failures where execroot paths (e.g. top-level ci/) collide with crate runfile trees and cleanup failed with Is a directory.

Thanks @erikackermann! Would you be able to add a test case that demonstrates this weird behavior? That will be very useful for an upstream PR as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants