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

Commit 97831d0

Browse files
authored
[web] use 'dart compile js' instead of 'dart2js' in web_ui and felt (#29179)
1 parent 123c25b commit 97831d0

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

lib/web_ui/dev/environment.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ class Environment {
9292
/// The "pub" executable file.
9393
String get pubExecutable => pathlib.join(dartSdkDir.path, 'bin', 'pub');
9494

95-
/// The "dart2js" executable file.
96-
String get dart2jsExecutable =>
97-
pathlib.join(dartSdkDir.path, 'bin', 'dart2js');
98-
9995
/// Path to where github.com/flutter/engine is checked out inside the engine workspace.
10096
io.Directory get flutterDirectory =>
10197
io.Directory(pathlib.join(engineSrcDir.path, 'flutter'));

lib/web_ui/dev/felt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ DART_SDK_DIR="${ENGINE_SRC_DIR}/out/host_debug_unopt/dart-sdk"
3434
GN="${FLUTTER_DIR}/tools/gn"
3535
DART_TOOL_DIR="${WEB_UI_DIR}/.dart_tool"
3636
PUB_PATH="$DART_SDK_DIR/bin/pub"
37-
DART2JS_PATH="$DART_SDK_DIR/bin/dart2js"
37+
DART_PATH="$DART_SDK_DIR/bin/dart"
3838
SNAPSHOT_PATH="${DART_TOOL_DIR}/felt.snapshot"
3939
STAMP_PATH="${DART_TOOL_DIR}/felt.snapshot.stamp"
4040
SCRIPT_PATH="${DEV_DIR}/felt.dart"
4141
REVISION="$(cd "$FLUTTER_DIR"; git rev-parse HEAD)"
4242

43-
if [ ! -f "${PUB_PATH}" -o ! -f "${DART2JS_PATH}" ]
43+
if [ ! -f "${PUB_PATH}" -o ! -f "${DART_PATH}" ]
4444
then
4545
echo "Compiling the Dart SDK."
4646
gclient sync

lib/web_ui/dev/steps/compile_tests_step.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ Future<bool> compileUnitTest(FilePath input, { required bool forCanvasKit }) asy
136136
}
137137

138138
final List<String> arguments = <String>[
139+
'compile',
140+
'js',
139141
'--no-minify',
140142
'--disable-inlining',
141143
'--enable-asserts',
@@ -155,7 +157,7 @@ Future<bool> compileUnitTest(FilePath input, { required bool forCanvasKit }) asy
155157
];
156158

157159
final int exitCode = await runProcess(
158-
environment.dart2jsExecutable,
160+
environment.dartExecutable,
159161
arguments,
160162
workingDirectory: environment.webUiRootDir.path,
161163
);
@@ -196,8 +198,10 @@ Future<void> buildHostPage() async {
196198
}
197199

198200
final int exitCode = await runProcess(
199-
environment.dart2jsExecutable,
201+
environment.dartExecutable,
200202
<String>[
203+
'compile',
204+
'js',
201205
hostDartPath,
202206
'-o',
203207
'$hostDartPath.js',

web_sdk/web_test_utils/lib/environment.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ class Environment {
111111
/// The "pub" executable file.
112112
String get pubExecutable => pathlib.join(dartSdkDir.path, 'bin', 'pub');
113113

114-
/// The "dart2js" executable file.
115-
String get dart2jsExecutable =>
116-
pathlib.join(dartSdkDir.path, 'bin', 'dart2js');
117-
118114
/// Path to where github.com/flutter/engine is checked out inside the engine workspace.
119115
io.Directory get flutterDirectory =>
120116
io.Directory(pathlib.join(engineSrcDir.path, 'flutter'));

0 commit comments

Comments
 (0)