Implement Rust packaging support in azsdk pkg pack#15193
Open
Conversation
dd2c232 to
fbcfeb7
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Rust crate packaging support to azsdk-cli’s azsdk pkg pack workflow by implementing PackAsync in RustLanguageService, invoking the Rust repo’s PowerShell pack script and returning an artifact path when available.
Changes:
- Implement
RustLanguageService.PackAsyncto runeng/scripts/Pack-Crates.ps1with-PackageNames,-NoVerify, and optional-OutputPath. - Add/extend pack-related tests in
PackToolTestsandRustLanguageServiceTests. - Update Rust build script path constant casing in
RustLanguageService.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/RustLanguageService.cs | Adds Rust PackAsync implementation + artifact resolution helper; also changes build script relative path casing. |
| tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/Package/PackToolTests.cs | Adds Rust pack integration-style tests for PackTool (script invocation + arg verification). |
| tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Services/Languages/RustLanguageServiceTests.cs | Adds unit tests for Rust PackAsync behavior and helpers for setting up the pack script. |
501012a to
7296933
Compare
Add PackAsync override to RustLanguageService that shells out to eng/scripts/Pack-Crates.ps1 in the azure-sdk-for-rust repo. The implementation passes -PackageNames and -NoVerify flags, and optionally -OutputPath when specified. Artifact path resolution handles both default (target/package/) and custom output locations with fallback search for .crate files. Add comprehensive tests in both PackToolTests (integration-level) and RustLanguageServiceTests (unit-level) covering success, failure, missing script, output path forwarding, and argument verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7296933 to
ade5cf8
Compare
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.
Resolved #14927
What
Add Rust crate packaging to
azsdk pkg packby shelling out toeng/scripts/Pack-Crates.ps1in the azure-sdk-for-rust repo.Changes
PackAsyncoverride that invokesPack-Crates.ps1with -PackageNames, -NoVerify, and optional -OutputPath.