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

Commit f48be34

Browse files
Run pub get before building host.dart. (#37502)
* Run pub get before building host.dart. * We should call `pub get` for `web_ui` in the launcher script because felt itself needs it. However, we should let felt invoke `pub get` on `web_engine_tester` only as needed, not in the launcher script.
1 parent 0564989 commit f48be34

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

lib/web_ui/dev/felt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,9 @@ then
8787
fi
8888

8989
install_deps() {
90+
# We need to run pub get here before we actually invoke felt.
9091
echo "Running \`dart pub get\` in 'engine/src/flutter/lib/web_ui'"
9192
(cd "$WEB_UI_DIR"; $DART_PATH pub get)
92-
93-
echo "Running \`dart pub get\` in 'engine/src/flutter/web_sdk/web_engine_tester'"
94-
(cd "$FLUTTER_DIR/web_sdk/web_engine_tester"; $DART_PATH pub get)
9593
}
9694

9795
if [[ $KERNEL_NAME == *"Darwin"* ]]

lib/web_ui/dev/felt.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ SET DART_BIN=%DART_SDK_DIR%\bin\dart
3737

3838
cd %WEB_UI_DIR%
3939

40+
:: We need to invoke pub get here before we actually invoke felt.
41+
CALL %DART_BIN% pub get
42+
4043
IF FELT_USE_SNAPSHOT=="0" (
4144
ECHO Invoking felt.dart without snapshot
4245
SET FELT_TARGET=%FELT_PATH%
4346
) ELSE (
4447
IF NOT EXIST "%SNAPSHOT_PATH%" (
4548
ECHO Precompiling felt snapshot
46-
CALL %DART_BIN% pub get
4749
%DART_BIN% --snapshot="%SNAPSHOT_PATH%" --packages="%WEB_UI_DIR%\.dart_tool\package_config.json" %FELT_PATH%
4850
)
4951
SET FELT_TARGET=%SNAPSHOT_PATH%

lib/web_ui/dev/steps/compile_tests_step.dart

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,23 @@ Future<void> buildHostPage() async {
441441
print('Building ${hostDartFile.path}.');
442442
}
443443

444-
final int exitCode = await runProcess(
444+
int exitCode = await runProcess(
445+
environment.dartExecutable,
446+
<String>[
447+
'pub',
448+
'get',
449+
],
450+
workingDirectory: environment.webEngineTesterRootDir.path
451+
);
452+
453+
if (exitCode != 0) {
454+
throw ToolExit(
455+
'Failed to run pub get for web_engine_tester, exit code $exitCode',
456+
exitCode: exitCode,
457+
);
458+
}
459+
460+
exitCode = await runProcess(
445461
environment.dartExecutable,
446462
<String>[
447463
'compile',

0 commit comments

Comments
 (0)