"gclient diff" sometimes crashes on unicode diffs |
||||
Issue description$ gclient diff src/third_party/glslang-angle/src (ERROR) ---------------------------------------- [0:00:03] Started. ________ running 'git diff 8ce6e2ba4907c5d062241947bb0300034ea23985' in '/ssd/tnagel/chromium/src/third_party/glslang-angle/src' [0:00:03] diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp [0:00:03] index 7abd04d6..15af947c 100755 [0:00:03] --- a/SPIRV/GlslangToSpv.cpp [0:00:03] +++ b/SPIRV/GlslangToSpv.cpp [0:00:03] @@ -1352,7 +1352,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt [0:00:03] // anything else gets there, so visit out of order, doing them all now. [0:00:03] makeGlobalInitializers(node->getAsAggregate()->getSequence()); [0:00:03] [0:00:03] - // Initializers are done, don't want to visit again, but functions link objects need to be processed, [0:00:03] + // Initializers are done, don't want to visit again, but functions and link objects need to be processed, [0:00:03] // so do them manually. [0:00:03] visitFunctions(node->getAsAggregate()->getSequence()); [0:00:03] [...] Traceback (most recent call last): File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 2388, in <module> sys.exit(main(sys.argv[1:])) File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 2374, in main return dispatcher.execute(OptionParser(), argv) File "/ssd/tnagel/depot_tools/subcommand.py", line 252, in execute return command(parser, args[1:]) File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 2166, in CMDdiff return client.RunOnDeps('diff', args) File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 1415, in RunOnDeps work_queue.flush(revision_overrides, command, args, options=self._options) File "/ssd/tnagel/depot_tools/gclient_utils.py", line 1047, in run self.item.run(*self.args, **self.kwargs) File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 813, in run file_list) File "/ssd/tnagel/depot_tools/gclient_scm.py", line 156, in RunCommand return getattr(self, command)(options, args, file_list) File "/ssd/tnagel/depot_tools/gclient_scm.py", line 278, in diff self._Run(['diff'] + merge_base, options) File "/ssd/tnagel/depot_tools/gclient_scm.py", line 1197, in _Run gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, **kwargs) File "/ssd/tnagel/depot_tools/gclient_utils.py", line 303, in CheckCallAndFilterAndHeader return CheckCallAndFilter(args, **kwargs) File "/ssd/tnagel/depot_tools/gclient_utils.py", line 523, in CheckCallAndFilter filter_fn(in_line) File "/ssd/tnagel/depot_tools/gclient_utils.py", line 298, in filter_msg filter_fn(line) File "/ssd/tnagel/depot_tools/gclient_utils.py", line 578, in __call__ esc = line.find(unichr(033)) UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 63: invalid start byte
,
Jan 8 2018
Yes.
[0:00:08] index 74be2a92..e923aab6 100644
[0:00:08] --- a/openh264.rc
[0:00:08] +++ b/openh264.rc
[0:00:08] @@ -24,8 +24,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
[0:00:08] //
[0:00:08]
[0:00:08] VS_VERSION_INFO VERSIONINFO
[0:00:08] - FILEVERSION 1,6,0,0
[0:00:08] - PRODUCTVERSION 1,6,0,0
[0:00:08] + FILEVERSION 1,7,0,1703
[0:00:08] + PRODUCTVERSION 1,7,0,1703
[0:00:08] FILEFLAGSMASK 0x3fL
[0:00:08] #ifdef _DEBUG
[0:00:08] FILEFLAGS 0x1L
[0:00:08] @@ -43,12 +43,12 @@ BEGIN
[0:00:08] VALUE "Comments", "Cisco OpenH264 codec"
[0:00:08] VALUE "CompanyName", "Cisco Systems Inc."
[0:00:08] VALUE "FileDescription", "Cisco OpenH264 codec"
[0:00:08] - VALUE "FileVersion", "1.6.0.0"
[0:00:08] + VALUE "FileVersion", "1.7.0.1703"
[0:00:08] VALUE "InternalName", "openh264.dll"
----------------------------------------
Traceback (most recent call last):
File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 2679, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 2665, in main
return dispatcher.execute(OptionParser(), argv)
File "/ssd/tnagel/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 2463, in CMDdiff
return client.RunOnDeps('diff', args)
File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 1497, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options)
File "/ssd/tnagel/depot_tools/gclient_utils.py", line 1059, in run
self.item.run(*self.args, **self.kwargs)
File "/usr/local/google/home/tnagel/depot_tools/gclient.py", line 885, in run
file_list)
File "/ssd/tnagel/depot_tools/gclient_scm.py", line 156, in RunCommand
return getattr(self, command)(options, args, file_list)
File "/ssd/tnagel/depot_tools/gclient_scm.py", line 278, in diff
self._Run(['diff'] + merge_base, options)
File "/ssd/tnagel/depot_tools/gclient_scm.py", line 1221, in _Run
gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, **kwargs)
File "/ssd/tnagel/depot_tools/gclient_utils.py", line 314, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "/ssd/tnagel/depot_tools/gclient_utils.py", line 534, in CheckCallAndFilter
filter_fn(in_line)
File "/ssd/tnagel/depot_tools/gclient_utils.py", line 309, in filter_msg
filter_fn(line)
File "/ssd/tnagel/depot_tools/gclient_utils.py", line 589, in __call__
esc = line.find(unichr(033))
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 38: invalid start byte
,
Jan 8 2018
Adding Infra>SDK because gclient is an "SDK" tool. It's probably a silly bug in gclient which expects unicode from git output or something like that. Given the low priority, I'm marking it available for now. We'll revisit it later if it becomes a bigger problem.
,
Feb 12 2018
The invalid characters are showing up because it's diffing the entirety of fontconfig. It's doing that because "gclient diff" is doing the wrong thing. Here's a fix for that: https://chromium-review.googlesource.com/#/c/chromium/tools/depot_tools/+/914717 There could still be a fix specifically for handling unicode characters in diffs better (although I think it does handle that fine from my testing; maybe it's having trouble with unicode filenames?) but this will resolve the major case.
,
Feb 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/1853f66efd16a0e0e6ad14cc75f2287a7fa19521 commit 1853f66efd16a0e0e6ad14cc75f2287a7fa19521 Author: Aaron Gable <agable@chromium.org> Date: Tue Feb 13 00:40:17 2018 gclient: diff against hash in DEPS When someone runs "gclient diff", they expect to be diffing their local state against the state of a clean gclient checkout. Up until now, "gclient diff" has been doing... not that. It's been assuming that the sha1 in DEPS is approximately the head of the remote's master branch, finding the merge-base between the local content and that remote master, and diffing against that merge-base. This makes basically no sense in the context of gclient. With gclient, we already know exactly what should be checked out: it's whatever is in DEPS. This CL updates the behavior of "gclient diff" to do the right thing. Bug: 731701 Change-Id: I23a43cbc0d6bc7772495097ff615d4d070f5ad19 Reviewed-on: https://chromium-review.googlesource.com/914717 Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Aaron Gable <agable@chromium.org> [modify] https://crrev.com/1853f66efd16a0e0e6ad14cc75f2287a7fa19521/gclient_scm.py
,
Feb 14 2018
Now that the immediate issue is solved, dropping this back into the queue of things we'd like to fix but I don't have time to take on right now :) |
||||
►
Sign in to add a comment |
||||
Comment 1 by hzl@chromium.org
, Dec 23 2017