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

Side by Side Diff: tool/build_sdk.sh

Issue 1179643005: first step for #168, adds dart:js impl to the build (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
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): for now we're suppressing errors in SDK compilation 15 # TODO(jmesserly): for now we're suppressing errors in SDK compilation
16 dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l warning \ 16 dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l warning \
17 --dart-sdk tool/generated_sdk -o lib/runtime/ dart:core \ 17 --dart-sdk tool/generated_sdk -o lib/runtime/ dart:js \
Jennifer Messerly 2015/06/12 21:03:05 JS includes core, so we still get it transitively.
Jacob 2015/06/12 21:07:23 make this a # comment in the shell script having
Jennifer Messerly 2015/06/12 22:02:36 haha. yes, good point.
18 > tool/generated_sdk/sdk_errors.txt || true 18 > tool/generated_sdk/sdk_errors.txt || true
19 19
20 if [[ ! -f lib/runtime/dart/core.js ]] ; then 20 if [[ ! -f lib/runtime/dart/core.js ]] ; then
21 echo 'core.js not found, assuming build failed.' 21 echo 'core.js not found, assuming build failed.'
22 echo './tool/build_sdk.sh can be run to reproduce this.' 22 echo './tool/build_sdk.sh can be run to reproduce this.'
23 exit 1 23 exit 1
24 fi 24 fi
25 25
26 DIFF_ARGS="-u tool/sdk_expected_errors.txt tool/generated_sdk/sdk_errors.txt" 26 DIFF_ARGS="-u tool/sdk_expected_errors.txt tool/generated_sdk/sdk_errors.txt"
27 27
28 if ! (diff $DIFF_ARGS > /dev/null) ; then 28 if ! (diff $DIFF_ARGS > /dev/null) ; then
29 diff $DIFF_ARGS |\ 29 diff $DIFF_ARGS |\
30 sed -e "s/^\(+.*\)/\1/" |\ 30 sed -e "s/^\(+.*\)/\1/" |\
31 sed -e "s/^\(-.*\)/\1/" 31 sed -e "s/^\(-.*\)/\1/"
32 echo 32 echo
33 echo 'SDK errors have changed. To update expectations, run:' 33 echo 'SDK errors have changed. To update expectations, run:'
34 echo '$ cp tool/generated_sdk/sdk_errors.txt tool/sdk_expected_errors.txt' 34 echo '$ cp tool/generated_sdk/sdk_errors.txt tool/sdk_expected_errors.txt'
35 exit 1 35 exit 1
36 fi 36 fi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698