Box clap commands to avoid windows debug clap stack overflow (#4768)
The changes in https://github.com/astral-sh/uv/pull/4708 caused an overflow in debug mode only of the 1MB default stack size in windows during clap. This means that even trivial wrong argument tests would fail without increasing the stack size. As remedy, we box the clap types.
This commit is contained in:
@@ -55,13 +55,13 @@ fn extra_name_with_clap_error(arg: &str) -> Result<ExtraName> {
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct Cli {
|
||||
#[command(subcommand)]
|
||||
pub command: Commands,
|
||||
pub command: Box<Commands>,
|
||||
|
||||
#[command(flatten)]
|
||||
pub global_args: GlobalArgs,
|
||||
pub global_args: Box<GlobalArgs>,
|
||||
|
||||
#[command(flatten)]
|
||||
pub cache_args: CacheArgs,
|
||||
pub cache_args: Box<CacheArgs>,
|
||||
|
||||
/// The path to a `uv.toml` file to use for configuration.
|
||||
#[arg(global = true, long, env = "UV_CONFIG_FILE")]
|
||||
|
||||
Reference in New Issue
Block a user