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

[Xcode] build-dumprendertree and other scripts do not support workspace builds #2757

Merged

Conversation

emw-apple
Copy link
Contributor

@emw-apple emw-apple commented Jul 26, 2022

b03221e

[Xcode] `build-dumprendertree` and other scripts do not support workspace builds
https://bugs.webkit.org/show_bug.cgi?id=243233
rdar://97615725

Reviewed by Alexey Proskuryakov.

Adjust the build-* family of scripts to call buildXcodeScheme, instead
of building individual projects. They now build a scheme in the WebKit
workspace. These schemes (DumpRenderTree, TestWebKitAPI, etc.) do not
build their implicit dependencies, so it's still possible to build these
tools without implicitly building the entire WebKit stack.

* Source/WebCore/WebCore.xcodeproj/xcshareddata/xcschemes/WebCore.xcscheme:
* Tools/DumpRenderTree/DumpRenderTree.xcodeproj/xcshareddata/xcschemes/DumpRenderTree.xcscheme:
* Tools/Scripts/build-api-tests:
* Tools/Scripts/build-dumprendertree:
* Tools/Scripts/build-imagediff: The only exception: it's not part of
  any workspace and never has been, so call
  overrideConfiguredXcodeWorkspace to ensure we never try to build it in
  a workspace.
* Tools/Scripts/build-lldbwebkittester:
(buildProjectOrDie): Deleted.
* Tools/Scripts/build-webkit:
* Tools/Scripts/build-webkittestrunner:
* Tools/Scripts/webkitdirs.pm:
(XcodeOptions): Instead of the previous behavior, where webkitdirs would
not build in a workspace _at all_ if one hadn't been set, now fall back
to WebKit.xcworkspace by default. Scripts can still opt-out of building
in a workspace by calling overrideConfiguredXcodeWorkspace("").
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWTF.xcscheme: Added, builds TestWTF and gtest.
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme: Also build gtest in addition to TestWebKitAPI.
* Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/xcshareddata/xcschemes/WebKitTestRunner.xcscheme:
* Tools/lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/xcshareddata/xcschemes/lldbWebKitTester.xcscheme: Added.

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

@emw-apple emw-apple self-assigned this Jul 26, 2022
@emw-apple emw-apple added Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases WebKit Nightly Build labels Jul 26, 2022
Comment on lines -232 to -233
} else {
overrideConfiguredXcodeWorkspace("WebKit.xcworkspace");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This represents a slight behavior change: Instead of always using WebKit.xcworkspace, build-webkit may now use other configured workspaces. For internal engineers, this means that build-webkit will share incremental build data with other workspaces.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is a scenario that is or should be supported. This change is a no-op for open source builds AFAICT, so it's OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know we document build-webkit as the preferred workflow for open source builds exclusively, but I think that using the configured workspace will make it do the expected thing for engineers running it internally. It also aligns build-webkit's behavior with the other build-* scripts here.

You are correct that it's a no-op for open source builds.

push @options, ("-target", "TestWTF");
}
$result = buildXCodeProject("TestWebKitAPI", $clean, @options, @ARGV);
my $scheme = $wtfOnly ? "TestWTF" : "TestWebKitAPI";
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this still build gtest? Looking at the xcscheme, I think that the answer is yes, but want to confirm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes!

Comment on lines -232 to -233
} else {
overrideConfiguredXcodeWorkspace("WebKit.xcworkspace");
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is a scenario that is or should be supported. This change is a no-op for open source builds AFAICT, so it's OK.

@emw-apple emw-apple added the merge-queue Applied to send a pull request to merge-queue label Jul 27, 2022
…pace builds

https://bugs.webkit.org/show_bug.cgi?id=243233
rdar://97615725

Reviewed by Alexey Proskuryakov.

Adjust the build-* family of scripts to call buildXcodeScheme, instead
of building individual projects. They now build a scheme in the WebKit
workspace. These schemes (DumpRenderTree, TestWebKitAPI, etc.) do not
build their implicit dependencies, so it's still possible to build these
tools without implicitly building the entire WebKit stack.

* Source/WebCore/WebCore.xcodeproj/xcshareddata/xcschemes/WebCore.xcscheme:
* Tools/DumpRenderTree/DumpRenderTree.xcodeproj/xcshareddata/xcschemes/DumpRenderTree.xcscheme:
* Tools/Scripts/build-api-tests:
* Tools/Scripts/build-dumprendertree:
* Tools/Scripts/build-imagediff: The only exception: it's not part of
  any workspace and never has been, so call
  overrideConfiguredXcodeWorkspace to ensure we never try to build it in
  a workspace.
* Tools/Scripts/build-lldbwebkittester:
(buildProjectOrDie): Deleted.
* Tools/Scripts/build-webkit:
* Tools/Scripts/build-webkittestrunner:
* Tools/Scripts/webkitdirs.pm:
(XcodeOptions): Instead of the previous behavior, where webkitdirs would
not build in a workspace _at all_ if one hadn't been set, now fall back
to WebKit.xcworkspace by default. Scripts can still opt-out of building
in a workspace by calling overrideConfiguredXcodeWorkspace("").
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWTF.xcscheme: Added, builds TestWTF and gtest.
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme: Also build gtest in addition to TestWebKitAPI.
* Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/xcshareddata/xcschemes/WebKitTestRunner.xcscheme:
* Tools/lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/xcshareddata/xcschemes/lldbWebKitTester.xcscheme: Added.

Canonical link: https://commits.webkit.org/252857@main
@webkit-commit-queue
Copy link
Collaborator

Committed 252857@main (b03221e): https://commits.webkit.org/252857@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit b03221e into WebKit:main Jul 27, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
4 participants