Azure / azure-sdk-for-rust

This repository is for the active development of the Azure SDK for Rust. For consumers of the SDK we recommend visiting Docs.rs and looking up the docs for any of libraries in the SDK.
MIT License
716 stars 247 forks source link

Run `cargo` commands using package name instead of pushing into directory #1934

Open heaths opened 3 days ago

heaths commented 3 days ago

Since all our crates are in a single workspace, it's better that the pipeline commands (scripts, etc.) pass --package (short: -p) when supported because:

  1. It's easier to see what package a command was run on if there's a failure (have to hunt for the directory we pushed into otherwise most times),
  2. It's less maintenance and risk pushing into directories and popping on errors (it's rare, but I've seen the pop fail to be executed).
heaths commented 3 days ago

Note that, for eng/scripts/Test-Packages.ps1, the package info should already have the package name. If anything, the manifest directory name should match the crate name, though it's best to read the crate name from the manifest if needed.