Split preview mode into separate feature flags (#14823)
I think this would give us better hygiene than a global flag. It makes it easier for users to opt-in to overlapping features, such as Python upgrades and Python bin installations and to disable warnings for preview mode without opting in to a bunch of other features. In general, I want to reduce the burden for putting something under preview. The `--preview` and `--no-preview` flags are retained as global overrides. A new `--preview-features` option is added which accepts comma separated features or can be passed multiple times, e.g., `--preview-features add-bounds,pylock`. There's a `UV_PREVIEW_FEATURES` environment variable for that option (I'm not sure if we should overload `UV_PREVIEW`, but could be convinced).
This commit is contained in:
@@ -18,7 +18,7 @@ use uv_cache::Cache;
|
||||
use uv_client::RegistryClient;
|
||||
use uv_configuration::{
|
||||
BuildKind, BuildOptions, ConfigSettings, Constraints, IndexStrategy, PackageConfigSettings,
|
||||
PreviewMode, Reinstall, SourceStrategy,
|
||||
Preview, Reinstall, SourceStrategy,
|
||||
};
|
||||
use uv_configuration::{BuildOutput, Concurrency};
|
||||
use uv_distribution::DistributionDatabase;
|
||||
@@ -99,7 +99,7 @@ pub struct BuildDispatch<'a> {
|
||||
sources: SourceStrategy,
|
||||
workspace_cache: WorkspaceCache,
|
||||
concurrency: Concurrency,
|
||||
preview: PreviewMode,
|
||||
preview: Preview,
|
||||
}
|
||||
|
||||
impl<'a> BuildDispatch<'a> {
|
||||
@@ -123,7 +123,7 @@ impl<'a> BuildDispatch<'a> {
|
||||
sources: SourceStrategy,
|
||||
workspace_cache: WorkspaceCache,
|
||||
concurrency: Concurrency,
|
||||
preview: PreviewMode,
|
||||
preview: Preview,
|
||||
) -> Self {
|
||||
Self {
|
||||
client,
|
||||
|
||||
Reference in New Issue
Block a user