Skip to content

Remove macOS realpath fast path - #4867

Merged
Jake Bailey (jakebailey) merged 1 commit into
mainfrom
jabaile/fix-4262
Aug 11, 2026
Merged

Remove macOS realpath fast path#4867
Jake Bailey (jakebailey) merged 1 commit into
mainfrom
jabaile/fix-4262

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Fixes #4262
Closes #4578

This fast path didn't work in the presence of hard links.

The test included here does show the problem on macOS.

Copilot AI balanced review requested due to automatic review settings August 10, 2026 17:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the nondeterministic macOS realpath fast path, ensuring hard-linked files retain the requested path.

Changes:

  • Routes macOS realpath resolution through filepath.EvalSymlinks.
  • Restricts the EINTR helper to Linux.
  • Adds a concurrent macOS hard-link regression test.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/nativepath/realpath_other.go Includes macOS in the portable implementation.
internal/nativepath/realpath_darwin.go Removes the F_GETPATH fast path.
internal/nativepath/realpath_darwin_test.go Tests deterministic hard-link resolution.
internal/nativepath/eintr_unix.go Limits the helper to Linux.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 71f04bb Aug 11, 2026
22 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the jabaile/fix-4262 branch August 11, 2026 01:10
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.

Non-deterministic TS2305 "has no exported member" errors across project references with --emitDeclarationOnly

3 participants