mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Make uv.sources
without --preview
non-fatal (#4558)
## Summary Like other preview usages, this should just warn.
This commit is contained in:
parent
45c271d15d
commit
d4fd868531
12 changed files with 37 additions and 38 deletions
|
@ -40,8 +40,6 @@ pub enum LoweringError {
|
|||
ForbiddenFragment(Url),
|
||||
#[error("`workspace = false` is not yet supported")]
|
||||
WorkspaceFalse,
|
||||
#[error("`tool.uv.sources` is a preview feature; use `--preview` or set `UV_PREVIEW=1` to enable it")]
|
||||
MissingPreview,
|
||||
#[error("Editable must refer to a local directory, not a file: `{0}`")]
|
||||
EditableFile(String),
|
||||
#[error(transparent)] // Function attaches the context
|
||||
|
@ -95,7 +93,7 @@ pub(crate) fn lower_requirement(
|
|||
};
|
||||
|
||||
if preview.is_disabled() {
|
||||
return Err(LoweringError::MissingPreview);
|
||||
warn_user_once!("`uv.sources` is experimental and may change without warning.");
|
||||
}
|
||||
|
||||
let source = match source {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue