[internal] Add #nullable enable directives to 5 supplement files #3171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
#nullable enabledirective to 5 supplement interface files in the Microsoft.Playwright namespace:These changes start the process of enabling nullable reference types throughout the codebase, which will help prevent null reference exceptions like the one described in issue #3161.
For interfaces with method parameters, null annotations have been added to parameters that previously allowed null (changing
object arg = nulltoobject? arg = null).According to the plan, we'll continue adding
#nullable enabledirectives to more files in future PRs, 5 files at a time. Once all files have been updated, we'll be able to enable nullable globally in the csproj file and remove the individual directives.Fixes #3163.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
crl3.digicert.comdotnet build src/Playwright/Playwright.csproj(dns block)dotnet build src/tools/Playwright.Tooling/Playwright.Tooling.csproj(dns block)crl4.digicert.comdotnet build src/Playwright/Playwright.csproj(dns block)dotnet build src/tools/Playwright.Tooling/Playwright.Tooling.csproj(dns block)ocsp.digicert.comdotnet build src/Playwright/Playwright.csproj(dns block)dotnet build src/tools/Playwright.Tooling/Playwright.Tooling.csproj(dns block)playwright.azureedge.net/home/REDACTED/work/playwright-dotnet/playwright-dotnet/src/tools/Playwright.Tooling/bin/Debug/net8.0/Playwright.Tooling download-drivers --basepath .(dns block)s.symcb.comdotnet build src/Playwright/Playwright.csproj(dns block)dotnet build src/tools/Playwright.Tooling/Playwright.Tooling.csproj(dns block)s.symcd.comdotnet build src/Playwright/Playwright.csproj(dns block)dotnet build src/tools/Playwright.Tooling/Playwright.Tooling.csproj(dns block)ts-crl.ws.symantec.comdotnet build src/Playwright/Playwright.csproj(dns block)dotnet build src/tools/Playwright.Tooling/Playwright.Tooling.csproj(dns block)ts-ocsp.ws.symantec.comdotnet build src/Playwright/Playwright.csproj(dns block)dotnet build src/tools/Playwright.Tooling/Playwright.Tooling.csproj(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.