Add a script to update ANGLE
Created attachment 377073 [details]
Attachment 377073 [details] did not pass style-queue:
Traceback (most recent call last):
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkit-patch", line 84, in <module>
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkit-patch", line 79, in main
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
result = command.check_arguments_and_execute(options, args, self)
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
return self.execute(options, args, tool) or 0
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 55, in execute
self._sequence.run_and_handle_errors(tool, options, state)
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
self._run(tool, options, state)
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/tool/steps/checkstyle.py", line 66, in run
self._tool.executive.run_and_throw_if_fail(self._tool.deprecated_port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root)
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 137, in run_and_throw_if_fail
exit_code = self._run_command_with_teed_output(args, child_stdout, **kwargs)
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 109, in _run_command_with_teed_output
File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 481, in popen
return subprocess.Popen(string_args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
OSError: [Errno 7] Argument list too long
If any of these errors are false positives, please file a bug against check-webkit-style.
Sorry for the giant patch. It's almost all file renames but the webkit-patch tool doesn't seem to recognize that. Let me know if there's a better way to generate a patch like this.
Moving ANGLE into a subdirectory makes it much easier to update, as you can just directly copy all the files from an ANGLE checkout into that subdirectory.
Here's the ChangeLog entry:
2019-08-22 James Darpinian <email@example.com>
Add a script to update ANGLE
Reviewed by NOBODY (OOPS!).
Move all upstream ANGLE files into a directory called upstream.
Add a script update-angle.sh that checks out the latest ANGLE into
upstream/ and applies WebKit's changes.diff.
* ANGLE.plist: Update commit hash and license file.
* ANGLE.txt: Deleted in favor of upstream/LICENSE.txt
* ANGLE.xcodeproj/project.pbxproj: Move ANGLE to upstream/
* CMakeLists.txt: Move ANGLE to upstream/
* Makefile: Deleted.
* include/CMakeLists.txt: Deleted.
* upstream/: Moved all upstream ANGLE files to this new directory.
* update-angle.sh: New script to update ANGLE to latest.
This is no reason to move all the files of ANGLE in our repository.
Do you have an alternative suggestion for how to make ANGLE updates easier?
Do it in place.
ANGLE updates can add and remove files. Simply copying an updated ANGLE into the WebKit repo will not remove files that should be removed. But we also can't simply remove all files that aren't in the new ANGLE, as WebKit adds its own files to various places in the directory hierarchy, and we should preserve those.
Manually preserving these files is tedious and error-prone. A script could do it, but the script would need a list of the files to preserve. The easiest thing to do would be to hardcode the list in the script, but the list would easily get out of date. It would be difficult to determine the list automatically. Moving upstream files to their own directory is a much easier solution, which has no downsides that I can see other than the fact that the patch is large. Are there other negative consequences that I'm not seeing?
We have a few things that are needed for Apple internal builds. Your script could remove everything except a small list of things including the script itself and all the Apple-internal things. A directory restructuring like this causes a long chain of Apple internal problems for no benefit.
OK, so you prefer to hardcode a list of files to preserve in the update script? I will do that.
Sorry, webkit-patch seems to be unable to upload new patches to this bug. I've filed a new bug 201109 to continue review. Thanks for looking.
*** This bug has been marked as a duplicate of bug 201109 ***