Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Issue 1890053004: Stop gyp_chromium prior to mass DLL copies on error (Closed)

Created:
4 years, 8 months ago by gab
Modified:
4 years, 8 months ago
Reviewers:
scottmg, brucedawson
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop gyp_chromium prior to mass DLL copies on error Also fix last-modified-time comparison code to handle minor float differences and thus correctly not copy identical files (for some reason there appears to be a ~1e-07 diff between last-modified-time of copied files...?). BUG=603603 TEST=No more copy output from gyp_chromium when copied DLLs are already there or gyp_rc != 0 :-) Committed: https://crrev.com/381d9f17b002b97ea4cf38a859d91fafd051c587 Cr-Commit-Position: refs/heads/master@{#387911}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove unecessary copies #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M build/gyp_chromium.py View 1 chunk +1 line, -1 line 0 comments Download
M build/vs_toolchain.py View 1 2 chunks +5 lines, -4 lines 3 comments Download

Messages

Total messages: 21 (10 generated)
gab
PTAL, thanks https://codereview.chromium.org/1890053004/diff/1/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1890053004/diff/1/build/vs_toolchain.py#newcode161 build/vs_toolchain.py:161: os.stat(target).st_mtime != os.stat(source).st_mtime)): Seems to already be ...
4 years, 8 months ago (2016-04-15 19:11:24 UTC) #2
scottmg
Thanks, lgtm https://codereview.chromium.org/1890053004/diff/1/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1890053004/diff/1/build/vs_toolchain.py#newcode188 build/vs_toolchain.py:188: print 'Copying %s to %s...' % (ucrt_src_dir, ...
4 years, 8 months ago (2016-04-15 19:45:28 UTC) #3
gab
Dug a little deeper and figured out why the last-modified-time comparison failed (float exact compare ...
4 years, 8 months ago (2016-04-18 14:41:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1890053004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1890053004/20001
4 years, 8 months ago (2016-04-18 14:42:04 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-18 15:29:23 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/381d9f17b002b97ea4cf38a859d91fafd051c587 Cr-Commit-Position: refs/heads/master@{#387911}
4 years, 8 months ago (2016-04-18 15:31:51 UTC) #15
scottmg
https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py#newcode163 build/vs_toolchain.py:163: abs(os.stat(target).st_mtime - os.stat(source).st_mtime) >= 0.01)): Gah! Why the heck ...
4 years, 8 months ago (2016-04-18 16:48:39 UTC) #16
gab
https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py#newcode163 build/vs_toolchain.py:163: abs(os.stat(target).st_mtime - os.stat(source).st_mtime) >= 0.01)): On 2016/04/18 16:48:39, scottmg ...
4 years, 8 months ago (2016-04-18 16:58:51 UTC) #17
scottmg
On 2016/04/18 16:58:51, gab wrote: > https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py > File build/vs_toolchain.py (right): > > https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py#newcode163 > ...
4 years, 8 months ago (2016-04-18 17:04:26 UTC) #18
brucedawson
https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py#newcode163 build/vs_toolchain.py:163: abs(os.stat(target).st_mtime - os.stat(source).st_mtime) >= 0.01)): WTF? There's something weird ...
4 years, 8 months ago (2016-04-18 18:25:17 UTC) #20
scottmg
4 years, 8 months ago (2016-04-18 19:46:29 UTC) #21
Message was sent while issue was closed.
On 2016/04/18 18:25:17, brucedawson wrote:
> https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py
> File build/vs_toolchain.py (right):
> 
>
https://codereview.chromium.org/1890053004/diff/20001/build/vs_toolchain.py#n...
> build/vs_toolchain.py:163: abs(os.stat(target).st_mtime -
> os.stat(source).st_mtime) >= 0.01)):
> WTF? There's something weird going on. When I run:
> 
>   os.stat("PRESUBMIT.PY")
> 
> it says st_mtime=1460399946L, but when I run:
> 
>   os.stat("PRESUBMIT.PY").st_mtime
> 
> it says "1460399946.7608104"
> 
> That inconsistency is disturbing - I don't understand it.
> 
> Using the C stat() function gives the answer 1460399946, but using GetFileTime
> gives sub-second precision that roughly matches Python.
> 
> So...
> 
> It is right and proper for Python to use float (which is actually double) for
> the file times. But I don't understand why when I print the entire stat()
result
> it says it is returning a long integer. And I don't understand why st_mtime
> varies when the file is copied.
> 
> BTW, 1e7 is the resolution of FILETIME in Windows, so the error is one unit in
> the last place.
> 
> Also, I don't know why my FILETIME results don't perfectly match Python's,
> although that may be because I didn't add timezone conversion code.

Hooboy:

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> x=os.stat('host.cc')
>>> x.st_mtime
1461008092.2359645
>>> x.__str__()
'nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0,
st_gid=0, st_size=3209L, st_atime=1461008092L, st_mtime=1461008092L,
st_ctime=1461008092L)'
>>> x.__repr__()
'nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0,
st_gid=0, st_size=3209L, st_atime=1461008092L, st_mtime=1461008092L,
st_ctime=1461008092L)'
>>> getattr(x, 'st_mtime')
1461008092.2359645
>>> import stat
>>> x[stat.ST_MTIME]
1461008092L
>>>

Should probably check out _stat.c or stat.c but I probably don't really want to
know.

Powered by Google App Engine
This is Rietveld 408576698