Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually run the EnsurePrerequisitsRan target #2989

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Aug 27, 2024

The DedupeDriver target doesn't exist anywhere so the EnsurePrerequisitsRan never runs. If the drivers were never downloaded by Playwright.Tooling then the following occurs when building Playwright.csproj if EnsurePrerequisitsRan doesn't run before:

Playwright failed with 5 error(s) (3.0s)
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/linux/node" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/mac-arm64/node" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/win32_x64/node.exe" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/mac/node" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/linux-arm64/node" because it was not found.

By actually running the EnsurePrerequisitsRan target we get a much better, actionable error instead:

Playwright failed with 1 error(s) (2.5s)
  ~/playwright-dotnet/src/Playwright/Playwright.csproj(56,5): error : Playwright prerequisites are missing. Ensure you've ran `dotnet run --project ./src/tools/Playwright.Tooling/Playwright.Tooling.csproj -- download-drivers --basepath .`

The `DedupeDriver` target doesn't exist anywhere so the `EnsurePrerequisitsRan` never runs. If the drivers were never downloaded by `Playwright.Tooling` then the following occurs when building `Playwright.csproj` if `EnsurePrerequisitsRan` doesn't run before:
```
Playwright failed with 5 error(s) (3.0s)
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/linux/node" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/mac-arm64/node" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/win32_x64/node.exe" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/mac/node" because it was not found.
  /usr/local/share/dotnet/sdk/8.0.401/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "~/playwright-dotnet/src/Playwright/.drivers/linux-arm64/node" because it was not found.
```

By actually running the `EnsurePrerequisitsRan` target we get a much better, actionable error instead:
```
Playwright failed with 1 error(s) (2.5s)
  ~/playwright-dotnet/src/Playwright/Playwright.csproj(56,5): error : Playwright prerequisites are missing. Ensure you've ran `dotnet run --project ./src/tools/Playwright.Tooling/Playwright.Tooling.csproj -- download-drivers --basepath .`
```
@mxschmitt mxschmitt merged commit 08ad156 into microsoft:main Sep 2, 2024
13 of 15 checks passed
@0xced 0xced deleted the EnsurePrerequisitsRan branch September 2, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants