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

[web] use 'dart compile js' instead of 'dart2js' in web_ui and felt #29179

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/web_ui/dev/environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ class Environment {
/// The "pub" executable file.
String get pubExecutable => pathlib.join(dartSdkDir.path, 'bin', 'pub');

/// The "dart2js" executable file.
String get dart2jsExecutable =>
pathlib.join(dartSdkDir.path, 'bin', 'dart2js');

/// Path to where github.com/flutter/engine is checked out inside the engine workspace.
io.Directory get flutterDirectory =>
io.Directory(pathlib.join(engineSrcDir.path, 'flutter'));
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/dev/felt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ DART_SDK_DIR="${ENGINE_SRC_DIR}/out/host_debug_unopt/dart-sdk"
GN="${FLUTTER_DIR}/tools/gn"
DART_TOOL_DIR="${WEB_UI_DIR}/.dart_tool"
PUB_PATH="$DART_SDK_DIR/bin/pub"
DART2JS_PATH="$DART_SDK_DIR/bin/dart2js"
DART_PATH="$DART_SDK_DIR/bin/dart"
SNAPSHOT_PATH="${DART_TOOL_DIR}/felt.snapshot"
STAMP_PATH="${DART_TOOL_DIR}/felt.snapshot.stamp"
SCRIPT_PATH="${DEV_DIR}/felt.dart"
REVISION="$(cd "$FLUTTER_DIR"; git rev-parse HEAD)"

if [ ! -f "${PUB_PATH}" -o ! -f "${DART2JS_PATH}" ]
if [ ! -f "${PUB_PATH}" -o ! -f "${DART_PATH}" ]
then
echo "Compiling the Dart SDK."
gclient sync
Expand Down
8 changes: 6 additions & 2 deletions lib/web_ui/dev/steps/compile_tests_step.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ Future<bool> compileUnitTest(FilePath input, { required bool forCanvasKit }) asy
}

final List<String> arguments = <String>[
'compile',
'js',
'--no-minify',
'--disable-inlining',
'--enable-asserts',
Expand All @@ -155,7 +157,7 @@ Future<bool> compileUnitTest(FilePath input, { required bool forCanvasKit }) asy
];

final int exitCode = await runProcess(
environment.dart2jsExecutable,
environment.dartExecutable,
arguments,
workingDirectory: environment.webUiRootDir.path,
);
Expand Down Expand Up @@ -196,8 +198,10 @@ Future<void> buildHostPage() async {
}

final int exitCode = await runProcess(
environment.dart2jsExecutable,
environment.dartExecutable,
<String>[
'compile',
'js',
hostDartPath,
'-o',
'$hostDartPath.js',
Expand Down
4 changes: 0 additions & 4 deletions web_sdk/web_test_utils/lib/environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ class Environment {
/// The "pub" executable file.
String get pubExecutable => pathlib.join(dartSdkDir.path, 'bin', 'pub');

/// The "dart2js" executable file.
String get dart2jsExecutable =>
pathlib.join(dartSdkDir.path, 'bin', 'dart2js');

/// Path to where github.com/flutter/engine is checked out inside the engine workspace.
io.Directory get flutterDirectory =>
io.Directory(pathlib.join(engineSrcDir.path, 'flutter'));
Expand Down