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

Run pub get before building host.dart. #37502

Merged
merged 2 commits into from
Nov 11, 2022
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: 1 addition & 3 deletions lib/web_ui/dev/felt
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,9 @@ then
fi

install_deps() {
# We need to run pub get here before we actually invoke felt.
echo "Running \`dart pub get\` in 'engine/src/flutter/lib/web_ui'"
(cd "$WEB_UI_DIR"; $DART_PATH pub get)

echo "Running \`dart pub get\` in 'engine/src/flutter/web_sdk/web_engine_tester'"
(cd "$FLUTTER_DIR/web_sdk/web_engine_tester"; $DART_PATH pub get)
}

if [[ $KERNEL_NAME == *"Darwin"* ]]
Expand Down
4 changes: 3 additions & 1 deletion lib/web_ui/dev/felt.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ SET DART_BIN=%DART_SDK_DIR%\bin\dart

cd %WEB_UI_DIR%

:: We need to invoke pub get here before we actually invoke felt.
CALL %DART_BIN% pub get

IF FELT_USE_SNAPSHOT=="0" (
ECHO Invoking felt.dart without snapshot
SET FELT_TARGET=%FELT_PATH%
) ELSE (
IF NOT EXIST "%SNAPSHOT_PATH%" (
ECHO Precompiling felt snapshot
CALL %DART_BIN% pub get
%DART_BIN% --snapshot="%SNAPSHOT_PATH%" --packages="%WEB_UI_DIR%\.dart_tool\package_config.json" %FELT_PATH%
)
SET FELT_TARGET=%SNAPSHOT_PATH%
Expand Down
18 changes: 17 additions & 1 deletion lib/web_ui/dev/steps/compile_tests_step.dart
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,23 @@ Future<void> buildHostPage() async {
print('Building ${hostDartFile.path}.');
}

final int exitCode = await runProcess(
int exitCode = await runProcess(
environment.dartExecutable,
<String>[
'pub',
'get',
],
workingDirectory: environment.webEngineTesterRootDir.path
);

if (exitCode != 0) {
throw ToolExit(
'Failed to run pub get for web_engine_tester, exit code $exitCode',
exitCode: exitCode,
);
}

exitCode = await runProcess(
environment.dartExecutable,
<String>[
'compile',
Expand Down