-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Python: upgrade clap
#18797
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
Python: upgrade clap
#18797
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand why this is a problem now and not before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The short answer is sheer coincidence 😄
The slightly longer answer is: this is what bazel uses to prefix names of external rust dependencies of the python extractor, which then get pulled in in
MODULE.bazel
. The names are of the form<repository_name>__<crate name>_<version>
, but it turns out they need to be disjoint from the dependencies of the other tree-sitter extractors, because then you end up defining something twice inMODULE.bazel
(which in hindsight is not that weird).Until now it just so happened that the versions of the common dependencies in the two lock files were never overlapping, until I had
anyhow
hit this condition after updatingclap
.This does mean there is no sharing of dependencies between the two families of tree-sitter extractor, which does mean potentially rebuilding some of those when building the whole dist. In order to do share those we would need to put everything in the same workspace, and we saw that was causing an increased build cost for building just one of the two (i.e. building python was incurring overhead coming from ruby/rust). It might be that is not the case any more with this vendoring thing and the newer version of
rules_rust
, we might need to retest that (cc @criemen).If you wonder why I did not rename the other
crates_vendor
rule, it's just because I did not want to conflict with #18789. I will probably also rename that there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I did wonder that, thanks for the detailed answer! :-)