Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Issue 1718243003: [Extern Generation] Add a presubmit script to check externs not being updated (Closed)

Created:
4 years, 10 months ago by Devlin
Modified:
4 years, 9 months ago
Reviewers:
jam, Dan Beam
CC:
chromium-reviews, dbeam+watch-options_chromium.org, extensions-reviews_chromium.org, michaelpg+watch-options_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, chromium-apps-reviews_chromium.org, vitalyp+closure_chromium.org, dbeam+watch-settings_chromium.org, dbeam+watch-closure_chromium.org, stevenjb+watch-md-settings_chromium.org, jlklein+watch-closure_chromium.org, sky
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extern Generation] Add a presubmit script to check externs not being updated Add a presubmit script that checks for when extension api files are touched, but the corresponding extern file is not. Right now, this is very simple - it only checks that the extern is modified in some way (doesn't validate that it's the *right* way), and is only a warning (because sometimes api file changes don't cause extern changes). As an improvement, we would validate that the extern files contain the proper content - let's do that later. This will also be rolled out piecemeal, since many APIs don't currently have a dedicated extern file. This change only imposes the check on bluetooth (because it was handy) - if all goes well, we'll roll this out to all api files. Also establish a dedicated extern folder, since it's silly for chrome-generated externs to live in third_party/. BUG=469920 Committed: https://crrev.com/9ab806c3e9213b95a7a4ab1342c9b4d5ff49830f Cr-Commit-Position: refs/heads/master@{#378018}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Dan's #

Total comments: 15

Patch Set 3 : Dan's II #

Patch Set 4 : #

Total comments: 10

Patch Set 5 #

Total comments: 2

Patch Set 6 : #

Total comments: 1

Patch Set 7 : Move file back #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -0 lines) Patch
M PRESUBMIT_test_mocks.py View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A extensions/common/api/PRESUBMIT.py View 1 2 3 4 5 6 1 chunk +37 lines, -0 lines 0 comments Download
A extensions/common/api/externs_checker.py View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
A extensions/common/api/externs_checker_test.py View 1 2 3 4 1 chunk +63 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (8 generated)
Devlin
v1, starting small. https://codereview.chromium.org/1718243003/diff/1/extensions/common/api/PRESUBMIT.py File extensions/common/api/PRESUBMIT.py (right): https://codereview.chromium.org/1718243003/diff/1/extensions/common/api/PRESUBMIT.py#newcode14 extensions/common/api/PRESUBMIT.py:14: 'extensions/common/api/bluetooth.idl': 'ui/externs/bluetooth.js', Just adding one for ...
4 years, 10 months ago (2016-02-22 23:26:15 UTC) #2
Dan Beam
we mainly compile UI written with JS right now. but I don't think externs are ...
4 years, 10 months ago (2016-02-23 03:15:24 UTC) #3
Dan Beam
On 2016/02/23 03:15:24, Dan Beam wrote: > we mainly compile UI written with JS right ...
4 years, 10 months ago (2016-02-23 03:16:24 UTC) #4
Devlin
https://codereview.chromium.org/1718243003/diff/1/extensions/common/api/PRESUBMIT.py File extensions/common/api/PRESUBMIT.py (right): https://codereview.chromium.org/1718243003/diff/1/extensions/common/api/PRESUBMIT.py#newcode14 extensions/common/api/PRESUBMIT.py:14: 'extensions/common/api/bluetooth.idl': 'ui/externs/bluetooth.js', On 2016/02/23 03:15:23, Dan Beam wrote: > ...
4 years, 10 months ago (2016-02-23 23:12:39 UTC) #6
Dan Beam
still not sure about ui/... maybe ui/base? js can be everywhere... https://codereview.chromium.org/1718243003/diff/40001/extensions/common/api/PRESUBMIT.py File extensions/common/api/PRESUBMIT.py (right): ...
4 years, 10 months ago (2016-02-23 23:26:18 UTC) #7
Devlin
On 2016/02/23 23:26:18, Dan Beam wrote: > still not sure about ui/... > > maybe ...
4 years, 10 months ago (2016-02-24 00:05:06 UTC) #8
Dan Beam
https://codereview.chromium.org/1718243003/diff/40001/extensions/common/api/PRESUBMIT.py File extensions/common/api/PRESUBMIT.py (right): https://codereview.chromium.org/1718243003/diff/40001/extensions/common/api/PRESUBMIT.py#newcode29 extensions/common/api/PRESUBMIT.py:29: #TODO(devlin): Add more! On 2016/02/24 00:05:05, Devlin (Slow until ...
4 years, 10 months ago (2016-02-24 00:15:32 UTC) #9
Devlin
https://codereview.chromium.org/1718243003/diff/40001/extensions/common/api/PRESUBMIT.py File extensions/common/api/PRESUBMIT.py (right): https://codereview.chromium.org/1718243003/diff/40001/extensions/common/api/PRESUBMIT.py#newcode29 extensions/common/api/PRESUBMIT.py:29: #TODO(devlin): Add more! On 2016/02/24 00:15:31, Dan Beam wrote: ...
4 years, 10 months ago (2016-02-24 00:24:23 UTC) #10
Devlin
https://codereview.chromium.org/1718243003/diff/40001/extensions/common/api/PRESUBMIT.py File extensions/common/api/PRESUBMIT.py (right): https://codereview.chromium.org/1718243003/diff/40001/extensions/common/api/PRESUBMIT.py#newcode29 extensions/common/api/PRESUBMIT.py:29: #TODO(devlin): Add more! On 2016/02/24 00:24:23, Devlin (Slow until ...
4 years, 10 months ago (2016-02-24 00:27:30 UTC) #11
Dan Beam
eh, i still don't really think bluetooth extension API externs belong in ui/base. they should ...
4 years, 10 months ago (2016-02-24 00:50:43 UTC) #12
Devlin
Talking offline about extern location https://codereview.chromium.org/1718243003/diff/80001/extensions/common/api/PRESUBMIT.py File extensions/common/api/PRESUBMIT.py (right): https://codereview.chromium.org/1718243003/diff/80001/extensions/common/api/PRESUBMIT.py#newcode12 extensions/common/api/PRESUBMIT.py:12: On 2016/02/24 00:50:42, Dan ...
4 years, 10 months ago (2016-02-24 04:45:24 UTC) #13
Dan Beam
lgtm https://codereview.chromium.org/1718243003/diff/100001/extensions/common/api/externs_checker.py File extensions/common/api/externs_checker.py (right): https://codereview.chromium.org/1718243003/diff/100001/extensions/common/api/externs_checker.py#newcode15 extensions/common/api/externs_checker.py:15: def _GetWarningText(self, entries): I don't really see the ...
4 years, 10 months ago (2016-02-24 19:06:49 UTC) #14
Dan Beam
(but you're gonna need to find a ui/base/ owner that agreed with your location placement)
4 years, 10 months ago (2016-02-24 19:07:28 UTC) #15
Devlin
Scott, are you okay with the externs location?
4 years, 10 months ago (2016-02-25 01:08:04 UTC) #17
Devlin
https://codereview.chromium.org/1718243003/diff/100001/extensions/common/api/externs_checker.py File extensions/common/api/externs_checker.py (right): https://codereview.chromium.org/1718243003/diff/100001/extensions/common/api/externs_checker.py#newcode15 extensions/common/api/externs_checker.py:15: def _GetWarningText(self, entries): On 2016/02/24 19:06:49, Dan Beam wrote: ...
4 years, 10 months ago (2016-02-25 01:14:11 UTC) #18
Dan Beam
https://codereview.chromium.org/1718243003/diff/120001/extensions/common/api/externs_checker.py File extensions/common/api/externs_checker.py (right): https://codereview.chromium.org/1718243003/diff/120001/extensions/common/api/externs_checker.py#newcode24 extensions/common/api/externs_checker.py:24: replacements = (('<source_file>', '<output_file>') if len(bad_files) > 1 else ...
4 years, 10 months ago (2016-02-25 01:42:53 UTC) #19
sky
On 2016/02/25 01:08:04, Devlin (Slow until 2-26) wrote: > Scott, are you okay with the ...
4 years, 10 months ago (2016-02-25 02:32:10 UTC) #20
Devlin
On 2016/02/25 02:32:10, sky wrote: > On 2016/02/25 01:08:04, Devlin (Slow until 2-26) wrote: > ...
4 years, 10 months ago (2016-02-25 03:58:14 UTC) #21
sky
What about extensions/presubmit? Yes, it means the other sites are pulling from the extensions dir, ...
4 years, 10 months ago (2016-02-25 17:15:44 UTC) #22
Devlin
Closure externs aren't just for presumbit, so I'm not sure that having them in a ...
4 years, 10 months ago (2016-02-25 17:39:36 UTC) #23
sky
Ah, ok. I don't think this makes sense in ui, and I see how it ...
4 years, 10 months ago (2016-02-25 18:50:15 UTC) #24
Devlin
Since we couldn't decide on a better place to put these, I'm leaving them where ...
4 years, 10 months ago (2016-02-26 01:29:07 UTC) #26
Devlin
+John for PRESUBMIT_test_mocks.py
4 years, 10 months ago (2016-02-26 01:29:32 UTC) #28
jam
lgtm
4 years, 10 months ago (2016-02-26 21:33:01 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1718243003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1718243003/140001
4 years, 10 months ago (2016-02-26 21:42:06 UTC) #32
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 9 months ago (2016-02-26 23:17:22 UTC) #33
commit-bot: I haz the power
4 years, 9 months ago (2016-02-26 23:18:49 UTC) #35
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9ab806c3e9213b95a7a4ab1342c9b4d5ff49830f
Cr-Commit-Position: refs/heads/master@{#378018}

Powered by Google App Engine
This is Rietveld 408576698