Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Make /Applications symlink build phase to later #1470

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

graeme
Copy link
Collaborator

@graeme graeme commented Aug 11, 2023

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:

  1. Delete Applications/DEBUG/DuckDuckGo.app
  2. Clear Derived Data
  3. Go to System Settings -> VPN -> (Blue) DuckDuckGo, click the (i) button and delete the configuration
  4. Build the app from Xcode
  5. Enable NetP and allow the network extension to be installed.
  6. Ensure it functions as expected.
Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

Copy link
Contributor

@diegoreymendez diegoreymendez left a comment

Choose a reason for hiding this comment

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

I didn't see the original issue others are having, so if you want validation that this addresses the problem, you may want someone else to confirm.

What I did validate is that this change doesn't break NetP, and things work as expected.

@graeme graeme merged commit abe6dd1 into develop Aug 11, 2023
12 checks passed
@graeme graeme deleted the graeme/move-make-applications-symlink-build-phase branch August 11, 2023 11:53
samsymons added a commit that referenced this pull request Aug 13, 2023
# By Dominik Kapusta (5) and others
# Via GitHub (1) and Lorenzo Mattei (1)
* develop:
  Add support for syncing Credentials (#1368)
  Fix dsym upload to S3
  Bump version to 1.51.1 (48)
  Report failed unit tests to Asana (#1457)
  Use MainActor to ensure FutureExtension tests are dispatched on main queue (#1472)
  Move Make /Applications symlink build phase to later (#1470)
  don't show day 7 when day 0 has been dismissed (#1468)
  Update BSK with autofill 8.1.2 (#1471)
  Add job to create a task on asana if tests fails on develop (#1461)
  Disables a flaky test from App Store unit tests (#1467)
  Fix an autoconsent exception on old Safari (#1460)
  fix bug where wrong address bar text is shown when opening DuckPlayer… (#1434)
  Fix FutureExtensionTests (#1450)
  Add pixel to determine Bitwarden use on Mac (#1412)
  Skip /Applications symlink script for Debug builds (#1443)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
samsymons added a commit that referenced this pull request Aug 13, 2023
* develop:
  Update NetP endpoint (#1459)
  Add support for syncing Credentials (#1368)
  Fix dsym upload to S3
  Bump version to 1.51.1 (48)
  Report failed unit tests to Asana (#1457)
  Use MainActor to ensure FutureExtension tests are dispatched on main queue (#1472)
  Move Make /Applications symlink build phase to later (#1470)
  don't show day 7 when day 0 has been dismissed (#1468)
  Update BSK with autofill 8.1.2 (#1471)
  Add job to create a task on asana if tests fails on develop (#1461)
  Disables a flaky test from App Store unit tests (#1467)
  Fix an autoconsent exception on old Safari (#1460)
  fix bug where wrong address bar text is shown when opening DuckPlayer… (#1434)
  Fix FutureExtensionTests (#1450)
  Add pixel to determine Bitwarden use on Mac (#1412)
  Encapsulate NetP subjects within observers (#1436)
  Skip /Applications symlink script for Debug builds (#1443)
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