Skip to content

feat(ir): add typed builder for VSBuild@1 - #1210

Merged
jamesadevine merged 1 commit into
mainfrom
feat/ir-vsbuild-v1-6a8144bf0121a442
Jun 26, 2026
Merged

feat(ir): add typed builder for VSBuild@1#1210
jamesadevine merged 1 commit into
mainfrom
feat/ir-vsbuild-v1-6a8144bf0121a442

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed builder struct for VSBuild@1 to the ado-aw IR.

Motivation

Previously, any code that needed to emit a VSBuild@1 step had to hand-craft
TaskStep::new("VSBuild@1", ...) with raw string input keys. This PR introduces
a 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: new VsBuild builder struct with typed enums
    (VsVersion, MsBuildArchitecture, LogFileVerbosity) and #[cfg(test)] mod tests
  • src/compile/ir/tasks/mod.rs: pub mod vs_build; declaration (alphabetical order)

ADO Task Reference

  • Task: VSBuild@1
  • Docs: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/vsbuild-v1-task
  • Required inputs: solution (glob pattern, e.g. **\*.sln)
  • Optional inputs:
    • vsVersion — typed enum VsVersion (Latest, Vs2022, Vs2019, Vs2017, Vs2015, Vs2013)
    • msbuildArgs — additional MSBuild arguments
    • platform — 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 enum MsBuildArchitecture (X86, X64, Arm64)
    • logProjectEvents — log project-level events (bool)
    • createLogFile — write build log file (bool)
    • logFileVerbosity — typed enum LogFileVerbosity (Quiet, Minimal, Normal, Detailed, Diagnostic)
    • enableDefaultLogger — enable default logger (bool)
    • customVersion — custom VS version string

Validation

  • cargo build --all-targets
  • cargo test (2263+ tests passing, 0 failed)
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created 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.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by ADO Task IR Contributor · 1K AIC · ⌖ 44.1 AIC · ⊞ 38.7K ·

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>
@github-actions github-actions Bot mentioned this pull request Jun 25, 2026
@jamesadevine
jamesadevine marked this pull request as ready for review June 26, 2026 06:49
@jamesadevine
jamesadevine merged commit af20033 into main Jun 26, 2026
@jamesadevine
jamesadevine deleted the feat/ir-vsbuild-v1-6a8144bf0121a442 branch June 26, 2026 06:49
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.

1 participant