Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 set -e | 2 set -e |
| 3 # switch to the root directory of dev_compiler | 3 # switch to the root directory of dev_compiler |
| 4 cd $( dirname "${BASH_SOURCE[0]}" )/.. | 4 cd $( dirname "${BASH_SOURCE[0]}" )/.. |
| 5 | 5 |
| 6 echo "*** Patching SDK" | 6 echo "*** Patching SDK" |
| 7 rm -r tool/generated_sdk || true | 7 rm -r tool/generated_sdk || true |
| 8 dart -c tool/patch_sdk.dart tool/input_sdk tool/generated_sdk | 8 dart -c tool/patch_sdk.dart tool/input_sdk tool/generated_sdk |
| 9 | 9 |
| 10 echo "*** Compiling SDK to JavaScript" | 10 echo "*** Compiling SDK to JavaScript" |
| 11 if [[ -d lib/runtime/dart ]] ; then | 11 if [[ -d lib/runtime/dart ]] ; then |
| 12 rm -r lib/runtime/dart | 12 rm -r lib/runtime/dart |
| 13 fi | 13 fi |
| 14 | 14 |
| 15 # TODO(jmesserly): this builds dart:js, which pulls in dart:core and many others | 15 # TODO(jmesserly): this builds dart:js, which pulls in dart:core and many others |
| 16 # transitively. Ideally we could pass them explicitly, though: | 16 # transitively. Ideally we could pass them explicitly, though: |
| 17 # https://github.com/dart-lang/dev_compiler/issues/219 | 17 # https://github.com/dart-lang/dev_compiler/issues/219 |
| 18 dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l warning \ | 18 dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l warning \ |
| 19 --dart-sdk tool/generated_sdk -o lib/runtime/ dart:js \ | 19 --dart-sdk tool/generated_sdk -o lib/runtime/ dart:mirrors \ |
|
Jennifer Messerly
2015/06/15 16:42:01
does dart:js or dart:mirrors depend on eachother?
vsm
2015/06/15 20:59:46
No, I'm pretty sure dart:js and dart:mirrors depen
| |
| 20 > tool/generated_sdk/sdk_errors.txt || true | 20 > tool/generated_sdk/sdk_errors.txt || true |
| 21 | 21 |
| 22 if [[ ! -f lib/runtime/dart/core.js ]] ; then | 22 if [[ ! -f lib/runtime/dart/core.js ]] ; then |
| 23 echo 'core.js not found, assuming build failed.' | 23 echo 'core.js not found, assuming build failed.' |
| 24 echo './tool/build_sdk.sh can be run to reproduce this.' | 24 echo './tool/build_sdk.sh can be run to reproduce this.' |
| 25 exit 1 | 25 exit 1 |
| 26 fi | 26 fi |
| 27 | 27 |
| 28 DIFF_ARGS="-u tool/sdk_expected_errors.txt tool/generated_sdk/sdk_errors.txt" | 28 DIFF_ARGS="-u tool/sdk_expected_errors.txt tool/generated_sdk/sdk_errors.txt" |
| 29 | 29 |
| 30 if ! (diff $DIFF_ARGS > /dev/null) ; then | 30 if ! (diff $DIFF_ARGS > /dev/null) ; then |
| 31 diff $DIFF_ARGS |\ | 31 diff $DIFF_ARGS |\ |
| 32 sed -e "s/^\(+.*\)/[32m\1[0m/" |\ | 32 sed -e "s/^\(+.*\)/[32m\1[0m/" |\ |
| 33 sed -e "s/^\(-.*\)/[31m\1[0m/" | 33 sed -e "s/^\(-.*\)/[31m\1[0m/" |
| 34 echo | 34 echo |
| 35 echo 'SDK errors have changed. To update expectations, run:' | 35 echo 'SDK errors have changed. To update expectations, run:' |
| 36 echo '$ cp tool/generated_sdk/sdk_errors.txt tool/sdk_expected_errors.txt' | 36 echo '$ cp tool/generated_sdk/sdk_errors.txt tool/sdk_expected_errors.txt' |
| 37 exit 1 | 37 exit 1 |
| 38 fi | 38 fi |
| OLD | NEW |