Add uv build --all option (#7724)

## Summary

Resolves #7705 

## Test Plan

`cargo test` and tested locally.

The snapshots were unstable due to the packages being built in a
non-deterministic order, so I used the quiet flag to suppress the
output.

Another question is whether we should label the build output to indicate
which package it belongs to?
This commit is contained in:
Ahmed Ilyas 2024-09-27 04:46:06 +02:00 committed by GitHub
parent ed1684a0e4
commit 805f1bd6f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 469 additions and 68 deletions

View file

@ -2011,9 +2011,18 @@ pub struct BuildArgs {
/// directory if no source directory is provided.
///
/// If the workspace member does not exist, uv will exit with an error.
#[arg(long)]
#[arg(long, conflicts_with("all"))]
pub package: Option<PackageName>,
/// Builds all packages in the workspace.
///
/// The workspace will be discovered from the provided source directory, or the current
/// directory if no source directory is provided.
///
/// If the workspace member does not exist, uv will exit with an error.
#[arg(long, conflicts_with("package"))]
pub all: bool,
/// The output directory to which distributions should be written.
///
/// Defaults to the `dist` subdirectory within the source directory, or the