Fix build context symlink resolution and XPC concurrency#1922
Fix build context symlink resolution and XPC concurrency#1922lakshitsoni26 wants to merge 1 commit into
Conversation
🐛 Root Cause Analysis:
|
|
Hey... just wanted to point out #1899 (comment) Not sure if you would like to include that in this PR or if I should work on addressing independenly |
I apologize for bundling these together! I will split this up. I'll revert the Makefile changes immediately, and I will separate the XPC Concurrency fix and the Symlink Context fix into two independent PRs so they are easier to review. |
|
Hi @svelez and @jglogan, thank you both for the helpful feedback on this! You are completely right—bundling these three unrelated changes into a single PR made this too difficult to review and caused unnecessary conflicts. To make your lives easier, I have completely split this work up:
I am closing this bundled PR in favor of the clean ones above. Thanks again for the guidance on keeping PRs perfectly scoped! |
Fixes #1899
Type of Change
Motivation and Context
This PR resolves two critical regressions in the build system:
ADD/COPYSymlink Context Resolution: Fixes an issue wheretarbuildkit generation was failing to properly include and resolve symlinked files in the build context. InURL+Extensions.swift, the path hierarchy functions (relativeChildPathandparentOf) were overly aggressively resolving symlinks via.standardizedFileURL. This is fixed by implementing a safestripPrivatePrefixfunction. InBuildFSSync.swift,FileInfo.initwas incorrectly attempting to resolve paths instead of reading the raw target from disk, which has now been fixed usingdestinationOfSymbolicLink(atPath:).XPCClientwhen iterating over asynchronous stream states under high loads.Testing
Local Test Output:
Ran
make cli && swift test --filter TestCLIBuilderSerialend-to-end:✔ Suite TestCLIBuilderSerial passed after 213.792 seconds.✔ Test run with 44 tests in 1 suite passed after 213.792 seconds.