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

Make direct dependency detection respect markers #2207

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Mar 5, 2024

Summary

When determining "direct" dependencies, we need to ensure that we respect markers. In the linked issue, the user had an optional dependency like:

[project.optional-dependencies]
dev = [
  "setuptools>=64",
  "setuptools_scm>=8"
]

By not respecting markers, we tried to resolve setuptools to the lowest-available version. However, since setuptools>=64 isn't enabled (since it's optional), we won't respect that constraint.

To be consistent, we need to omit optional dependencies just as we will at resolution time.

Closes #2203.

Test Plan

cargo test

@charliermarsh charliermarsh force-pushed the charlie/markers branch 4 times, most recently from 62dd9f8 to cb212d3 Compare March 5, 2024 17:14
@charliermarsh charliermarsh marked this pull request as ready for review March 5, 2024 17:16
@charliermarsh charliermarsh added the bug Something isn't working label Mar 5, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) March 5, 2024 17:19
@charliermarsh charliermarsh merged commit 8620b5a into main Mar 5, 2024
7 checks passed
@charliermarsh charliermarsh deleted the charlie/markers branch March 5, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv attempts (and fails) to install ancient setuptools
1 participant