|
|
Created:
4 years, 4 months ago by maksims (do not use this acc) Modified:
4 years, 4 months ago Reviewers:
Dirk Pranke CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[Presubmit tests] Warn when new source files are not added to GN/GYPi files.
Add a presubmit check that warns when new source files are
not added to GN or gypi files.
BUG=112371
Committed: https://crrev.com/c4acbcd92229d9635ae0a3dafb65dfc285db0aec
Cr-Commit-Position: refs/heads/master@{#414003}
Patch Set 1 #
Total comments: 4
Patch Set 2 : comments #Patch Set 3 : rebased #Messages
Total messages: 33 (23 generated)
The CQ bit was checked by maksim.sisov@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== presubmit BUG= ========== to ========== [Presubmit tests] Warn when new source files are not added to GN files. Add a presubmit check that warns when new source files are not added to GN files. BUG=112371 ==========
maksim.sisov@intel.com changed reviewers: + dpranke@chromium.org
please review.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Generally, I'm supportive of the idea. It would be interesting to see if there are false positives or false negatives with this sort of checking. I'm not sure what the best way to do that would be, though. Maybe look at the past N commits in chromium and try to apply the logic to the diffs and lists of affected files and see if it looks right? https://codereview.chromium.org/2252043004/diff/1/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/2252043004/diff/1/PRESUBMIT.py#newcode1959 PRESUBMIT.py:1959: if line.startswith('@@ -0,0'): You don't need to look at the diff. f.Action() returns 'A', 'M', 'D' for add/modify/deleted, so you can just look for f.Action() == 'A'. https://codereview.chromium.org/2252043004/diff/1/PRESUBMIT.py#newcode1966 PRESUBMIT.py:1966: if not gn_files: Eventually something like this'll be the right check, but for now some file lists are still held in .gypi files, so you'd really need to look for changes to either gn or gypi files, and it might be a bit confusing until we're fully off of GYP and the files have been deleted.
I checked with several commits in the git history and there has been no false positives or false negatives so far. Works as expected. https://codereview.chromium.org/2252043004/diff/1/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/2252043004/diff/1/PRESUBMIT.py#newcode1959 PRESUBMIT.py:1959: if line.startswith('@@ -0,0'): On 2016/08/19 20:42:02, Dirk Pranke wrote: > You don't need to look at the diff. > > f.Action() returns 'A', 'M', 'D' for add/modify/deleted, so you can just look > for f.Action() == 'A'. Done. https://codereview.chromium.org/2252043004/diff/1/PRESUBMIT.py#newcode1966 PRESUBMIT.py:1966: if not gn_files: On 2016/08/19 20:42:02, Dirk Pranke wrote: > Eventually something like this'll be the right check, but for now some file > lists are still held in .gypi files, so you'd really need to look for changes to > either gn or gypi files, and it might be a bit confusing until we're fully off > of GYP and the files have been deleted. Done.
okay, let's give it a shot. lgtm.
The CQ bit was checked by maksim.sisov@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [Presubmit tests] Warn when new source files are not added to GN files. Add a presubmit check that warns when new source files are not added to GN files. BUG=112371 ========== to ========== [Presubmit tests] Warn when new source files are not added to GN files. Add a presubmit check that warns when new source files are not added to GN or gypi files. BUG=112371 ==========
Description was changed from ========== [Presubmit tests] Warn when new source files are not added to GN files. Add a presubmit check that warns when new source files are not added to GN or gypi files. BUG=112371 ========== to ========== [Presubmit tests] Warn when new source files are not added to GN/GYPi files. Add a presubmit check that warns when new source files are not added to GN or gypi files. BUG=112371 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by maksim.sisov@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
Patchset #3 (id:40001) has been deleted
The CQ bit was checked by maksim.sisov@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by maksim.sisov@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from dpranke@chromium.org Link to the patchset: https://codereview.chromium.org/2252043004/#ps60001 (title: "rebased")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [Presubmit tests] Warn when new source files are not added to GN/GYPi files. Add a presubmit check that warns when new source files are not added to GN or gypi files. BUG=112371 ========== to ========== [Presubmit tests] Warn when new source files are not added to GN/GYPi files. Add a presubmit check that warns when new source files are not added to GN or gypi files. BUG=112371 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== [Presubmit tests] Warn when new source files are not added to GN/GYPi files. Add a presubmit check that warns when new source files are not added to GN or gypi files. BUG=112371 ========== to ========== [Presubmit tests] Warn when new source files are not added to GN/GYPi files. Add a presubmit check that warns when new source files are not added to GN or gypi files. BUG=112371 Committed: https://crrev.com/c4acbcd92229d9635ae0a3dafb65dfc285db0aec Cr-Commit-Position: refs/heads/master@{#414003} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/c4acbcd92229d9635ae0a3dafb65dfc285db0aec Cr-Commit-Position: refs/heads/master@{#414003}
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:60001) has been created in https://codereview.chromium.org/2268403005/ by dpranke@chromium.org. The reason for reverting is: Reverting ... apparently "warnings" actually cause the presubmit check to fail. This check should probably be upload-only (not commit) so that it can be bypassed, at least until we're sure it's not producing false positives.. |