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

Unified Diff: tools/create_pub_snapshot.py

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
Index: tools/create_pub_snapshot.py
diff --git a/tools/create_pub_snapshot.py b/tools/create_pub_snapshot.py
deleted file mode 100644
index 5ba0beba921e6419cdd06c842dffb2c0d70e9d3e..0000000000000000000000000000000000000000
--- a/tools/create_pub_snapshot.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2014 The Dart Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-This script runs the async/await compiler on pub and then compiles the output
-of that to a snapshot.
-
-Usage: create_pub_snapshot.py <dart> <compiler> <package root> <output dir>
-
-When #104 is fixed, this script is no longer needed. Instead, replace the
-generate_pub_snapshot action in utils/pub.gyp with:
-
- 'action': [
- '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
- '--package-root=<(PRODUCT_DIR)/pub_packages/',
- '--snapshot=<(SHARED_INTERMEDIATE_DIR)/pub.dart.snapshot',
- '../../sdk/lib/_internal/pub/bin/pub.dart',
- ]
-"""
-
-import os
-import subprocess
-import sys
-
-
-def Main():
- if len(sys.argv) < 5:
- raise Exception("""Not enough arguments.
-
-Usage: create_pub_snapshot.py <dart> <compiler> <package root> <output file>""")
-
- dart_path = sys.argv[1]
- compiler = sys.argv[2]
- package_root = sys.argv[3]
- output_dir = sys.argv[4]
-
- # Run the async compiler.
- status = subprocess.call([
- dart_path,
- '--package-root=' + package_root,
- compiler,
- output_dir,
- '--silent'
- ])
- if status != 0: return status
-
- # Generate the snapshot from the output of that.
- status = subprocess.call([
- dart_path,
- '--package-root=' + package_root,
- '--snapshot=' + os.path.join(output_dir, 'pub.dart.snapshot'),
- os.path.join(output_dir, 'pub_async/bin/pub.dart')
- ])
- if status != 0: return status
-
-
-if __name__ == '__main__':
- sys.exit(Main())

Powered by Google App Engine
This is Rietveld 408576698