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

Issue 10805042: Implement ability to specify temporarily-allowed dependencies in DEPS (Closed)

Created:
8 years, 5 months ago by Jói
Modified:
8 years, 4 months ago
Reviewers:
brettw, jam, sky, M-A Ruel
CC:
chromium-reviews, pam+watch_chromium.org, browser-components-dev_chromium.org
Visibility:
Public.

Description

Implement ability to specify temporarily-allowed dependencies in DEPS files, and use this ability in a few DEPS files where appropriate. This has no effect on the normal running of checkdeps; "!" dependencies are treated just like "+" dependencies when checkdeps is run on our bots. An upcoming change will use the new checkdeps.CheckAddedIncludes function, and will error out if you add a new include that violates a "-" rule, and show a presubmit warning when you add a new include that violates a "!" rule (the warning will say something like "We are in the process of removing dependencies from this directory to that file, can you avoid adding more?" While I was in there, fixed path handling so that checkdeps will work on case-sensitive platforms with paths that include upper-case characters (e.g. a checkout of Chrome at ~/c/Chrome/src rather than ~/c/chrome/src). Since the pipes.quote method seems unreliable on Windows (it failed on my setup), switched to subprocess.list2cmdline which I believe is stable. Added a small manual testing mode to checkdeps. It currently only verifies the CheckAddedIncludes function. TBR=jam@chromium.org BUG=138280 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149163

Patch Set 1 #

Total comments: 5

Patch Set 2 : Large merge post Java-checker change. #

Patch Set 3 : Remove unneeded import. #

Total comments: 22

Patch Set 4 : Respond to review comments. #

Total comments: 18

Patch Set 5 : Respond to review comments. Add automated unit tests. #

Total comments: 4

Patch Set 6 : Address final nits. #

Patch Set 7 : Fix Windows issues. #

Patch Set 8 : Temp to test presub in SVN repo #

Patch Set 9 : Fix test to not rely on order #

Patch Set 10 : Merge to LKGR. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+619 lines, -322 lines) Patch
M chrome/browser/DEPS View 2 chunks +14 lines, -14 lines 0 comments Download
M chrome/browser/ui/DEPS View 1 chunk +10 lines, -10 lines 0 comments Download
M chrome/test/DEPS View 1 chunk +3 lines, -3 lines 0 comments Download
A tools/checkdeps/DEPS View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A tools/checkdeps/PRESUBMIT.py View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
M tools/checkdeps/checkdeps.py View 1 2 3 4 5 6 7 5 chunks +303 lines, -282 lines 0 comments Download
A tools/checkdeps/checkdeps_test.py View 1 2 3 4 5 6 7 8 1 chunk +91 lines, -0 lines 0 comments Download
M tools/checkdeps/cpp_checker.py View 1 2 3 4 3 chunks +26 lines, -12 lines 0 comments Download
M tools/checkdeps/java_checker.py View 1 2 chunks +3 lines, -1 line 0 comments Download
A tools/checkdeps/rules.py View 1 2 3 4 1 chunk +89 lines, -0 lines 0 comments Download
A tools/checkdeps/testdata/DEPS View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A tools/checkdeps/testdata/allowed/DEPS View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A tools/checkdeps/testdata/allowed/test.h View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
A tools/checkdeps/testdata/disallowed/allowed/DEPS View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A tools/checkdeps/testdata/disallowed/allowed/skipped/test.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A tools/checkdeps/testdata/disallowed/allowed/test.h View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
A tools/checkdeps/testdata/disallowed/test.h View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
Jói
brettw: Main reviewer. sky: chrome/browser/ui OWNER. I've tested the checkdeps functionality manually on Windows and ...
8 years, 5 months ago (2012-07-20 18:42:50 UTC) #1
Jói
Meant to include jam@ on reviewers list so he is aware of the DEPS file ...
8 years, 5 months ago (2012-07-20 18:45:29 UTC) #2
M-A Ruel
This change will conflict with https://chromiumcodereview.appspot.com/10790014/ http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py#newcode245 tools/checkdeps/checkdeps.py:245: (dir_name in GIT_SOURCE_DIRECTORY)): ...
8 years, 5 months ago (2012-07-20 19:57:00 UTC) #3
Jói
Thanks for the heads up on the conflict. Iain's change has been going for a ...
8 years, 5 months ago (2012-07-20 20:01:41 UTC) #4
jam
nice, just one comment http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py#newcode27 tools/checkdeps/checkdeps.py:27: show a warning if you ...
8 years, 5 months ago (2012-07-20 20:08:49 UTC) #5
brettw
This seems fine in concept. I'm sure maruel can review the python code, I didn't ...
8 years, 5 months ago (2012-07-20 21:25:02 UTC) #6
Jói
http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py#newcode27 tools/checkdeps/checkdeps.py:27: show a warning if you add a new include ...
8 years, 5 months ago (2012-07-20 21:57:39 UTC) #7
jam
http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10805042/diff/1/tools/checkdeps/checkdeps.py#newcode27 tools/checkdeps/checkdeps.py:27: show a warning if you add a new include ...
8 years, 5 months ago (2012-07-20 23:23:33 UTC) #8
Jói
Marc-Antoine: Could you take a look? I've merged after the large Java-checking patch landed. I ...
8 years, 5 months ago (2012-07-25 17:16:32 UTC) #9
Jói
maruel: Friendly ping. On Wed, Jul 25, 2012 at 5:16 PM, <joi@chromium.org> wrote: > Marc-Antoine: ...
8 years, 5 months ago (2012-07-26 10:04:16 UTC) #10
M-A Ruel
http://codereview.chromium.org/10805042/diff/11001/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10805042/diff/11001/tools/checkdeps/checkdeps.py#newcode112 tools/checkdeps/checkdeps.py:112: if os.path.normcase(os.path.normpath(cur_dir)).startswith( normcase is totally useless: http://docs.python.org/library/os.path.html#os.path.normcase I implemented ...
8 years, 5 months ago (2012-07-26 13:06:02 UTC) #11
Jói
Thanks Marc-Antoine! I've uploaded a new version that responds to your feedback, see comments below. ...
8 years, 5 months ago (2012-07-26 13:32:12 UTC) #12
M-A Ruel
http://codereview.chromium.org/10805042/diff/11001/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10805042/diff/11001/tools/checkdeps/checkdeps.py#newcode385 tools/checkdeps/checkdeps.py:385: global BASE_DIRECTORY On 2012/07/26 13:32:13, Jói wrote: > On ...
8 years, 5 months ago (2012-07-26 13:50:51 UTC) #13
Jói
OK, understood now about the imports. I will get rid of the globals to fix ...
8 years, 5 months ago (2012-07-26 13:54:25 UTC) #14
Jói
Marc-Antoine, thanks again for the thorough review. I think I've addressed all of your points, ...
8 years, 5 months ago (2012-07-26 17:05:52 UTC) #15
M-A Ruel
lgtm with nits http://codereview.chromium.org/10805042/diff/15010/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10805042/diff/15010/tools/checkdeps/checkdeps.py#newcode140 tools/checkdeps/checkdeps.py:140: for (_, rule_str) in enumerate(includes): I ...
8 years, 5 months ago (2012-07-26 18:30:07 UTC) #16
Jói
Thanks, addressed the nits. > Are you sure this directory won't trigger in normal check_deps ...
8 years, 5 months ago (2012-07-26 22:40:30 UTC) #17
Jói
Actually, fails with "too many values to unpack" if I remove enumerate, so put that ...
8 years, 5 months ago (2012-07-26 22:41:13 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/10805042/20002
8 years, 4 months ago (2012-07-30 12:33:24 UTC) #19
commit-bot: I haz the power
Presubmit check for 10805042-20002 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-07-30 12:33:35 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/10805042/21018
8 years, 4 months ago (2012-07-30 12:58:20 UTC) #21
commit-bot: I haz the power
Presubmit check for 10805042-21018 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-07-30 12:58:28 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/10805042/11007
8 years, 4 months ago (2012-07-30 13:12:13 UTC) #23
commit-bot: I haz the power
Presubmit check for 10805042-11007 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-07-30 13:12:37 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/10805042/11007
8 years, 4 months ago (2012-07-30 13:18:54 UTC) #25
commit-bot: I haz the power
Try job failure for 10805042-11007 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 4 months ago (2012-07-30 15:23:30 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/10805042/12028
8 years, 4 months ago (2012-07-31 09:23:55 UTC) #27
commit-bot: I haz the power
8 years, 4 months ago (2012-07-31 10:40:02 UTC) #28
Change committed as 149163

Powered by Google App Engine
This is Rietveld 408576698