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

Use common routines for pip install and pip sync #3737

Merged
merged 2 commits into from
May 22, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

This PR takes the functions used in pip install, moves them into a common module, and then replaces all the pip sync logic with calls into those functions. The net effect is that pip install and pip sync share far more code and demonstrate much more consistent behavior.

Closes #3555.

@charliermarsh charliermarsh added the internal A refactor or improvement that is not user-facing label May 22, 2024
@charliermarsh
Copy link
Member Author

The test changes are all in the logging...

Previously, we logged uninstalls in pip sync but not pip install; now we log in both.

Previously, we logged resolution in pip install but not pip sync; now we log in both.

I don't feel that strongly about either.

@charliermarsh charliermarsh force-pushed the charlie/sync branch 4 times, most recently from b4d3355 to 90944eb Compare May 22, 2024 15:34
@charliermarsh
Copy link
Member Author

Ugh, this is surfacing a really subtle bug in a specific case: we have an editable installed, and a user requests a package of the same name, and so we resolve to the already-installed editable during resolution, but it then gets marked as extraneous when we create the install plan.

@charliermarsh charliermarsh merged commit 0313e7d into main May 22, 2024
44 checks passed
@charliermarsh charliermarsh deleted the charlie/sync branch May 22, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge pip_sync.rs and pip_install.rs.
1 participant