feat(ir): add typed builder for VSBuild@1 - #1210
Merged
Merged
Conversation
Adds a typed builder struct for `VSBuild@1` to the ado-aw IR under `src/compile/ir/tasks/vs_build.rs`. - `VsBuild::new(solution)` takes the required solution glob. - Typed enums: `VsVersion`, `MsBuildArchitecture`, `LogFileVerbosity`. - 14 optional inputs (configuration, platform, msbuildArgs, clean, maximumCpuCount, restoreNugetPackages, logProjectEvents, createLogFile, logFileVerbosity, enableDefaultLogger, customVersion, etc.) are emitted only when set. - 6 unit tests covering minimal build, release build, enum tokens, display name override, and absent-optional invariant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
jamesadevine
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a typed builder struct for
VSBuild@1to the ado-aw IR.Motivation
Previously, any code that needed to emit a
VSBuild@1step had to hand-craftTaskStep::new("VSBuild@1", ...)with raw string input keys. This PR introducesa typed builder struct (
new(solution)+ typed optional setters +into_step())so the required input is positional, optional inputs and their constrained values
are type-checked, and call sites stop using stringly-typed keys.
Changes
src/compile/ir/tasks/vs_build.rs: newVsBuildbuilder struct with typed enums(
VsVersion,MsBuildArchitecture,LogFileVerbosity) and#[cfg(test)] mod testssrc/compile/ir/tasks/mod.rs:pub mod vs_build;declaration (alphabetical order)ADO Task Reference
VSBuild@1https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/vsbuild-v1-tasksolution(glob pattern, e.g.**\*.sln)vsVersion— typed enumVsVersion(Latest, Vs2022, Vs2019, Vs2017, Vs2015, Vs2013)msbuildArgs— additional MSBuild argumentsplatform— target platform (x86, x64, Any CPU)configuration— build configuration (Debug, Release)clean— clean build (bool)maximumCpuCount— use all CPUs (bool)restoreNugetPackages— restore NuGet before build (bool)msbuildArchitecture— typed enumMsBuildArchitecture(X86, X64, Arm64)logProjectEvents— log project-level events (bool)createLogFile— write build log file (bool)logFileVerbosity— typed enumLogFileVerbosity(Quiet, Minimal, Normal, Detailed, Diagnostic)enableDefaultLogger— enable default logger (bool)customVersion— custom VS version stringValidation
cargo build --all-targetscargo test(2263+ tests passing, 0 failed)cargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.