Bug 174164

Summary: Rename source directory and project files from WebKit2 to WebKit
Product: WebKit Reporter: Matthew Hanson <matthew_hanson>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bdakin, buildbot, calvaris, clopez, csaavedra, guijemont, jdiggs, jfernandez, lforschler, magomez, mcatanzaro, mitz, rego, webkit-bug-importer, yoon
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 174162    
Bug Blocks:    
Attachments:
Description Flags
Patch for WebKit2 => WebKit rename
none
Patch for WebKit2 => WebKit rename (v2)
none
Patch for WebKit2 => WebKit rename (v3)
none
Patch for WebKit2 => WebKit rename (v4)
none
Patch for WebKit2 => WebKit rename (v5)
none
Patch
buildbot: commit-queue-
Archive of layout-test-results from ews125 for ios-simulator-wk2
none
All changes Source outside of the actual rename mitz: review+

Description Matthew Hanson 2017-07-05 10:22:32 PDT
The WebKit framework is dubbed "WebKit2" in source code and project files. This bug tracks renaming "WebKit2" to "WebKit" in source directories, project files, and references to those files. My proposal for this work encompasses four distinct tasks:

1. Rename the source directory
The proposed rename is: Source/WebKit2/ => Source/WebKit/

2. Rename relevant Makefiles, tools, configurations, etc...
This must be done in conjunction with (1). If done in separate commits, the commits should be contiguous.

3. Rename the Xcode project
The proposed rename is: Source/WebKit2/WebKit2.xcodeproj => Source/WebKit/WebKit.xcodeproj

4. Rename the Visual Studio project
The proposed rename is: Source/WebKit2/WebKit2.vcxproj => Source/WebKit/WebKit.vcxproj

This work can only be done once https://bugs.webkit.org/show_bug.cgi?id=174162 is completed.
Comment 1 Radar WebKit Bug Importer 2017-07-05 10:48:09 PDT
<rdar://problem/33137595>
Comment 2 Matthew Hanson 2017-07-10 10:53:33 PDT
I've added the Igalia folks to solicit their help in validating the GTK builds + tests.
Comment 3 Matthew Hanson 2017-07-10 14:05:18 PDT
Created attachment 315021 [details]
Patch for WebKit2 => WebKit rename

Also includes the WebKit => WebKitLegacy rename so that the patch applies cleanly.
Comment 4 Build Bot 2017-07-10 15:59:44 PDT
Attachment 315021 [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 135, 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 107, in _run_command_with_teed_output
    **kwargs)
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 473, 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 5 Matthew Hanson 2017-07-11 09:30:13 PDT
Created attachment 315116 [details]
Patch for WebKit2 => WebKit rename (v2)
Comment 6 Matthew Hanson 2017-07-11 10:28:05 PDT
Created attachment 315125 [details]
Patch for WebKit2 => WebKit rename (v3)

Update cMake variables and directory names.
Comment 7 Matthew Hanson 2017-07-11 12:40:11 PDT
Created attachment 315145 [details]
Patch for WebKit2 => WebKit rename (v4)

Further cMake fixes.
Comment 8 Matthew Hanson 2017-07-11 13:17:32 PDT
Created attachment 315152 [details]
Patch for WebKit2 => WebKit rename (v5)

Even more GTK fixes
Comment 9 Build Bot 2017-07-11 18:30:45 PDT
Attachment 315152 [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 135, 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 107, in _run_command_with_teed_output
    **kwargs)
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 473, 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 10 Michael Catanzaro 2017-07-11 20:27:33 PDT
I'll try to get the CMake builds working tomorrow.
Comment 11 Michael Catanzaro 2017-07-12 23:26:08 PDT
(In reply to Michael Catanzaro from comment #10)
> I'll try to get the CMake builds working tomorrow.

Done:

 * Reverted to legacy framework names in Source/CMakeLists.txt and added FIXMEs; it will be easier to rename these separately later
 * Updated the paths in Source/WebCore/platform/gtk/po/POTFILES.in.
 * Fixed Source/WebKit/Scripts/generate-forwarding-headers.pl by removing $frameworkDirectoryName

That's all that was needed for GTK. Let's try EWS again....
Comment 12 Michael Catanzaro 2017-07-12 23:40:15 PDT
Created attachment 315336 [details]
Patch

I'm having trouble uploading the patch with webkit-patch:

Traceback (most recent call last):
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkit-patch", line 84, in <module>
    main()
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkit-patch", line 79, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 55, in execute
    self._sequence.run_and_handle_errors(tool, options, state)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
    self._run(tool, options, state)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
    step(tool, options).run(state)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py", line 106, in run
    self._ensure_bug_url(state)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py", line 58, in _ensure_bug_url
    if not changelog.latest_entry().bug_id():
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 362, in latest_entry
    changelog_file = self._filesystem.open_text_file_for_reading(self.path)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py", line 236, in open_text_file_for_reading
    return codecs.open(path, 'r', 'utf8', errors)
  File "/usr/lib64/python2.7/codecs.py", line 896, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: u'/home/mcatanzaro/Projects/WebKit/Source/WebKit/cf/ChangeLog'

It's not clear to me if this is a problem that actually needs to be fixed. I bet it's a one-time problem that we can ignore (it seems our scripts aren't prepared for ChangeLog files to disappear and reappear in new locations). So I've prepared a git formatted patch instead. I presume EWS will be able to handle it....
Comment 13 Build Bot 2017-07-13 01:36:04 PDT
Attachment 315336 [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 135, 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 107, in _run_command_with_teed_output
    **kwargs)
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 473, 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 14 Michael Catanzaro 2017-07-13 05:43:19 PDT
Well that got GTK and WPE building, but the forwarding headers change broke Mac:

/Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:33:9: fatal error: 'WebKit/WKWindowFeaturesPrivate.h' file not found
#import <WebKit/WKWindowFeaturesPrivate.h>
        ^
1 error generated.

Looks like we're going to have to migrate Tools/TestWebKitAPI/Tests as well.
Comment 15 Build Bot 2017-07-13 06:31:15 PDT
Comment on attachment 315336 [details]
Patch

Attachment 315336 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4112966

New failing tests:
imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html
Comment 16 Build Bot 2017-07-13 06:31:16 PDT
Created attachment 315343 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 17 Matthew Hanson 2017-07-13 19:04:28 PDT
Created attachment 315394 [details]
All changes Source outside of the actual rename

This patch does not include the actual rename. It will not apply cleanly until after the directories have been moved.
Comment 18 mitz 2017-07-13 19:10:02 PDT
Comment on attachment 315394 [details]
All changes Source outside of the actual rename

Read as a sequence of patches to apply on top of each other along with the directory and project rename, this looks right to me.