Skip to content

[dotnet] [build] Combine bazel targets#17387

Merged
nvborisenko merged 1 commit into
SeleniumHQ:trunkfrom
nvborisenko:dotnet-build-combine-bazel
Apr 25, 2026
Merged

[dotnet] [build] Combine bazel targets#17387
nvborisenko merged 1 commit into
SeleniumHQ:trunkfrom
nvborisenko:dotnet-build-combine-bazel

Conversation

@nvborisenko

Copy link
Copy Markdown
Member

Let bazel parallelize targets, msbuild runs bazel once (per target framework). Still safe. Now it is faster in IDE to "run single test".

💥 What does this PR do?

This pull request simplifies and consolidates the build process in the Selenium.WebDriver.csproj file by merging multiple Bazel build steps into a single target. This change streamlines the generation of required build artifacts and reduces redundancy.

Build process simplification:

  • Replaced the separate GenerateSeleniumManagerBinaries, GenerateResources, and GenerateCdp targets with a single unified GenerateBazelArtifacts target that builds all necessary Bazel artifacts before compilation. [1] [2]
  • The new target ensures all generated files (such as ResourceUtilities.g.cs and DevTools code) are included in the compilation in one step, reducing complexity and potential for build errors.

No other functional or code changes are included in this pull request.

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s):
    • What was generated:
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Cleanup (formatting, renaming)

Copilot AI review requested due to automatic review settings April 25, 2026 08:03
@selenium-ci selenium-ci added the C-dotnet .NET Bindings label Apr 25, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Consolidate Bazel build targets for improved parallelization

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Consolidate three separate Bazel build targets into single unified target
• Improve build parallelization by allowing Bazel to optimize target execution
• Reduce build complexity and redundancy in MSBuild process
• Accelerate IDE single test execution performance

Grey Divider

File Changes

1. dotnet/src/webdriver/Selenium.WebDriver.csproj ✨ Enhancement +7/-18

Merge three Bazel targets into unified artifact generation

• Merged GenerateSeleniumManagerBinaries, GenerateResources, and GenerateCdp targets into
 single GenerateBazelArtifacts target
• Changed target execution point from BeforeBuild to CoreCompile for better build ordering
• Combined all Bazel build commands into one execution: manager binaries, resource utilities, and
 DevTools code generation
• Consolidated ItemGroup declarations for compiled artifacts within the unified target

dotnet/src/webdriver/Selenium.WebDriver.csproj


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates multiple MSBuild-invoked Bazel build steps for the .NET WebDriver project into a single target, aiming to reduce redundant Bazel invocations and improve IDE/test build performance.

Changes:

  • Replaced three separate MSBuild targets (GenerateSeleniumManagerBinaries, GenerateResources, GenerateCdp) with one unified GenerateBazelArtifacts target.
  • Updated the unified target to build all required Bazel outputs in one command and include the generated .cs sources in compilation.

@nvborisenko nvborisenko merged commit c52419f into SeleniumHQ:trunk Apr 25, 2026
24 of 25 checks passed
@nvborisenko nvborisenko deleted the dotnet-build-combine-bazel branch April 25, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants