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

We create /System/Library/LaunchDaemons/ for builds that don't install plists in that path #1866

Conversation

msaboff
Copy link
Contributor

@msaboff msaboff commented Jun 28, 2022

d0b2da3

We create /System/Library/LaunchDaemons/ for builds that don't install plists in that path
https://bugs.webkit.org/show_bug.cgi?id=242081
<rdar://96013133>

Reviewed by Saam Barati.

The Output Files for the Copy launchd plist and create symlink script phases for the adattributed and webpushd
targets will create the containing folder of any of the files listed there, even though the script creates the
containing directory and file when needed.  Therefore we changed the Output Files specified to have a computed
path value when installing a plist, or an empty value when we aren't.  This output path value is based on the
SKIP_INSTALL configuration variable.

* Source/WebKit/Configurations/adattributiond.xcconfig:
* Source/WebKit/Configurations/webpushd.xcconfig:
* Source/WebKit/Scripts/copy-launchd-plist-and-create-symlink.sh:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/251969@main

@msaboff msaboff self-assigned this Jun 28, 2022
@msaboff msaboff added Platform Portability improvements and other general platform improvements not driven directly by site bugs. WebKit Nightly Build labels Jun 28, 2022
@davidquesada
Copy link
Contributor

Looks good to me. I think it would also be possible to resolve this by giving the script phases an output path that's defined by one build setting that evaluates to an empty string when the plists won't be installed. But as you mentioned, that isn't really important since the plists are "leaf nodes", and no other operation will ever need to block on creating them.

Copy link
Contributor

@saambarati saambarati left a comment

Choose a reason for hiding this comment

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

r=me

@msaboff msaboff added the merge-queue Applied to send a pull request to merge-queue label Jun 28, 2022
Copy link
Contributor

@emw-apple emw-apple left a comment

Choose a reason for hiding this comment

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

If we remove all output paths, the script always runs. I know this script is relatively fast, but as I'm trying to improve incremental build performance, this would be a (small) step in the wrong direction.

I would eventually like to see these scripts rewritten as a build rule, because then—among other benefits—we could set EXCLUDED_SOURCE_FILE_NAMES = com.apple.webpushd.plist and prevent the script from ever executing. But in the meantime, could we do something like what @davidquesada is suggesting?

@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/We-create-SystemLibraryLaunchDaemons-for-builds-that-dont-install-products-in-the-path branch from a6204dd to b0e1099 Compare June 28, 2022 22:13
@msaboff msaboff removed the merge-queue Applied to send a pull request to merge-queue label Jun 29, 2022
@msaboff
Copy link
Contributor Author

msaboff commented Jun 29, 2022

Testing a version where the output path is defined by one build setting that evaluates to an empty string when the plists won't be installed as @davidquesada suggested.

@msaboff msaboff force-pushed the eng/We-create-SystemLibraryLaunchDaemons-for-builds-that-dont-install-products-in-the-path branch from b0e1099 to 7a16e68 Compare June 29, 2022 20:17
@msaboff
Copy link
Contributor Author

msaboff commented Jun 29, 2022

@emw-apple and @davidquesada Updated the patch as suggested and tested it locally.

@@ -16153,7 +16153,7 @@
outputFileListPaths = (
);
outputPaths = (
"$(DSTROOT)$(LAUNCHD_PLIST_INSTALL_PATH)/$(LAUNCHD_PLIST_FILE_NAME)",
"$(DERIVED_FILE_DIR)/newOutputFile",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is supposed to be:

Suggested change
"$(DERIVED_FILE_DIR)/newOutputFile",
"$(LAUNCHD_PLIST_OUTPUT_FILE)",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I made that change, so I don't know why it didn't take. I'll post an updated PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

r=me once this is updated!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@msaboff msaboff force-pushed the eng/We-create-SystemLibraryLaunchDaemons-for-builds-that-dont-install-products-in-the-path branch from 7a16e68 to 400985a Compare June 29, 2022 20:53
@msaboff msaboff added the merge-queue Applied to send a pull request to merge-queue label Jun 29, 2022
…l plists in that path

https://bugs.webkit.org/show_bug.cgi?id=242081
<rdar://96013133>

Reviewed by Saam Barati.

The Output Files for the Copy launchd plist and create symlink script phases for the adattributed and webpushd
targets will create the containing folder of any of the files listed there, even though the script creates the
containing directory and file when needed.  Therefore we changed the Output Files specified to have a computed
path value when installing a plist, or an empty value when we aren't.  This output path value is based on the
SKIP_INSTALL configuration variable.

* Source/WebKit/Configurations/adattributiond.xcconfig:
* Source/WebKit/Configurations/webpushd.xcconfig:
* Source/WebKit/Scripts/copy-launchd-plist-and-create-symlink.sh:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/251969@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/We-create-SystemLibraryLaunchDaemons-for-builds-that-dont-install-products-in-the-path branch from 400985a to d0b2da3 Compare June 29, 2022 23:39
@webkit-commit-queue
Copy link
Collaborator

Committed 251969@main (d0b2da3): https://commits.webkit.org/251969@main

Reviewed commits have been landed. Closing PR #1866 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit d0b2da3 into WebKit:main Jun 29, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Portability improvements and other general platform improvements not driven directly by site bugs.
Projects
None yet
6 participants