From 7cf970b4d88f33fdbccf2736818805e87a45960e Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Thu, 10 Dec 2020 11:26:01 -0800 Subject: [PATCH 1/4] Exclude nnbd plugins from testing on stable --- script/build_all_plugins_app.sh | 10 +++++++++- script/incremental_build.sh | 14 +++++++++++--- script/nnbd_plugins.sh | 11 +++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 script/nnbd_plugins.sh diff --git a/script/build_all_plugins_app.sh b/script/build_all_plugins_app.sh index f1f68ddbe985..13ffaa621dc8 100755 --- a/script/build_all_plugins_app.sh +++ b/script/build_all_plugins_app.sh @@ -8,6 +8,8 @@ readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)" readonly REPO_DIR="$(dirname "$SCRIPT_DIR")" source "$SCRIPT_DIR/common.sh" +source "$SCRIPT_DIR/nnbd_plugins.sh" + check_changed_packages > /dev/null readonly EXCLUDED_PLUGINS_LIST=( @@ -42,7 +44,13 @@ readonly EXCLUDED_PLUGINS_LIST=( # Comma-separated string of the list above readonly EXCLUDED=$(IFS=, ; echo "${EXCLUDED_PLUGINS_LIST[*]}") -(cd "$REPO_DIR" && pub global run flutter_plugin_tools all-plugins-app --exclude $EXCLUDED) +ALL_EXCLUDED=($EXCLUDED) +# Exclude nnbd plugins from stable. +if [[ "$CHANNEL" -eq "stable" ]]; then + ALL_EXCLUDED=("$EXCLUDED,$EXCLUDED_PLUGINS_FROM_STABLE") +fi + +(cd "$REPO_DIR" && pub global run flutter_plugin_tools all-plugins-app --exclude $ALL_EXCLUDED) function error() { echo "$@" 1>&2 diff --git a/script/incremental_build.sh b/script/incremental_build.sh index f89bc1d0e5c9..2b1d167a495f 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -5,6 +5,7 @@ readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" readonly REPO_DIR="$(dirname "$SCRIPT_DIR")" source "$SCRIPT_DIR/common.sh" +source "$SCRIPT_DIR/nnbd_plugins.sh" if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then PUB=pub.bat @@ -12,6 +13,13 @@ else PUB=pub fi +# Plugins that are excluded from this task. +ALL_EXCLUDED=("") +# Exclude nnbd plugins from stable. +if [[ "$CHANNEL" -eq "stable" ]] then + ALL_EXCLUDED=($EXCLUDED_PLUGINS_FROM_STABLE) +fi + # Plugins that deliberately use their own analysis_options.yaml. # # This list should only be deleted from, never added to. This only exists @@ -39,7 +47,7 @@ PLUGIN_SHARDING=($PLUGIN_SHARDING) if [[ "${BRANCH_NAME}" == "master" ]]; then echo "Running for all packages" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]}) + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) else # Sets CHANGED_PACKAGES check_changed_packages @@ -47,10 +55,10 @@ else if [[ "$CHANGED_PACKAGES" == "" ]]; then echo "No changes detected in packages." echo "Running for all packages" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]}) + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) else echo running "${ACTIONS[@]}" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" ${PLUGIN_SHARDING[@]}) + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) echo "Running version check for changed packages" (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)") fi diff --git a/script/nnbd_plugins.sh b/script/nnbd_plugins.sh new file mode 100644 index 000000000000..5d167d7b5da6 --- /dev/null +++ b/script/nnbd_plugins.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# This script contains the list of plugins migrated to nnbd +# that should be excluded from testing on Flutter stable until +# null-safe is available on stable. + +readonly NNBD_PLUGINS_LIST=( + "flutter_webview" +) + +export EXCLUDED_PLUGINS_FROM_STABLE=$(IFS=, ; echo "${NNBD_PLUGINS_LIST[*]}") From 96e5f119c7b2062e468757684092e2421c8b9755 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Thu, 10 Dec 2020 11:32:05 -0800 Subject: [PATCH 2/4] ; --- script/incremental_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 2b1d167a495f..6c2e9f2e5656 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -16,7 +16,7 @@ fi # Plugins that are excluded from this task. ALL_EXCLUDED=("") # Exclude nnbd plugins from stable. -if [[ "$CHANNEL" -eq "stable" ]] then +if [[ "$CHANNEL" -eq "stable" ]]; then ALL_EXCLUDED=($EXCLUDED_PLUGINS_FROM_STABLE) fi From 33525ff9a4ebd4757df9a7272896f6d2f2c057e8 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Thu, 10 Dec 2020 15:11:09 -0800 Subject: [PATCH 3/4] Add debugging info --- script/build_all_plugins_app.sh | 2 ++ script/incremental_build.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/script/build_all_plugins_app.sh b/script/build_all_plugins_app.sh index 13ffaa621dc8..f2897f8aa9a2 100755 --- a/script/build_all_plugins_app.sh +++ b/script/build_all_plugins_app.sh @@ -50,6 +50,8 @@ if [[ "$CHANNEL" -eq "stable" ]]; then ALL_EXCLUDED=("$EXCLUDED,$EXCLUDED_PLUGINS_FROM_STABLE") fi +echo "Excluding the following plugins: $ALL_EXCLUDED" + (cd "$REPO_DIR" && pub global run flutter_plugin_tools all-plugins-app --exclude $ALL_EXCLUDED) function error() { diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 6c2e9f2e5656..671ce66a086f 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -18,6 +18,7 @@ ALL_EXCLUDED=("") # Exclude nnbd plugins from stable. if [[ "$CHANNEL" -eq "stable" ]]; then ALL_EXCLUDED=($EXCLUDED_PLUGINS_FROM_STABLE) + echo "Excluding the following plugins: $ALL_EXCLUDED" fi # Plugins that deliberately use their own analysis_options.yaml. From 888fa346a6cc1be94982d702b004c911cafd8b48 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Fri, 11 Dec 2020 12:02:09 -0800 Subject: [PATCH 4/4] Retrigger