Skip to content

feat(ir): add typed helper for DotNetCoreCLI@2#1025

Merged
jamesadevine merged 1 commit into
mainfrom
feat/ir-dot-net-core-cli-step-a9ec50f1cd39ff38
Jun 15, 2026
Merged

feat(ir): add typed helper for DotNetCoreCLI@2#1025
jamesadevine merged 1 commit into
mainfrom
feat/ir-dot-net-core-cli-step-a9ec50f1cd39ff38

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed factory function for DotNetCoreCLI@2 to the ado-aw IR, following the established pattern in src/compile/ir/tasks.rs.

Motivation

Previously, any compiler code that needed to emit a DotNetCoreCLI@2 step had to hand-craft TaskStep::new("DotNetCoreCLI@2", ...) with raw string inputs. This PR introduces a well-typed dot_net_core_cli_step() helper that:

  • Makes the single required input (command) explicit at the call site
  • Provides a self-documenting API consistent with copy_files_step, docker_installer_step, and publish_test_results_step
  • Documents all optional inputs (projects, arguments, workingDirectory, publishTestResults, etc.) in the doc comment

Changes

  • src/compile/ir/tasks.rs: dot_net_core_cli_step(command) factory function with full doc comment covering all 11 optional inputs and their command applicability
  • src/compile/ir/tasks.rs: 4 unit tests covering build, test with optional inputs, publish with optional inputs, and all 8 supported commands

dot_net_core_cli_step signature

pub fn dot_net_core_cli_step(command: impl Into<String>) -> TaskStep

Display name is set to "dotnet <command>" (e.g. "dotnet build", "dotnet test"). Optional inputs are applied via .with_input(...):

Input key Applies to Default
projects build, test, publish, restore, run, custom
arguments build, publish, run, test, custom
workingDirectory build, publish, run, test, custom
publishTestResults test "true"
testRunTitle test
zipAfterPublish publish "true"
modifyOutputPath publish "true"
publishWebProjects publish "true"
custom custom
packagesToPush push "$(Build.ArtifactStagingDirectory)/*.nupkg"
packagesToPack pack "**/*.csproj"

ADO Task Reference

Validation

  • cargo build --all-targets — clean
  • cargo test — 1982 tests pass (4 new for dot_net_core_cli_step), 0 failures
  • cargo clippy --all-targets --all-features --workspace -- -D warnings — pre-existing failure in source_path_guard.rs (unrelated to this PR; exists on main)

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 · 734.2 AIC · ⌖ 18.7 AIC · ⊞ 35.3K ·

Adds `dot_net_core_cli_step(command)` to `src/compile/ir/tasks.rs`.
The function takes the required `command` input ("build", "test",
"publish", "restore", "pack", "run", "push", or "custom") and
returns a `TaskStep` pre-configured with a display name of
"dotnet <command>". All other inputs (projects, arguments,
workingDirectory, publishTestResults, etc.) are applied via the
existing `.with_input(…)` builder pattern.

Includes four unit tests covering build, test, publish, and all
supported command variants.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review June 15, 2026 14:40
@jamesadevine jamesadevine merged commit 74e7bea into main Jun 15, 2026
7 checks passed
@jamesadevine jamesadevine deleted the feat/ir-dot-net-core-cli-step-a9ec50f1cd39ff38 branch June 15, 2026 14:40
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