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

Unified Diff: ppapi/PRESUBMIT.py

Issue 23620032: PPAPI: Make API changes w/o IDL changes Warnings if generators have changed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove debug print() Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/PRESUBMIT.py
diff --git a/ppapi/PRESUBMIT.py b/ppapi/PRESUBMIT.py
index 0ae9b0e37e4e628af1beac742adf198ecda41a94..7d6a400bd4d50b638b19cc7a469ed9a8d1106160 100644
--- a/ppapi/PRESUBMIT.py
+++ b/ppapi/PRESUBMIT.py
@@ -159,6 +159,7 @@ def CheckChange(input_api, output_api):
files = input_api.LocalPaths()
h_files = []
idl_files = []
+ generators_changed = False
# Find all relevant .h and .idl files.
for filename in files:
@@ -166,8 +167,10 @@ def CheckChange(input_api, output_api):
name_parts = name.split(os.sep)
if name_parts[0:2] == ['ppapi', 'c'] and ext == '.h':
h_files.append('/'.join(name_parts[2:]))
- if name_parts[0:2] == ['ppapi', 'api'] and ext == '.idl':
+ elif name_parts[0:2] == ['ppapi', 'api'] and ext == '.idl':
idl_files.append('/'.join(name_parts[2:]))
+ elif name_parts[0:2] == ['ppapi', 'generators']:
+ generators_changed = True
# Generate a list of all appropriate *.h and *.idl changes in this CL.
both = h_files + idl_files
@@ -247,10 +250,20 @@ def CheckChange(input_api, output_api):
long_text='\n'.join(missing_dev)))
if missing_stable:
- results.append(
- output_api.PresubmitError(
- 'Missing PPAPI IDL for stable interface:',
- long_text='\n'.join(missing_stable)))
+ # It might be okay that the header changed without a corresponding IDL
+ # change. E.g., comment indenting may have been changed. Treat this as a
+ # warning.
+ if generators_changed:
+ results.append(
+ output_api.PresubmitPromptWarning(
+ 'Missing PPAPI IDL for stable interface (due to change in ' +
+ 'generators?):',
+ long_text='\n'.join(missing_stable)))
+ else:
+ results.append(
+ output_api.PresubmitError(
+ 'Missing PPAPI IDL for stable interface:',
+ long_text='\n'.join(missing_stable)))
# Verify all *.h files match *.idl definitions, use:
# --test to prevent output to disk
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698