Skip to content

feat(ir): add typed helper for ArchiveFiles@2#1028

Merged
jamesadevine merged 1 commit into
mainfrom
feat/ir-archive-files-v2-b0ba510d0db79197
Jun 15, 2026
Merged

feat(ir): add typed helper for ArchiveFiles@2#1028
jamesadevine merged 1 commit into
mainfrom
feat/ir-archive-files-v2-b0ba510d0db79197

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds archive_files_step to src/compile/ir/tasks.rs — a typed factory function for ArchiveFiles@2 that packages a folder or file into a zip, tar, 7z, or wim archive.

Motivation

Previously, any code that needed to emit an ArchiveFiles@2 step had to hand-craft TaskStep::new("ArchiveFiles@2", ...) with raw string inputs. This PR introduces a well-typed helper that makes required inputs explicit at the call site and documents all optional inputs.

Changes

  • src/compile/ir/tasks.rs: archive_files_step(root_folder_or_file, archive_file) factory function with full doc comment covering all optional inputs
  • 4 new unit tests covering:
    • required inputs (rootFolderOrFile, archiveFile)
    • archiveType override to tar with tarCompression
    • optional boolean flags (includeRootFolder, replaceExistingArchive)
    • 7z archive type with sevenZipCompression level

ADO Task Reference

Design

The archiveType input is optional via .with_input(...) rather than a positional parameter because zip covers the large majority of use cases. Callers that need tar or 7z add one .with_input("archiveType", "tar") call.

Validation

  • cargo build --all-targets
  • cargo test — 1999+ tests pass, 0 failures
  • cargo clippy — pre-existing await_holding_lock warning in source_path_guard.rs (present on main before this PR, not introduced here)

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 · 710.7 AIC · ⌖ 34.4 AIC · ⊞ 36.1K ·

Adds `archive_files_step` to `src/compile/ir/tasks.rs` — a typed
factory for `ArchiveFiles@2` that packages a folder or file into a
zip, tar, 7z, or wim archive.

Required inputs are positional parameters (`rootFolderOrFile` and
`archiveFile`). The archive type defaults to `zip`; callers that need
tar/7z/wim can override via `.with_input("archiveType", …)`. All
other optional inputs (`includeRootFolder`, `replaceExistingArchive`,
`sevenZipCompression`, `tarCompression`, `verbose`, `quiet`) are
documented in the doc comment and available through `.with_input(…)`.

Four unit tests cover: required inputs, tar archive type override,
optional boolean flags, and 7z compression level.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review June 15, 2026 20:18
@jamesadevine jamesadevine merged commit 608f402 into main Jun 15, 2026
20 checks passed
@jamesadevine jamesadevine deleted the feat/ir-archive-files-v2-b0ba510d0db79197 branch June 15, 2026 20:27
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