Conversation
hrfuller
approved these changes
Jul 12, 2022
Contributor
hrfuller
left a comment
There was a problem hiding this comment.
LGTM. I agree it was getting ungainly and all the dunder files were ugly. Can you please follow up after squashing and merging, by adding this commit to //:.git-blame-ignore-revs
alexeagle
added a commit
to aspect-build/bazel-central-registry
that referenced
this pull request
Aug 3, 2022
alexeagle
added a commit
to aspect-build/bazel-central-registry
that referenced
this pull request
Aug 3, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR attempts to simplify the
pip_install / pip_parsepython source packages. The code had grown organically and I found it difficult to follow and unnecessarily nested into packages.In general, the code should be quite simple:
There is some additional utility around annotations to bazel rules, extracting wheels and updating namespace_pkgs, but I still believe the code doesn't need to be so fragmented across multiple packages. There is a lot of very similar / duplicated logic when extracting wheels that is probably unnecessary.
This PR simply moves existing code and imports around and should be fully backwards compatible.
Given that
pip_parseseems to be the more popular choice (based on discussions and most of the recent GH issues) it is probably justified to remove the eager installation logic (pip_install) and standardise onpip_parse. It should be possible to run with both aliases. I'll do this in a follow-up refactor.