fix(ddc): router, compiler, web worker fixes for DDC
Also enable DDC checks across all non-web worker playground apps. We are now down to 2 DDC errors across all of them. The remaining two need to be fixed in package:analyzer, not in angular. BREAKING CHANGE: - there's a chance of breakage as router's Instruction constructor signature changed. Closes #6693
This commit is contained in:
@ -11,7 +11,8 @@ source $SCRIPT_DIR/env_dart.sh
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
# Variables
|
||||
DDC_WARNING_CAP="180"
|
||||
DDC_TOTAL_WARNING_CAP="1000"
|
||||
DDC_TOTAL_ERROR_CAP="2"
|
||||
DDC_DIR=`pwd`/tmp/dev_compiler
|
||||
DDC_VERSION="0.1.14"
|
||||
|
||||
@ -25,6 +26,7 @@ git clone https://github.com/dart-lang/dev_compiler.git tmp/dev_compiler
|
||||
|
||||
# Convert TypeScript to Dart
|
||||
./node_modules/.bin/gulp build/packages.dart
|
||||
./node_modules/.bin/gulp build.dart.material.css
|
||||
./node_modules/.bin/gulp build/pubspec.dart
|
||||
node ./scripts/ci/dart_experimental/pubspec_for_ddc.js \
|
||||
--pubspec-file=dist/dart/playground/pubspec.yaml
|
||||
@ -36,7 +38,32 @@ cd build/web
|
||||
LOG_FILE="analyzer.log"
|
||||
set +e
|
||||
$DART_SDK/bin/dart $DDC_DIR/bin/dartdevc.dart \
|
||||
--dart-sdk=$DART_SDK_LIB_SEARCH_PATH -o out src/hello_world/index.dart \
|
||||
--dart-sdk=$DART_SDK_LIB_SEARCH_PATH -o out \
|
||||
src/animate/index.dart \
|
||||
src/async/index.dart \
|
||||
src/gestures/index.dart \
|
||||
src/hash_routing/index.dart \
|
||||
src/hello_world/index.dart \
|
||||
src/key_events/index.dart \
|
||||
src/material/button/index.dart \
|
||||
src/material/checkbox/index.dart \
|
||||
src/material/dialog/index.dart \
|
||||
src/material/grid_list/index.dart \
|
||||
src/material/input/index.dart \
|
||||
src/material/progress-linear/index.dart \
|
||||
src/material/radio/index.dart \
|
||||
src/material/switcher/index.dart \
|
||||
src/model_driven_forms/index.dart \
|
||||
src/observable_models/index.dart \
|
||||
src/order_management/index.dart \
|
||||
src/person_management/index.dart \
|
||||
src/relative_assets/index.dart \
|
||||
src/routing/index.dart \
|
||||
src/sourcemap/index.dart \
|
||||
src/svg/index.dart \
|
||||
src/template_driven_forms/index.dart \
|
||||
src/todo/index.dart \
|
||||
src/zippy_component/index.dart \
|
||||
>$LOG_FILE
|
||||
EXIT_CODE=`echo $?`
|
||||
set -e
|
||||
@ -53,7 +80,7 @@ fi
|
||||
cat $LOG_FILE
|
||||
WARNING_COUNT=`cat $LOG_FILE | wc -l | sed -e 's/^[[:space:]]*//'`
|
||||
|
||||
if [[ "$WARNING_COUNT" -gt "$DDC_WARNING_CAP" ]]
|
||||
if [[ "$WARNING_COUNT" -gt "$DDC_TOTAL_WARNING_CAP" ]]
|
||||
then
|
||||
echo "Too many warnings: $WARNING_COUNT"
|
||||
exit 1
|
||||
@ -61,14 +88,8 @@ else
|
||||
echo "Warning count ok"
|
||||
fi
|
||||
|
||||
function countWarnings {
|
||||
local GREP_PATTERN=$1
|
||||
local COUNT=`cat $LOG_FILE | grep -E '$GREP_PATTERN' | wc -l | sed -e 's/^[[:space:]]*//'`
|
||||
echo $COUNT
|
||||
}
|
||||
|
||||
SEVERE_ANGULAR_COUNT=$(countWarnings '^severe.*package:angular2')
|
||||
if [[ "$SEVERE_ANGULAR_COUNT" -gt "0" ]]
|
||||
ERROR_COUNT=`cat $LOG_FILE | grep -E '^severe.*' | wc -l | sed -e 's/^[[:space:]]*//'`
|
||||
if [[ "$ERROR_COUNT" -gt "$DDC_TOTAL_ERROR_CAP" ]]
|
||||
then
|
||||
echo "Found severe errors in angular2 package"
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user