Bug 201013 - Add a script to update ANGLE
Summary: Add a script to update ANGLE
Status: RESOLVED DUPLICATE of bug 201109
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-21 16:57 PDT by James Darpinian
Modified: 2019-08-23 17:37 PDT (History)
5 users (show)

See Also:


Attachments
Patch (62.03 MB, patch)
2019-08-22 16:31 PDT, James Darpinian
jdarpinian: review?
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Darpinian 2019-08-21 16:57:56 PDT
Add a script to update ANGLE
Comment 1 James Darpinian 2019-08-22 16:31:03 PDT
Created attachment 377073 [details]
Patch
Comment 2 EWS Watchlist 2019-08-22 17:55:03 PDT
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>
    main()
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkit-patch", line 79, in main
    WebKitPatch(os.path.abspath(__file__)).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
    step(tool, options).run(state)
  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
    **kwargs)
  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__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 7] Argument list too long


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 James Darpinian 2019-08-23 09:58:01 PDT
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  <jdarpinian@google.com>

        Add a script to update ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=201013

        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/
        * Compiler.cmake:
        * GLESv2.cmake:
        * Makefile: Deleted.
        * additional_readme_paths.json:
        * include/CMakeLists.txt: Deleted.
        * upstream/: Moved all upstream ANGLE files to this new directory.
        * update-angle.sh: New script to update ANGLE to latest.
Comment 4 Alex Christensen 2019-08-23 12:48:38 PDT
This is no reason to move all the files of ANGLE in our repository.
Comment 5 James Darpinian 2019-08-23 14:14:47 PDT
Do you have an alternative suggestion for how to make ANGLE updates easier?
Comment 6 Alex Christensen 2019-08-23 14:16:24 PDT
Do it in place.
Comment 7 James Darpinian 2019-08-23 14:38:26 PDT
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?
Comment 8 Alex Christensen 2019-08-23 14:54:04 PDT
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.
Comment 9 James Darpinian 2019-08-23 14:56:11 PDT
OK, so you prefer to hardcode a list of files to preserve in the update script? I will do that.
Comment 10 James Darpinian 2019-08-23 17:37:19 PDT
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 ***