Index: pkg/dev_compiler/tool/build_sdk.sh |
diff --git a/pkg/dev_compiler/tool/build_sdk.sh b/pkg/dev_compiler/tool/build_sdk.sh |
index bcda0af25862fd541fc72e06d4052ce8dc67bb43..23e3cc44ae5aa25295582a631e2f6062effb19a9 100755 |
--- a/pkg/dev_compiler/tool/build_sdk.sh |
+++ b/pkg/dev_compiler/tool/build_sdk.sh |
@@ -4,25 +4,31 @@ set -e |
cd $( dirname "${BASH_SOURCE[0]}" )/.. |
echo "*** Patching SDK" |
-dart -c tool/patch_sdk.dart tool/input_sdk gen/patched_sdk |
+{ # Try |
+ dart -c tool/patch_sdk.dart ../.. tool/input_sdk gen/patched_sdk \ |
+ > tool/sdk_expected_errors.txt |
+} || { # Catch |
+ # Show errors if the sdk didn't compile. |
+ cat tool/sdk_expected_errors.txt |
+ exit 1 |
+} |
echo "*** Compiling SDK to JavaScript" |
- |
-# TODO(jmesserly): break out dart:html & friends. |
{ # Try |
+ # TODO(jmesserly): break out dart:html & friends into a module. |
dart -c tool/build_sdk.dart \ |
- --dart-sdk gen/patched_sdk \ |
- --dart-sdk-summary=build \ |
- --summary-out lib/sdk/ddc_sdk.sum \ |
- --modules=amd \ |
- -o lib/js/amd/dart_sdk.js \ |
- --modules=es6 \ |
- -o lib/js/es6/dart_sdk.js \ |
- --modules=common \ |
- -o lib/js/common/dart_sdk.js \ |
- --modules=legacy \ |
- -o lib/js/legacy/dart_sdk.js \ |
- "$@" > tool/sdk_expected_errors.txt |
+ --dart-sdk gen/patched_sdk \ |
+ --dart-sdk-summary=build \ |
+ --summary-out lib/sdk/ddc_sdk.sum \ |
+ --modules=amd \ |
+ -o lib/js/amd/dart_sdk.js \ |
+ --modules=es6 \ |
+ -o lib/js/es6/dart_sdk.js \ |
+ --modules=common \ |
+ -o lib/js/common/dart_sdk.js \ |
+ --modules=legacy \ |
+ -o lib/js/legacy/dart_sdk.js \ |
+ "$@" > tool/sdk_expected_errors.txt |
} || { # Catch |
# Show errors if the sdk didn't compile. |
cat tool/sdk_expected_errors.txt |