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

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/compile_frontend.py

Issue 2453673002: [DevTools] Scope common protocol infrastructure under Protocol namespace in a separate module. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 module = modules_by_name[name] 328 module = modules_by_name[name]
329 329
330 command = '' 330 command = ''
331 dependencies = module.get('dependencies', []) 331 dependencies = module.get('dependencies', [])
332 if recursively: 332 if recursively:
333 for dependency in dependencies: 333 for dependency in dependencies:
334 command += dump_module(dependency, recursively, processed_modules) 334 command += dump_module(dependency, recursively, processed_modules)
335 command += module_arg(name) + ':' 335 command += module_arg(name) + ':'
336 filtered_scripts = descriptors.module_compiled_files(name) 336 filtered_scripts = descriptors.module_compiled_files(name)
337 filtered_scripts = [path.join(devtools_frontend_path, name, script) for scri pt in filtered_scripts] 337 filtered_scripts = [path.join(devtools_frontend_path, name, script) for scri pt in filtered_scripts]
338 # TODO(dgozman): move to separate module 338 if name == 'protocol':
339 if name == 'sdk':
340 filtered_scripts.append(protocol_externs_file) 339 filtered_scripts.append(protocol_externs_file)
341 command += str(len(filtered_scripts)) 340 command += str(len(filtered_scripts))
342 first_dependency = True 341 first_dependency = True
343 for dependency in dependencies + [runtime_module_name]: 342 for dependency in dependencies + [runtime_module_name]:
344 if first_dependency: 343 if first_dependency:
345 command += ':' 344 command += ':'
346 else: 345 else:
347 command += ',' 346 command += ','
348 first_dependency = False 347 first_dependency = False
349 command += jsmodule_name_prefix + dependency 348 command += jsmodule_name_prefix + dependency
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 print 'devtools.js compilation output:%s' % os.linesep, devtools_js_compile_out 457 print 'devtools.js compilation output:%s' % os.linesep, devtools_js_compile_out
459 errors_found |= has_errors(devtools_js_compile_out) 458 errors_found |= has_errors(devtools_js_compile_out)
460 459
461 os.remove(compiler_args_file.name) 460 os.remove(compiler_args_file.name)
462 os.remove(protocol_externs_file) 461 os.remove(protocol_externs_file)
463 shutil.rmtree(modules_dir, True) 462 shutil.rmtree(modules_dir, True)
464 463
465 if errors_found: 464 if errors_found:
466 print 'ERRORS DETECTED' 465 print 'ERRORS DETECTED'
467 sys.exit(1) 466 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698