WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
118922
Add script to update Xcode build location when switching branches
https://bugs.webkit.org/show_bug.cgi?id=118922
Summary
Add script to update Xcode build location when switching branches
Daniel Bates
Reported
2013-07-19 14:51:46 PDT
Currently a person must manually update the build location used by the Xcode workspace file, WebKit.xcworkspace, to build/debug/run WebKit each time they switch to a different branch in a Git branch build setup so that Xcode uses the branch-specific build location for WebKit (*). I propose we add a script, called update-Xcode-workspace-build-location (I am open to naming suggestions), that can update the build location in an Xcode workspace file and add a script to be used as a post-checkout Git hook that runs update-Xcode-workspace-build-location whenever a person switches to another branch. The script update-Xcode-workspace-build-location would modify the Xcode workspace file WebKit.xcworkspace to use as its build location a symbolic link, CurrentWebKitBuild, which points to the branch-specific build directory. The symbolic link CurrentWebKitBuild would be created in the top-level WebKit checkout directory (if it doesn't exist). (*) Alternatively a person must use a symbolic link for their Xcode build location and update the symbolic link each time they switch to a different branch to point to the branch-specific build directory.
Attachments
Patch
(10.91 KB, patch)
2013-07-19 15:00 PDT
,
Daniel Bates
ddkilzer
: review+
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from APPLE-EWS-3 for win-future
(265.02 KB, application/zip)
2013-07-28 20:45 PDT
,
Build Bot
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2013-07-19 15:00:10 PDT
Created
attachment 207150
[details]
Patch
Daniel Bates
Comment 2
2013-07-19 15:01:53 PDT
How do I use the scripts? The following instructions only need to be performed once. 1. Run the script update-Xcode-workspace-build-location to create the symbolic link CurrentWebKitBuild and update the file WebKit.xcworkspace to use this symbolic link as its build location. 2. Copy the script update-Xcode-workspace-build-location-post-checkout to the .git/hooks directory in your top-level WebKit checkout directory as "post-checkout". 3. Done. The Git post-checkout script will run whenever you switch to a new branch and will update the symbolic link CurrentWebKitBuild to point to the branch-specific build location.
Build Bot
Comment 3
2013-07-28 20:45:46 PDT
Comment on
attachment 207150
[details]
Patch
Attachment 207150
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/1251896
New failing tests: dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.xhtml dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg dom/html/level2/events/dispatchEvent04.html dom/html/level2/html/HTMLSelectElement20.html dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg dom/html/level1/core/documentinvalidcharacterexceptioncreateentref.html dom/html/level2/core/hc_namednodemapinvalidtype1.html dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg dom/html/level2/events/dispatchEvent01.html dom/xhtml/level1/core/hc_attrappendchild4.xhtml dom/html/level2/events/dispatchEvent03.html dom/html/level2/events/dispatchEvent02.html dom/html/level2/core/createDocumentType04.html dom/html/level1/core/documentinvalidcharacterexceptioncreateentref1.html dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.html dom/html/level2/events/dispatchEvent06.html css1/basic/comments.html dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.xhtml dom/html/level2/events/dispatchEvent07.html dom/html/level2/core/setAttributeNS10.html dom/html/level2/events/dispatchEvent05.html dom/html/level1/core/hc_attrappendchild2.html dom/html/level2/core/createAttributeNS06.html dom/html/level1/core/hc_attrappendchild4.html dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.xhtml dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.xhtml dom/xhtml/level1/core/hc_attrappendchild2.xhtml dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.html
Build Bot
Comment 4
2013-07-28 20:45:47 PDT
Created
attachment 207618
[details]
Archive of layout-test-results from APPLE-EWS-3 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: APPLE-EWS-3 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Tim Horton
Comment 5
2013-08-08 14:46:56 PDT
How does this differ from
http://trac.webkit.org/wiki/UsingGitWithWebKit
's webKitBranchBuild thing?
Daniel Bates
Comment 6
2013-08-08 18:58:34 PDT
(In reply to
comment #5
)
> How does this differ from
http://trac.webkit.org/wiki/UsingGitWithWebKit
's webKitBranchBuild thing?
It doesn't differ. These scripts make it possible to use Xcode with a webKitBranchBuild setup.
David Kilzer (:ddkilzer)
Comment 7
2013-08-17 14:07:16 PDT
Comment on
attachment 207150
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=207150&action=review
r=me with the grammar fixes in the ChangeLog and error message.
> Tools/ChangeLog:10 > + location used by an Xcode workspace file and a post-checkout Git hook script that > + be used to run update-Xcode-workspace-build-location whenever a person switches
Typo: …that *can* be used...
> Tools/ChangeLog:18 > +
Maybe add a reference to the wiki page like this? See also: <
http://trac.webkit.org/wiki/UsingGitWithWebKit
>
> Tools/Scripts/update-Xcode-workspace-build-location:50 > + "no-symlink" => \$doNotUseSymlink,
Getopt::Long has automatic negation recognition which would allow --symlink, --nosymlink and --no-symlink automatically. See "man Getopt::Long". "symlink+" => \$useSymlink, Then you can get rid of the negative logic required for $doNotUseSymlink. Not required to land this patch; for a future update.
> Tools/Scripts/update-Xcode-workspace-build-location:57 > + --no-symlink Modify the Xcode workspace to point to the current WebKit build without using a symbolic link
if you switch to $useSymlink, you should print out the default here.
> Tools/Scripts/update-Xcode-workspace-build-location:112 > + print "Cannot find neither file \"$xcodeWorkspaceSettings\"\n";
Grammar issue. Should either be: Can find neither X nor Y. or: Cannot find either X or Y.
Ahmad Saleem
Comment 8
2022-09-12 12:49:34 PDT
Is this needed now? Thanks!
Alexey Proskuryakov
Comment 9
2022-09-12 14:52:43 PDT
We don't have any solution for quickly switching between branches without invalidating Xcode build data. There isn't a lot of talk about needing a fix though - not sure because this isn't a big problem in practice, or if people assume that it's unfixable.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug