Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 Google Inc. All rights reserved. | 2 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 java_exec = find_java() | 241 java_exec = find_java() |
| 242 | 242 |
| 243 closure_compiler_jar = to_platform_path(path.join(scripts_path, 'closure', 'comp iler.jar')) | 243 closure_compiler_jar = to_platform_path(path.join(scripts_path, 'closure', 'comp iler.jar')) |
| 244 closure_runner_jar = to_platform_path(path.join(scripts_path, 'closure', 'closur e_runner', 'closure_runner.jar')) | 244 closure_runner_jar = to_platform_path(path.join(scripts_path, 'closure', 'closur e_runner', 'closure_runner.jar')) |
| 245 jsdoc_validator_jar = to_platform_path(path.join(scripts_path, 'jsdoc_validator' , 'jsdoc_validator.jar')) | 245 jsdoc_validator_jar = to_platform_path(path.join(scripts_path, 'jsdoc_validator' , 'jsdoc_validator.jar')) |
| 246 | 246 |
| 247 modules_dir = tempfile.mkdtemp() | 247 modules_dir = tempfile.mkdtemp() |
| 248 common_closure_args = [ | 248 common_closure_args = [ |
| 249 '--summary_detail_level', '3', | 249 '--summary_detail_level', '3', |
| 250 '--jscomp_error', 'visibility', | 250 '--jscomp_error', 'visibility', |
| 251 '--jscomp_warning', 'missingOverride', | |
| 251 '--compilation_level', 'SIMPLE_OPTIMIZATIONS', | 252 '--compilation_level', 'SIMPLE_OPTIMIZATIONS', |
| 252 '--warning_level', 'VERBOSE', | 253 '--warning_level', 'VERBOSE', |
| 253 '--language_in=ES6_STRICT', | 254 '--language_in=ES6_STRICT', |
| 254 '--language_out=ES5_STRICT', | 255 '--language_out=ES5_STRICT', |
| 255 '--extra_annotation_name', 'suppressReceiverCheck', | 256 '--extra_annotation_name', 'suppressReceiverCheck', |
| 256 '--extra_annotation_name', 'suppressGlobalPropertiesCheck', | 257 '--extra_annotation_name', 'suppressGlobalPropertiesCheck', |
| 258 '--checks-only', | |
| 257 '--module_output_path_prefix', to_platform_path_exact(modules_dir + path.sep ) | 259 '--module_output_path_prefix', to_platform_path_exact(modules_dir + path.sep ) |
|
kozy
2016/12/09 03:03:45
When I rolled compiler for injected-script-source
| |
| 258 ] | 260 ] |
| 259 | 261 |
| 260 worker_modules_by_name = {} | 262 worker_modules_by_name = {} |
| 261 dependents_by_module_name = {} | 263 dependents_by_module_name = {} |
| 262 | 264 |
| 263 for module_name in descriptors.application: | 265 for module_name in descriptors.application: |
| 264 module = descriptors.modules[module_name] | 266 module = descriptors.modules[module_name] |
| 265 if descriptors.application[module_name].get('type', None) == 'worker': | 267 if descriptors.application[module_name].get('type', None) == 'worker': |
| 266 worker_modules_by_name[module_name] = module | 268 worker_modules_by_name[module_name] = module |
| 267 for dep in module.get('dependencies', []): | 269 for dep in module.get('dependencies', []): |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 466 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j s_compile_out | 468 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j s_compile_out |
| 467 errors_found |= has_errors(devtools_js_compile_out) | 469 errors_found |= has_errors(devtools_js_compile_out) |
| 468 | 470 |
| 469 os.remove(compiler_args_file.name) | 471 os.remove(compiler_args_file.name) |
| 470 os.remove(protocol_externs_file) | 472 os.remove(protocol_externs_file) |
| 471 shutil.rmtree(modules_dir, True) | 473 shutil.rmtree(modules_dir, True) |
| 472 | 474 |
| 473 if errors_found: | 475 if errors_found: |
| 474 print 'ERRORS DETECTED' | 476 print 'ERRORS DETECTED' |
| 475 sys.exit(1) | 477 sys.exit(1) |
| OLD | NEW |