Move Make /Applications symlink build phase to later #1470
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Task/Issue URL: https://app.asana.com/0/1201037661562251/1205251729301936/f
Description:
From @afterxleep :
Out of nowhere, I started seeing the following error when building the macOS app (Likely after a DerivedData cleanup). File name changed every time.
While it happened, I tried the following, and nothing worked.
Reboot
Clean Build
Clear issues
Clean Derived Data
Reset Packages
Git Clean
Reclone Repository
Clean User Data
Remove Command line tools
Reinstall Xcode
Throw the laptop out the window
@dominik mentioned that he had to disable the <Make /Applications symlink, remove app on Clean build>, script in CI, so I did the same, and after cleaning everything up, builds started to work.
This script moves the built app from Derived Data to the Applications folder and then creates a symlink. If, for any reason, this symlink is not created, the Copy Resources Phase above fails, causing the error. (Files are not there anymore)
On top of that, if the symlink creation fails, the project ends up in an unrecoverable state, and the only solution is to wipe out DerivedData, Reset Package caches, and remove the script from the Build Phases.
Steps to test this PR:
—
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation