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

Issue 1656253003: [GN] Don't rewrite files with the same contents (Closed)

Created:
4 years, 10 months ago by Tomasz Moniuszko
Modified:
4 years, 10 months ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[GN] Don't rewrite files with the same contents BUG= Committed: https://crrev.com/f8ea5cceefcedd4a01935d5ac4d2ba71e23ac13e Cr-Commit-Position: refs/heads/master@{#373544}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Refactor the code according to review suggestions #

Patch Set 3 : Restore original stream types #

Total comments: 2

Patch Set 4 : Fix review issue #

Patch Set 5 : Fix failing test on Mac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -125 lines) Patch
M tools/gn/filesystem_utils.h View 1 1 chunk +12 lines, -0 lines 0 comments Download
M tools/gn/filesystem_utils.cc View 1 1 chunk +80 lines, -0 lines 0 comments Download
M tools/gn/filesystem_utils_unittest.cc View 1 2 3 4 2 chunks +56 lines, -0 lines 0 comments Download
M tools/gn/function_write_file.cc View 1 2 3 2 chunks +3 lines, -68 lines 0 comments Download
M tools/gn/ninja_target_writer.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M tools/gn/visual_studio_writer.cc View 1 2 3 4 chunks +4 lines, -54 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
Tomasz Moniuszko
This patch introduces ContentEquals() method. It's used by RunWriteFile() as suggested in https://codereview.chromium.org/1570113002/. Using WriteFileIfChanged() ...
4 years, 10 months ago (2016-02-02 14:29:12 UTC) #2
brettw
Thanks! https://codereview.chromium.org/1656253003/diff/1/tools/gn/filesystem_utils.cc File tools/gn/filesystem_utils.cc (right): https://codereview.chromium.org/1656253003/diff/1/tools/gn/filesystem_utils.cc#newcode690 tools/gn/filesystem_utils.cc:690: bool ContentsEqual(const base::FilePath& file_path, std::stringstream* data) { I'm ...
4 years, 10 months ago (2016-02-02 20:50:23 UTC) #3
Tomasz Moniuszko
https://codereview.chromium.org/1656253003/diff/1/tools/gn/filesystem_utils.cc File tools/gn/filesystem_utils.cc (right): https://codereview.chromium.org/1656253003/diff/1/tools/gn/filesystem_utils.cc#newcode690 tools/gn/filesystem_utils.cc:690: bool ContentsEqual(const base::FilePath& file_path, std::stringstream* data) { On 2016/02/02 ...
4 years, 10 months ago (2016-02-03 10:20:30 UTC) #4
brettw
lgtm https://codereview.chromium.org/1656253003/diff/40001/tools/gn/function_write_file.cc File tools/gn/function_write_file.cc (right): https://codereview.chromium.org/1656253003/diff/40001/tools/gn/function_write_file.cc#newcode98 tools/gn/function_write_file.cc:98: *err = Err(function->function(), err->message()); Can you also add ...
4 years, 10 months ago (2016-02-03 18:27:08 UTC) #5
Tomasz Moniuszko
https://codereview.chromium.org/1656253003/diff/40001/tools/gn/function_write_file.cc File tools/gn/function_write_file.cc (right): https://codereview.chromium.org/1656253003/diff/40001/tools/gn/function_write_file.cc#newcode98 tools/gn/function_write_file.cc:98: *err = Err(function->function(), err->message()); On 2016/02/03 18:27:07, brettw wrote: ...
4 years, 10 months ago (2016-02-04 11:41:32 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1656253003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1656253003/60001
4 years, 10 months ago (2016-02-04 11:42:01 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/175089)
4 years, 10 months ago (2016-02-04 11:56:35 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1656253003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1656253003/80001
4 years, 10 months ago (2016-02-04 15:17:02 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-02-04 15:58:29 UTC) #15
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/f8ea5cceefcedd4a01935d5ac4d2ba71e23ac13e Cr-Commit-Position: refs/heads/master@{#373544}
4 years, 10 months ago (2016-02-04 15:59:25 UTC) #17
please use gerrit instead
4 years, 10 months ago (2016-02-05 18:35:27 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/1672783002/ by rouslan@chromium.org.

The reason for reverting is: Need to revert this patch according
https://sites.google.com/a/chromium.org/dev/developers/tree-sheriffs/sheriffi....
This patch added a flaky test FilesystemUtils.WriteFileIfChanged.

-----

It's a test flake:
1) Try to find the patch that caused the flake. It should be recent (e.g. last
day or two) in all likelihood.
2) If successful with finding that patch, revert the patch. This is especially
true if the flake is from a new test introduced in that patch.
3) Close the bug.

-----

The test has failed in the following builds:

http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...

-----

Example failure:

[ RUN      ] FilesystemUtils.WriteFileIfChanged
../../tools/gn/filesystem_utils_unittest.cc:610: Failure
Expected: (last_modified) != (file_info.last_modified), actual: 2016-02-04
18:06:36.920 UTC vs 2016-02-04 18:06:36.920 UTC
[  FAILED  ] FilesystemUtils.WriteFileIfChanged (3 ms)
[315/315] FilesystemUtils.WriteFileIfChanged (3 ms)
Retrying 1 test (retry #2)
[ RUN      ] FilesystemUtils.WriteFileIfChanged
../../tools/gn/filesystem_utils_unittest.cc:610: Failure
Expected: (last_modified) != (file_info.last_modified), actual: 2016-02-04
18:06:36.936 UTC vs 2016-02-04 18:06:36.936 UTC
[  FAILED  ] FilesystemUtils.WriteFileIfChanged (2 ms)
[316/316] FilesystemUtils.WriteFileIfChanged (2 ms)
Retrying 1 test (retry #3)
[ RUN      ] FilesystemUtils.WriteFileIfChanged
../../tools/gn/filesystem_utils_unittest.cc:610: Failure
Expected: (last_modified) != (file_info.last_modified), actual: 2016-02-04
18:06:36.952 UTC vs 2016-02-04 18:06:36.952 UTC
[  FAILED  ] FilesystemUtils.WriteFileIfChanged (2 ms)
[317/317] FilesystemUtils.WriteFileIfChanged (2 ms)
1 test failed:
    FilesystemUtils.WriteFileIfChanged
(../../tools/gn/filesystem_utils_unittest.cc:579)

-----

More details in http://crbug.com/584548..

Powered by Google App Engine
This is Rietveld 408576698