|
34 | 34 | from collections import namedtuple
|
35 | 35 | import sys
|
36 | 36 |
|
37 |
| -compile_note = "Be sure to run your patch by the compile_frontend.py script prior to committing!" |
38 |
| - |
39 | 37 | CheckOutput = namedtuple('CheckOutput', ['results', 'has_errors'])
|
40 | 38 |
|
41 | 39 |
|
@@ -112,26 +110,14 @@ def _CheckDevtoolsStyle(input_api, output_api):
|
112 | 110 |
|
113 | 111 |
|
114 | 112 | def _CompileDevtoolsFrontend(input_api, output_api):
|
115 |
| - local_paths = [f.LocalPath() for f in input_api.AffectedFiles()] |
116 |
| - |
117 |
| - # FIXME: The compilation does not actually run if injected script-related files |
118 |
| - # have changed, as they reside in core/inspector, which is not affected |
119 |
| - # by this presubmit. |
120 |
| - # Once this is fixed, injected_script_externs.js |
121 |
| - # should be added to the list of triggers. |
122 |
| - devtools_front_end = input_api.os_path.join("devtools", "front_end") |
123 |
| - if (any(devtools_front_end in path for path in local_paths) or any("_protocol.json" in path for path in local_paths) or |
124 |
| - any("compile_frontend.py" in path for path in local_paths) or any("InjectedScriptSource.js" in path |
125 |
| - for path in local_paths) or |
126 |
| - any("DebuggerScript.js" in path for path in local_paths)): |
127 |
| - lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(), "scripts", "compile_frontend.py") |
128 |
| - out, _ = input_api.subprocess.Popen( |
129 |
| - [input_api.python_executable, lint_path], stdout=input_api.subprocess.PIPE, |
130 |
| - stderr=input_api.subprocess.STDOUT).communicate() |
131 |
| - if "ERROR" in out or "WARNING" in out: |
132 |
| - return [output_api.PresubmitError(out)] |
133 |
| - if "NOTE" in out: |
134 |
| - return [output_api.PresubmitPromptWarning(out + compile_note)] |
| 113 | + compile_path = input_api.os_path.join(input_api.PresubmitLocalPath(), "scripts", "compile_frontend.py") |
| 114 | + out, _ = input_api.subprocess.Popen( |
| 115 | + [input_api.python_executable, compile_path], stdout=input_api.subprocess.PIPE, |
| 116 | + stderr=input_api.subprocess.STDOUT).communicate() |
| 117 | + if "ERROR" in out or "WARNING" in out: |
| 118 | + return [output_api.PresubmitError(out)] |
| 119 | + if "NOTE" in out: |
| 120 | + return [output_api.PresubmitPromptWarning(out)] |
135 | 121 | return []
|
136 | 122 |
|
137 | 123 |
|
|
0 commit comments