feat(ir): add typed helper for ArchiveFiles@2#1028
Merged
Conversation
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
approved these changes
Jun 15, 2026
This was referenced Jun 15, 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
archive_files_steptosrc/compile/ir/tasks.rs— a typed factory function forArchiveFiles@2that packages a folder or file into a zip, tar, 7z, or wim archive.Motivation
Previously, any code that needed to emit an
ArchiveFiles@2step had to hand-craftTaskStep::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 inputsrootFolderOrFile,archiveFile)archiveTypeoverride totarwithtarCompressionincludeRootFolder,replaceExistingArchive)sevenZipCompressionlevelADO Task Reference
ArchiveFiles@2rootFolderOrFile(default:$(Build.BinariesDirectory)),archiveFile(default:$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip)archiveType(zip/7z/tar/wim, defaultzip),includeRootFolder,replaceExistingArchive,sevenZipCompression,tarCompression,verbose,quietDesign
The
archiveTypeinput is optional via.with_input(...)rather than a positional parameter becausezipcovers the large majority of use cases. Callers that needtaror7zadd one.with_input("archiveType", "tar")call.Validation
cargo build --all-targetscargo test— 1999+ tests pass, 0 failurescargo clippy— pre-existingawait_holding_lockwarning insource_path_guard.rs(present onmainbefore 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.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.