Remove --disable-dart-dev across flutter/engine. (flutter/engine#54845)

As per the Dart CLI team and @bkonyi, this is no longer providing value and we shouldn't cargo-cult it.

Work towards https://github.com/flutter/flutter/issues/154268.
This commit is contained in:
Matan Lurey
2024-08-28 17:12:32 -07:00
committed by GitHub
parent 3141bb2cbe
commit 87727168e8
18 changed files with 22 additions and 37 deletions

View File

@@ -57,4 +57,4 @@ if [ ! -d "${ENGINE_DIR}/tools/engine_tool/.dart_tool" ]; then
exit 1
fi
"${DART}" --disable-dart-dev "${ENGINE_DIR}/tools/engine_tool/bin/et.dart" "$@"
"${DART}" "${ENGINE_DIR}/tools/engine_tool/bin/et.dart" "$@"

View File

@@ -37,4 +37,4 @@ cd "%engine_tool_dir%"
REM Do not use the CALL command in the next line to execute Dart. CALL causes
REM Windows to re-read the line from disk after the CALL command has finished
REM regardless of the ampersand chain.
"%dart%" --disable-dart-dev bin\et.dart %* & exit /B !ERRORLEVEL!
"%dart%" bin\et.dart %* & exit /B !ERRORLEVEL!

View File

@@ -65,8 +65,6 @@ template("flutter_frontend_server") {
]
snapshot_depfile = "$kernel_output.d"
common_vm_args = [ "--disable-dart-dev" ]
flutter_patched_sdk =
rebase_path("$root_out_dir/flutter_patched_sdk", root_build_dir)
@@ -106,7 +104,7 @@ template("flutter_frontend_server") {
frontend_server =
rebase_path("$root_gen_dir/frontend_server_aot.dart.snapshot")
args = [ dart ] + common_vm_args + [ frontend_server ] + common_args
args = [ dart ] + [ frontend_server ] + common_args
}
} else {
prebuilt_dart_action(target_name) {
@@ -122,8 +120,7 @@ template("flutter_frontend_server") {
inputs = [ invoker.main_dart ]
outputs = [ invoker.kernel_output ]
depfile = snapshot_depfile
vm_args = common_vm_args
args = common_args
vm_args = (args = common_args)
}
}
}
@@ -337,7 +334,6 @@ template("application_snapshot") {
abs_output = rebase_path(output)
rel_output = rebase_path(output, root_build_dir)
snapshot_vm_args = [
"--disable-dart-dev",
"--deterministic",
"--packages=$package_config",
"--snapshot=$abs_output",

View File

@@ -78,5 +78,5 @@ 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" --disable-dart-dev --enable-asserts $testFile)
(cd "$FLUTTER_DIR"; FLUTTER_DIR="$FLUTTER_DIR" "$DART" --enable-asserts $testFile)
done

View File

@@ -1049,7 +1049,6 @@ final class HeaderFormatChecker extends FormatChecker {
}
final List<String> args = <String>[
_dartBin,
'--disable-dart-dev',
_headerGuardCheckBin,
...include.map((String f) => '--include=$f'),
];
@@ -1078,7 +1077,6 @@ final class HeaderFormatChecker extends FormatChecker {
}
final List<String> args = <String>[
_dartBin,
'--disable-dart-dev',
_headerGuardCheckBin,
'--fix',
...include.map((String f) => '--include=$f'),

View File

@@ -43,7 +43,6 @@ DART="${DART_BIN}/dart"
cd "$SCRIPT_DIR"
"$DART" \
--disable-dart-dev \
"$SRC_DIR/flutter/tools/pkg/engine_build_configs/bin/check.dart" \
"$SRC_DIR"

View File

@@ -68,7 +68,6 @@ echo "$(date +%T) Running clang_tidy"
cd "$SCRIPT_DIR"
"$DART" \
--disable-dart-dev \
"$SRC_DIR/flutter/tools/clang_tidy/bin/main.dart" \
--src-dir="$SRC_DIR" \
${CLANG_TIDY_PATH:+--clang-tidy="$SRC_DIR/$CLANG_TIDY_PATH"} \

View File

@@ -37,4 +37,4 @@ cd "%ci_dir%"
REM Do not use the CALL command in the next line to execute Dart. CALL causes
REM Windows to re-read the line from disk after the CALL command has finished
REM regardless of the ampersand chain.
"%dart%" --disable-dart-dev bin\format.dart %* & exit /B !ERRORLEVEL!
"%dart%" bin\format.dart %* & exit /B !ERRORLEVEL!

View File

@@ -42,6 +42,5 @@ DART="${DART_BIN}/dart"
cd "$SCRIPT_DIR"
"$DART" \
--disable-dart-dev \
bin/format.dart \
"$@"

View File

@@ -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 --disable-dart-dev --enable-asserts
find . -name "*_test.dart" | xargs -n 1 dart -enable-asserts
)
# Collects the license information from the repo.
@@ -94,7 +94,6 @@ function collect_licenses() (
# interpreter is faster than using unoptimized machine code, which has
# no chance of being optimized(due to its size).
dart \
--disable-dart-dev \
--enable-asserts \
--interpret_irregexp \
lib/main.dart \

View File

@@ -47,21 +47,21 @@ VARIANT=$1
shift 1
cd "$SCRIPT_DIR"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/txt_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/fml_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/shell_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/ui_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/display_list_builder_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/display_list_region_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/display_list_transform_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/geometry_benchmarks.json "$@"
"$DART" --disable-dart-dev bin/parse_and_send.dart \
"$DART" bin/parse_and_send.dart \
--json $ENGINE_PATH/src/out/${VARIANT}/canvas_benchmarks.json "$@"

View File

@@ -1016,7 +1016,7 @@ def run_benchmark_tests(build_dir):
test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'testing', 'benchmark')
dart_tests = glob.glob('%s/test/*_test.dart' % test_dir)
for dart_test_file in dart_tests:
opts = ['--disable-dart-dev', dart_test_file]
opts = [dart_test_file]
run_engine_executable(
build_dir, os.path.join('dart-sdk', 'bin', 'dart'), None, flags=opts, cwd=test_dir
)
@@ -1114,7 +1114,7 @@ def run_impeller_golden_tests(build_dir: str, require_skia_gold: bool = False):
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} --disable-dart-dev {script_path} {golden_path} {temp_dir}',
f'{dart_bin} {script_path} {golden_path} {temp_dir}',
check=False,
shell=True,
stdout=subprocess.PIPE,
@@ -1154,7 +1154,7 @@ for more information.
with DirectoryChange(harvester_path):
bin_path = Path('.').joinpath('bin').joinpath('golden_tests_harvester.dart')
run_cmd([dart_bin, '--disable-dart-dev', str(bin_path), temp_dir])
run_cmd([dart_bin, str(bin_path), temp_dir])
def main():

View File

@@ -3,16 +3,15 @@
Verifies that enums in each of the platform-specific embedders, and the embedder
API remain consistent with their API in dart:ui.
### Running the tool
## Running the tool
This tool is run as part of `testing/run_tests.sh`.
To run the tool, invoke with the path of the Flutter engine repo as the first
argument.
```
```sh
../../../out/host_debug_unopt/dart-sdk/bin/dart \
--disable-dart-dev \
test/apicheck_test.dart \
"$(dirname $(dirname $PWD))"
```

View File

@@ -51,7 +51,7 @@ final class LintCommand extends CommandBase {
]);
_linters[Linter.java] =
_LinterDescription(Linter.java, environment.engine.flutterDir, <String>[
findDartBinary(environment), '--disable-dart-dev',
findDartBinary(environment),
p.join(engineFlutterPath, 'tools', 'android_lint', 'bin', 'main.dart'),
]);
_linters[Linter.c] = _LinterDescription(

View File

@@ -30,7 +30,6 @@ def Main(argv):
result = subprocess.run([
os.path.join(GetDartBin(), 'dart'),
'--disable-dart-dev',
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
] + githook_args + [
'post-checkout',

View File

@@ -30,7 +30,6 @@ def Main(argv):
result = subprocess.run([
os.path.join(GetDartBin(), 'dart'),
'--disable-dart-dev',
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
] + githook_args + [
'post-merge',

View File

@@ -37,7 +37,6 @@ def Main(argv):
result = subprocess.run([
os.path.join(GetDartBin(), 'dart'),
'--disable-dart-dev',
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
] + githook_args + [
'pre-push',

View File

@@ -30,7 +30,6 @@ def Main(argv):
result = subprocess.run([
os.path.join(GetDartBin(), 'dart'),
'--disable-dart-dev',
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
] + githook_args + [
'pre-rebase',