Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set lower bounds in uv add #5688

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Set lower bounds in uv add #5688

merged 1 commit into from
Aug 1, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Closes #5178.

@charliermarsh charliermarsh added enhancement New feature or improvement to existing functionality preview Experimental behavior labels Aug 1, 2024
// If any of the requirements were added without version specifiers, add a lower bound.
let mut modified = false;
for edit in &edits {
// Only set a minimum version for newly-added dependencies (as opposed to updates).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth reviewing the criteria here for when we set a lower bound: (1) never for existing dependencies, it must be a new dependency in uv add; (2) never when the user provides a URL.

@@ -154,24 +155,31 @@ pub(crate) async fn add(
.resolve()
.await?;

// TODO(charlie): This should return an edit whereby it tells us which requirements were added
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is outdated?

Base automatically changed from charlie/extra-add to main August 1, 2024 16:41
@charliermarsh charliermarsh merged commit ad384ec into main Aug 1, 2024
57 checks passed
@charliermarsh charliermarsh deleted the charlie/add-lower-bound branch August 1, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should uv add set lower version bounds?
2 participants