| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 java_exec = find_java() | 223 java_exec = find_java() |
| 224 | 224 |
| 225 closure_compiler_jar = to_platform_path(path.join(scripts_path, 'closure', 'comp
iler.jar')) | 225 closure_compiler_jar = to_platform_path(path.join(scripts_path, 'closure', 'comp
iler.jar')) |
| 226 closure_runner_jar = to_platform_path(path.join(scripts_path, 'closure', 'closur
e_runner', 'closure_runner.jar')) | 226 closure_runner_jar = to_platform_path(path.join(scripts_path, 'closure', 'closur
e_runner', 'closure_runner.jar')) |
| 227 jsdoc_validator_jar = to_platform_path(path.join(scripts_path, 'jsdoc_validator'
, 'jsdoc_validator.jar')) | 227 jsdoc_validator_jar = to_platform_path(path.join(scripts_path, 'jsdoc_validator'
, 'jsdoc_validator.jar')) |
| 228 | 228 |
| 229 modules_dir = tempfile.mkdtemp() | 229 modules_dir = tempfile.mkdtemp() |
| 230 common_closure_args = [ | 230 common_closure_args = [ |
| 231 '--summary_detail_level', '3', | 231 '--summary_detail_level', '3', |
| 232 '--jscomp_error', 'visibility', | 232 '--jscomp_error', 'visibility', |
| 233 '--jscomp_warning', 'missingOverride', |
| 233 '--compilation_level', 'SIMPLE_OPTIMIZATIONS', | 234 '--compilation_level', 'SIMPLE_OPTIMIZATIONS', |
| 234 '--warning_level', 'VERBOSE', | 235 '--warning_level', 'VERBOSE', |
| 235 '--language_in=ES6_STRICT', | 236 '--language_in=ES6_STRICT', |
| 236 '--language_out=ES5_STRICT', | 237 '--language_out=ES5_STRICT', |
| 237 '--extra_annotation_name', 'suppressReceiverCheck', | 238 '--extra_annotation_name', 'suppressReceiverCheck', |
| 238 '--extra_annotation_name', 'suppressGlobalPropertiesCheck', | 239 '--extra_annotation_name', 'suppressGlobalPropertiesCheck', |
| 240 '--checks-only', |
| 239 '--module_output_path_prefix', to_platform_path_exact(modules_dir + path.sep
) | 241 '--module_output_path_prefix', to_platform_path_exact(modules_dir + path.sep
) |
| 240 ] | 242 ] |
| 241 | 243 |
| 242 worker_modules_by_name = {} | 244 worker_modules_by_name = {} |
| 243 dependents_by_module_name = {} | 245 dependents_by_module_name = {} |
| 244 | 246 |
| 245 for module_name in descriptors.application: | 247 for module_name in descriptors.application: |
| 246 module = descriptors.modules[module_name] | 248 module = descriptors.modules[module_name] |
| 247 if descriptors.application[module_name].get('type', None) == 'worker': | 249 if descriptors.application[module_name].get('type', None) == 'worker': |
| 248 worker_modules_by_name[module_name] = module | 250 worker_modules_by_name[module_name] = module |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j
s_compile_out | 450 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j
s_compile_out |
| 449 errors_found |= has_errors(devtools_js_compile_out) | 451 errors_found |= has_errors(devtools_js_compile_out) |
| 450 | 452 |
| 451 os.remove(compiler_args_file.name) | 453 os.remove(compiler_args_file.name) |
| 452 os.remove(protocol_externs_file) | 454 os.remove(protocol_externs_file) |
| 453 shutil.rmtree(modules_dir, True) | 455 shutil.rmtree(modules_dir, True) |
| 454 | 456 |
| 455 if errors_found: | 457 if errors_found: |
| 456 print 'ERRORS DETECTED' | 458 print 'ERRORS DETECTED' |
| 457 sys.exit(1) | 459 sys.exit(1) |
| OLD | NEW |