Support dev dependencies in virtual workspace roots (#5709)

## Summary

Closes https://github.com/astral-sh/uv/issues/5650.
This commit is contained in:
Charlie Marsh 2024-08-01 17:04:30 -04:00 committed by GitHub
parent 499c368f1e
commit 69b8b16c75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 222 additions and 62 deletions

View file

@ -1,6 +1,7 @@
use std::fmt;
use std::fmt::{Display, Formatter};
use std::str::FromStr;
use std::sync::LazyLock;
use serde::{Deserialize, Deserializer, Serialize};
@ -51,3 +52,10 @@ impl AsRef<str> for GroupName {
&self.0
}
}
/// The name of the global `dev-dependencies` group.
///
/// Internally, we model dependency groups as a generic concept; but externally, we only expose the
/// `dev-dependencies` group.
pub static DEV_DEPENDENCIES: LazyLock<GroupName> =
LazyLock::new(|| GroupName::new("dev".to_string()).unwrap());

View file

@ -2,7 +2,7 @@ use std::error::Error;
use std::fmt::{Display, Formatter};
pub use extra_name::ExtraName;
pub use group_name::GroupName;
pub use group_name::{GroupName, DEV_DEPENDENCIES};
pub use package_name::PackageName;
mod extra_name;