Pass some missing --disable-dart-dev and --suppress-analytics to dart (flutter/engine#51473)
This commit is contained in:
@@ -55,27 +55,27 @@ echo "Using dart from $DART_BIN"
|
||||
"$DART" --version
|
||||
echo ""
|
||||
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/ci"
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/flutter_frontend_server"
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/impeller/tessellator/dart"
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/gpu"
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/ui"
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/testing"
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/tools"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/ci"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/flutter_frontend_server"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/impeller/tessellator/dart"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/gpu"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/ui"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/testing"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/tools"
|
||||
|
||||
echo ""
|
||||
|
||||
# Check that dart libraries conform.
|
||||
echo "Checking the integrity of the Web SDK"
|
||||
(cd "$FLUTTER_DIR/web_sdk"; "$DART" pub get)
|
||||
(cd "$FLUTTER_DIR/web_sdk/web_test_utils"; "$DART" pub get)
|
||||
(cd "$FLUTTER_DIR/web_sdk/web_engine_tester"; "$DART" pub get)
|
||||
(cd "$FLUTTER_DIR/web_sdk"; "$DART" pub --suppress-analytics get)
|
||||
(cd "$FLUTTER_DIR/web_sdk/web_test_utils"; "$DART" pub --suppress-analytics get)
|
||||
(cd "$FLUTTER_DIR/web_sdk/web_engine_tester"; "$DART" pub --suppress-analytics get)
|
||||
|
||||
"$DART" analyze --fatal-infos --fatal-warnings "$FLUTTER_DIR/web_sdk"
|
||||
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/web_sdk"
|
||||
|
||||
WEB_SDK_TEST_FILES="$FLUTTER_DIR/web_sdk/test/*"
|
||||
for testFile in $WEB_SDK_TEST_FILES
|
||||
do
|
||||
echo "Running $testFile"
|
||||
(cd "$FLUTTER_DIR"; FLUTTER_DIR="$FLUTTER_DIR" "$DART" --enable-asserts $testFile)
|
||||
(cd "$FLUTTER_DIR"; FLUTTER_DIR="$FLUTTER_DIR" "$DART" --disable-dart-dev --enable-asserts $testFile)
|
||||
done
|
||||
|
||||
@@ -1009,6 +1009,7 @@ final class HeaderFormatChecker extends FormatChecker {
|
||||
}
|
||||
final List<String> args = <String>[
|
||||
_dartBin,
|
||||
'--disable-dart-dev',
|
||||
_headerGuardCheckBin,
|
||||
...include.map((String f) => '--include=$f'),
|
||||
];
|
||||
@@ -1037,6 +1038,7 @@ final class HeaderFormatChecker extends FormatChecker {
|
||||
}
|
||||
final List<String> args = <String>[
|
||||
_dartBin,
|
||||
'--disable-dart-dev',
|
||||
_headerGuardCheckBin,
|
||||
'--fix',
|
||||
...include.map((String f) => '--include=$f'),
|
||||
|
||||
@@ -81,7 +81,7 @@ dart --version
|
||||
# Runs the tests for the license script.
|
||||
function run_tests() (
|
||||
cd "$SRC_DIR/flutter/tools/licenses"
|
||||
find . -name "*_test.dart" | xargs -n 1 dart --enable-asserts
|
||||
find . -name "*_test.dart" | xargs -n 1 dart --disable-dart-dev --enable-asserts
|
||||
)
|
||||
|
||||
# Collects the license information from the repo.
|
||||
@@ -93,7 +93,11 @@ function collect_licenses() (
|
||||
# For very large RegExps that are currently used in license script using
|
||||
# interpreter is faster than using unoptimized machine code, which has
|
||||
# no chance of being optimized(due to its size).
|
||||
dart --enable-asserts --interpret_irregexp lib/main.dart \
|
||||
dart \
|
||||
--disable-dart-dev \
|
||||
--enable-asserts \
|
||||
--interpret_irregexp \
|
||||
lib/main.dart \
|
||||
--src ../../.. \
|
||||
--out ../../../out/license_script_output \
|
||||
--golden ../../ci/licenses_golden \
|
||||
|
||||
@@ -13,7 +13,7 @@ DART_SDK_DIR="${ENGINE_PATH}/src/out/host_debug_unopt/dart-sdk"
|
||||
DART_PATH="$DART_SDK_DIR/bin/dart"
|
||||
|
||||
echo "Running \`dart pub get\` in 'engine/src/flutter/lib/web_ui'"
|
||||
(cd "$WEB_UI_DIR"; $DART_PATH pub get)
|
||||
(cd "$WEB_UI_DIR"; $DART_PATH pub --suppress-analytics get)
|
||||
|
||||
echo "Running \`dart analyze\` in 'engine/src/flutter/lib/web_ui'"
|
||||
(cd "$WEB_UI_DIR"; $DART_PATH analyze --fatal-infos)
|
||||
(cd "$WEB_UI_DIR"; $DART_PATH analyze --suppress-analytics --fatal-infos)
|
||||
|
||||
@@ -837,7 +837,7 @@ def gather_dart_tests(build_dir, test_filter):
|
||||
build_dir,
|
||||
os.path.join('dart-sdk', 'bin', 'dart'),
|
||||
None,
|
||||
flags=['pub', 'get', '--offline'],
|
||||
flags=['pub', '--suppress-analytics', 'get', '--offline'],
|
||||
cwd=dart_tests_dir,
|
||||
)
|
||||
|
||||
@@ -1061,7 +1061,7 @@ def run_impeller_golden_tests(build_dir: str):
|
||||
golden_path = os.path.join('testing', 'impeller_golden_tests_output.txt')
|
||||
script_path = os.path.join('tools', 'dir_contents_diff', 'bin', 'dir_contents_diff.dart')
|
||||
diff_result = subprocess.run(
|
||||
f'{dart_bin} run {script_path} {golden_path} {temp_dir}',
|
||||
f'{dart_bin} --disable-dart-dev {script_path} {golden_path} {temp_dir}',
|
||||
check=False,
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
@@ -1084,7 +1084,7 @@ def run_impeller_golden_tests(build_dir: str):
|
||||
|
||||
with DirectoryChange(harvester_path):
|
||||
bin_path = Path('.').joinpath('bin').joinpath('golden_tests_harvester.dart')
|
||||
run_cmd([dart_bin, 'run', str(bin_path), temp_dir])
|
||||
run_cmd([dart_bin, '--disable-dart-dev', str(bin_path), temp_dir])
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -52,7 +52,7 @@ final class LintCommand extends CommandBase {
|
||||
]);
|
||||
_linters[Linter.java] =
|
||||
_LinterDescription(Linter.java, environment.engine.flutterDir, <String>[
|
||||
findDartBinary(environment),
|
||||
findDartBinary(environment), '--disable-dart-dev',
|
||||
p.join(engineFlutterPath, 'tools', 'android_lint', 'bin', 'main.dart'),
|
||||
]);
|
||||
_linters[Linter.c] = _LinterDescription(
|
||||
|
||||
@@ -129,7 +129,7 @@ def main():
|
||||
dart = 'dart'
|
||||
if os.name == 'nt':
|
||||
dart = 'dart.exe'
|
||||
pubcmd = [os.path.join(dart_sdk_bin, dart), 'pub', 'get', '--offline']
|
||||
pubcmd = [os.path.join(dart_sdk_bin, dart), 'pub', '--suppress-analytics', 'get', '--offline']
|
||||
|
||||
pub_count = 0
|
||||
for package in ALL_PACKAGES:
|
||||
|
||||
Reference in New Issue
Block a user