Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1198996

Browse files
authored
Remove --disable-dart-dev across 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 flutter/flutter#154268.
1 parent cd48ec2 commit 1198996

File tree

18 files changed

+22
-37
lines changed

18 files changed

+22
-37
lines changed

bin/et

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ if [ ! -d "${ENGINE_DIR}/tools/engine_tool/.dart_tool" ]; then
5757
exit 1
5858
fi
5959

60-
"${DART}" --disable-dart-dev "${ENGINE_DIR}/tools/engine_tool/bin/et.dart" "$@"
60+
"${DART}" "${ENGINE_DIR}/tools/engine_tool/bin/et.dart" "$@"

bin/et.bat

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

build/dart/rules.gni

+2-6
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ template("flutter_frontend_server") {
6565
]
6666
snapshot_depfile = "$kernel_output.d"
6767

68-
common_vm_args = [ "--disable-dart-dev" ]
69-
7068
flutter_patched_sdk =
7169
rebase_path("$root_out_dir/flutter_patched_sdk", root_build_dir)
7270

@@ -106,7 +104,7 @@ template("flutter_frontend_server") {
106104
frontend_server =
107105
rebase_path("$root_gen_dir/frontend_server_aot.dart.snapshot")
108106

109-
args = [ dart ] + common_vm_args + [ frontend_server ] + common_args
107+
args = [ dart ] + [ frontend_server ] + common_args
110108
}
111109
} else {
112110
prebuilt_dart_action(target_name) {
@@ -122,8 +120,7 @@ template("flutter_frontend_server") {
122120
inputs = [ invoker.main_dart ]
123121
outputs = [ invoker.kernel_output ]
124122
depfile = snapshot_depfile
125-
vm_args = common_vm_args
126-
args = common_args
123+
vm_args = (args = common_args)
127124
}
128125
}
129126
}
@@ -337,7 +334,6 @@ template("application_snapshot") {
337334
abs_output = rebase_path(output)
338335
rel_output = rebase_path(output, root_build_dir)
339336
snapshot_vm_args = [
340-
"--disable-dart-dev",
341337
"--deterministic",
342338
"--packages=$package_config",
343339
"--snapshot=$abs_output",

ci/analyze.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ WEB_SDK_TEST_FILES="$FLUTTER_DIR/web_sdk/test/*"
7878
for testFile in $WEB_SDK_TEST_FILES
7979
do
8080
echo "Running $testFile"
81-
(cd "$FLUTTER_DIR"; FLUTTER_DIR="$FLUTTER_DIR" "$DART" --disable-dart-dev --enable-asserts $testFile)
81+
(cd "$FLUTTER_DIR"; FLUTTER_DIR="$FLUTTER_DIR" "$DART" --enable-asserts $testFile)
8282
done

ci/bin/format.dart

-2
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,6 @@ final class HeaderFormatChecker extends FormatChecker {
10491049
}
10501050
final List<String> args = <String>[
10511051
_dartBin,
1052-
'--disable-dart-dev',
10531052
_headerGuardCheckBin,
10541053
...include.map((String f) => '--include=$f'),
10551054
];
@@ -1078,7 +1077,6 @@ final class HeaderFormatChecker extends FormatChecker {
10781077
}
10791078
final List<String> args = <String>[
10801079
_dartBin,
1081-
'--disable-dart-dev',
10821080
_headerGuardCheckBin,
10831081
'--fix',
10841082
...include.map((String f) => '--include=$f'),

ci/check_build_configs.sh

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ DART="${DART_BIN}/dart"
4343

4444
cd "$SCRIPT_DIR"
4545
"$DART" \
46-
--disable-dart-dev \
4746
"$SRC_DIR/flutter/tools/pkg/engine_build_configs/bin/check.dart" \
4847
"$SRC_DIR"
4948

ci/clang_tidy.sh

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ echo "$(date +%T) Running clang_tidy"
6868

6969
cd "$SCRIPT_DIR"
7070
"$DART" \
71-
--disable-dart-dev \
7271
"$SRC_DIR/flutter/tools/clang_tidy/bin/main.dart" \
7372
--src-dir="$SRC_DIR" \
7473
${CLANG_TIDY_PATH:+--clang-tidy="$SRC_DIR/$CLANG_TIDY_PATH"} \

ci/format.bat

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

ci/format.sh

-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,5 @@ DART="${DART_BIN}/dart"
4242

4343
cd "$SCRIPT_DIR"
4444
"$DART" \
45-
--disable-dart-dev \
4645
bin/format.dart \
4746
"$@"

ci/licenses.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ dart --version
8181
# Runs the tests for the license script.
8282
function run_tests() (
8383
cd "$SRC_DIR/flutter/tools/licenses"
84-
find . -name "*_test.dart" | xargs -n 1 dart --disable-dart-dev --enable-asserts
84+
find . -name "*_test.dart" | xargs -n 1 dart -enable-asserts
8585
)
8686

8787
# Collects the license information from the repo.
@@ -94,7 +94,6 @@ function collect_licenses() (
9494
# interpreter is faster than using unoptimized machine code, which has
9595
# no chance of being optimized(due to its size).
9696
dart \
97-
--disable-dart-dev \
9897
--enable-asserts \
9998
--interpret_irregexp \
10099
lib/main.dart \

testing/benchmark/upload_metrics.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ VARIANT=$1
4747
shift 1
4848

4949
cd "$SCRIPT_DIR"
50-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
50+
"$DART" bin/parse_and_send.dart \
5151
--json $ENGINE_PATH/src/out/${VARIANT}/txt_benchmarks.json "$@"
52-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
52+
"$DART" bin/parse_and_send.dart \
5353
--json $ENGINE_PATH/src/out/${VARIANT}/fml_benchmarks.json "$@"
54-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
54+
"$DART" bin/parse_and_send.dart \
5555
--json $ENGINE_PATH/src/out/${VARIANT}/shell_benchmarks.json "$@"
56-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
56+
"$DART" bin/parse_and_send.dart \
5757
--json $ENGINE_PATH/src/out/${VARIANT}/ui_benchmarks.json "$@"
58-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
58+
"$DART" bin/parse_and_send.dart \
5959
--json $ENGINE_PATH/src/out/${VARIANT}/display_list_builder_benchmarks.json "$@"
60-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
60+
"$DART" bin/parse_and_send.dart \
6161
--json $ENGINE_PATH/src/out/${VARIANT}/display_list_region_benchmarks.json "$@"
62-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
62+
"$DART" bin/parse_and_send.dart \
6363
--json $ENGINE_PATH/src/out/${VARIANT}/display_list_transform_benchmarks.json "$@"
64-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
64+
"$DART" bin/parse_and_send.dart \
6565
--json $ENGINE_PATH/src/out/${VARIANT}/geometry_benchmarks.json "$@"
66-
"$DART" --disable-dart-dev bin/parse_and_send.dart \
66+
"$DART" bin/parse_and_send.dart \
6767
--json $ENGINE_PATH/src/out/${VARIANT}/canvas_benchmarks.json "$@"

testing/run_tests.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ def run_benchmark_tests(build_dir):
10161016
test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'testing', 'benchmark')
10171017
dart_tests = glob.glob('%s/test/*_test.dart' % test_dir)
10181018
for dart_test_file in dart_tests:
1019-
opts = ['--disable-dart-dev', dart_test_file]
1019+
opts = [dart_test_file]
10201020
run_engine_executable(
10211021
build_dir, os.path.join('dart-sdk', 'bin', 'dart'), None, flags=opts, cwd=test_dir
10221022
)
@@ -1114,7 +1114,7 @@ def run_impeller_golden_tests(build_dir: str, require_skia_gold: bool = False):
11141114
golden_path = os.path.join('testing', 'impeller_golden_tests_output.txt')
11151115
script_path = os.path.join('tools', 'dir_contents_diff', 'bin', 'dir_contents_diff.dart')
11161116
diff_result = subprocess.run(
1117-
f'{dart_bin} --disable-dart-dev {script_path} {golden_path} {temp_dir}',
1117+
f'{dart_bin} {script_path} {golden_path} {temp_dir}',
11181118
check=False,
11191119
shell=True,
11201120
stdout=subprocess.PIPE,
@@ -1154,7 +1154,7 @@ def run_impeller_golden_tests(build_dir: str, require_skia_gold: bool = False):
11541154

11551155
with DirectoryChange(harvester_path):
11561156
bin_path = Path('.').joinpath('bin').joinpath('golden_tests_harvester.dart')
1157-
run_cmd([dart_bin, '--disable-dart-dev', str(bin_path), temp_dir])
1157+
run_cmd([dart_bin, str(bin_path), temp_dir])
11581158

11591159

11601160
def main():

tools/api_check/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
Verifies that enums in each of the platform-specific embedders, and the embedder
44
API remain consistent with their API in dart:ui.
55

6-
### Running the tool
6+
## Running the tool
77

88
This tool is run as part of `testing/run_tests.sh`.
99

1010
To run the tool, invoke with the path of the Flutter engine repo as the first
1111
argument.
1212

13-
```
13+
```sh
1414
../../../out/host_debug_unopt/dart-sdk/bin/dart \
15-
--disable-dart-dev \
1615
test/apicheck_test.dart \
1716
"$(dirname $(dirname $PWD))"
1817
```

tools/engine_tool/lib/src/commands/lint_command.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ final class LintCommand extends CommandBase {
5151
]);
5252
_linters[Linter.java] =
5353
_LinterDescription(Linter.java, environment.engine.flutterDir, <String>[
54-
findDartBinary(environment), '--disable-dart-dev',
54+
findDartBinary(environment),
5555
p.join(engineFlutterPath, 'tools', 'android_lint', 'bin', 'main.dart'),
5656
]);
5757
_linters[Linter.c] = _LinterDescription(

tools/githooks/post-checkout

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def Main(argv):
3030

3131
result = subprocess.run([
3232
os.path.join(GetDartBin(), 'dart'),
33-
'--disable-dart-dev',
3433
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
3534
] + githook_args + [
3635
'post-checkout',

tools/githooks/post-merge

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def Main(argv):
3030

3131
result = subprocess.run([
3232
os.path.join(GetDartBin(), 'dart'),
33-
'--disable-dart-dev',
3433
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
3534
] + githook_args + [
3635
'post-merge',

tools/githooks/pre-push

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def Main(argv):
3737

3838
result = subprocess.run([
3939
os.path.join(GetDartBin(), 'dart'),
40-
'--disable-dart-dev',
4140
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
4241
] + githook_args + [
4342
'pre-push',

tools/githooks/pre-rebase

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def Main(argv):
3030

3131
result = subprocess.run([
3232
os.path.join(GetDartBin(), 'dart'),
33-
'--disable-dart-dev',
3433
os.path.join(FLUTTER_DIR, 'tools', 'githooks', 'bin', 'main.dart'),
3534
] + githook_args + [
3635
'pre-rebase',

0 commit comments

Comments
 (0)