https://pantsbuild.org/ logo
#general
Title
# general
b

bored-glass-58755

08/30/2022, 9:34 PM
Hello guys, would it be possible for pants to use the
grpc_python_plugin
from the bin of the grpc installation rather than using a standalone binary? Just wanted to understand why it is not done that way currently before I open a feature request.
h

hundreds-father-404

08/30/2022, 9:39 PM
We'd love that! I think when we added grpc in 2020, it wasn't possible for some reason. https://github.com/pantsbuild/pants/pull/10927 I'm not sure from that what the problem was
b

bored-glass-58755

08/30/2022, 9:45 PM
Cool, let me open a feature request then.
❤️ 1
h

hundreds-father-404

08/30/2022, 9:47 PM
cool. I think it's as simple as updating the URL and hashes in
grpc_python_plugin.py
if you want to try implementing too 🙂
b

bored-glass-58755

08/30/2022, 9:47 PM
Sure, I'd love that.
Just to be sure, I need to do the contributor setup for Pants repo for this?
h

hundreds-father-404

08/30/2022, 9:49 PM
awesome - I'm trying to get out a 2.14 release tomorrow, so we can cherry-pick this to 2.14 as well
Just to be sure, I need to do the contributor setup for Pants repo for this?
Yeah, but you can also save yourself time by not actually running
./pants
. Simply change the URL and hashes in
grpc_python_plugin.py
, then use CI to run the tests. That should be fine because this is a trivial change https://www.pantsbuild.org/docs/contributor-overview. (Rust compilation is slow the first time)
❤️ 1
b

bored-glass-58755

08/30/2022, 10:03 PM
If I change the URL and hashes, it would stick to the updated version then and not automatically pull in the latest grpc?
h

hundreds-father-404

08/30/2022, 10:05 PM
There is no way to say "latest". It's super important to Pants that everything is pinned down so that things Don't Break On You Overnight. Instead, we try to have pantsbuild/pants's defaults be the latest stable version of tools, and then users can also set to what they want. (And we love when contributor update tool versions!)
b

bored-glass-58755

08/30/2022, 10:51 PM
Hi, how would I know SHA before the new binaries are uploaded to the default URL which is https://binaries.pantsbuild.org/bin/grpc_python_plugin/{version}/{platform}/grpc_python_plugin?
I have another question related to this: if I have
grpcio
and
grpcio-tools
in my
requirements.txt
, then Pants will install them in the virtualenv that it uses for itself. Why can't
grpc-python-plugin
use that installation instead of having to rely on the standalone binaries?
Hi @hundreds-father-404, I haven't been able to do it yet as I need some more guidance in completing this change.
l

limited-country-20626

09/01/2022, 1:39 PM
Hi friends. I used to mirror the https://github.com/pantsbuild/binaries/tree/master/build-support/bin in Artifactory. I suspect the patterns have changed since then but ultimately we will need to do something philosophically similar
is this plugin a replacement for the binaryutils patterns? or has this changed to something that could come from a package manager
4 Views