WebKit
WebKit copied to clipboard
[Xcode] Add a style check to keep xcschemes in sync
8c2cba3a21c589907ad397125308db4486fcf3f2
[Xcode] Add a style check to keep xcschemes in sync https://bugs.webkit.org/show_bug.cgi?id=245587 Reviewed by NOBODY (OOPS!). XcodeSchemeChecker defines relationships between schemes using set algebra, e.g.: "Everything up to WebKit + Tools" is a union of "Everything up to WebKit" and "All WebKit Tools". When given an xcscheme file, it parses it and verifies that its relationships hold. This helps keep the list of buildable targets in sync between schemes, which is a challenge for WebKit since we have multiple listings of the WebKit and Tools targets (and many more internally). Here's an example failure message, which revealed that "All WebKit Tools" depends on the TestWebKitAPI executable and not the entire project, so it was skipping building TestIPC, TestWTF, etc.: ERROR: WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme:0: targets should be equal to the targets in 'Everything up to WebKit.xcscheme' + 'All WebKit Tools.xcscheme' Add: - TestWebKitAPI (in project 'TestWebKitAPI', built for: analyze test run profile archive) Remove: - All (in project 'TestWebKitAPI', built for: analyze test run profile archive) [xcscheme/sync] [5] Currently, the rules are evaluated one-way, so a change to one scheme _will not_ invalidate other schemes that define rules on it. However, the whole scheme graph can easily be checked at once with: check-webkit-style WebKit.xcworkspace/xcshareddata/xcschemes/* * Tools/Scripts/webkitpy/style/checker.py: Add xcscheme file type and XcodeSchemeChecker instantiation. * Tools/Scripts/webkitpy/style/checkers/xcscheme.py: Added. Fix a few small discrepencies revealed by the checker. * WebKit.xcworkspace/xcshareddata/xcschemes/All WebKit Tools.xcscheme: Build the "All" aggregate from TestWebKitAPI, not just the main executable. * WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme: Build the "All" aggregate from bmalloc and explicitly depend on WTF. Both of these are probably unnecessary, since all the needed target are found by Xcode implicitly. We can clean these up from all schemes in a follow-up.
https://github.com/WebKit/WebKit/commit/b63ba8620b07e8f7b3185f9bf01865a41023cf75
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/8c2cba3a21c589907ad397125308db4486fcf3f2)
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/b63ba8620b07e8f7b3185f9bf01865a41023cf75)
Committed 255464@main (f07375f48dbc): https://commits.webkit.org/255464@main
Reviewed commits have been landed. Closing PR #4643 and removing active labels.