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

Unified Diff: PRESUBMIT.py

Issue 2895773002: (fix landed)Revert of Closure: remove older, original GYP compilation system (Closed)
Patch Set: Created 3 years, 7 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 | PRESUBMIT_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index b61bd5387c4fb94ec039ee97b2f586475e0974fa..a32035426b498e53b62f927050b27b0f64f925ef 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -2057,6 +2057,26 @@
'template gets instantiated in a single compilation unit.',
files) ]
return []
+
+
+def _CheckNoDeprecatedCompiledResourcesGyp(input_api, output_api):
+ """Checks for old style compiled_resources.gyp files."""
+ is_compiled_resource = lambda fp: fp.endswith('compiled_resources.gyp')
+
+ added_compiled_resources = filter(is_compiled_resource, [
+ f.LocalPath() for f in input_api.AffectedFiles() if f.Action() == 'A'
+ ])
+
+ if not added_compiled_resources:
+ return []
+
+ return [output_api.PresubmitError(
+ "Found new compiled_resources.gyp files:\n%s\n\n"
+ "compiled_resources.gyp files are deprecated,\n"
+ "please use compiled_resources2.gyp instead:\n"
+ "https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md"
+ %
+ "\n".join(added_compiled_resources))]
_DEPRECATED_CSS = [
@@ -2214,6 +2234,7 @@
results.extend(_CheckForIPCRules(input_api, output_api))
results.extend(_CheckForWindowsLineEndings(input_api, output_api))
results.extend(_CheckSingletonInHeaders(input_api, output_api))
+ results.extend(_CheckNoDeprecatedCompiledResourcesGyp(input_api, output_api))
results.extend(_CheckPydepsNeedsUpdating(input_api, output_api))
results.extend(_CheckJavaStyle(input_api, output_api))
results.extend(_CheckIpcOwners(input_api, output_api))
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698