https://pantsbuild.org/ logo
#development
Title
# development
r

red-balloon-89377

10/10/2019, 12:38 PM
Is there previous art of requiring a jar from a V2 rule? THinking of creating something like
@rule(NailgunServerJar, [JarSpec])
, and using a
product_request
in
zinc_compile.py
. I know I could just fingerprint the already existing nailgun tool jar, but would love to V2ize if possible
Ohh, I can take inspiration from the C++ pipeline by @aloof-angle-91616! Thanks for defining
BinaryTool
and
Script
!
Oh, but that may get deprecated when we implement v2 resolving 😞 I think for the Nailgun server jar, it would be better to just snapshot the jar we request in zinc_compile, and use the
Script
subsystem for whatever nailgun client we want.
a

aloof-angle-91616

10/10/2019, 3:02 PM
BinaryTool
and
Script
shouldn't be getting deprecated! i think your description is correct, but if we don't yet have v2 resolving done, using
Script
is a great solution
if you look at
src/python/pants/backend/jvm/tasks/coursier/coursier_subsystem.py
, we also pull down coursier from a url there -- there are multiple ways to do this
having
UrlToFetch -> Snapshot
working makes all of this much more flexible and easier
r

red-balloon-89377

10/10/2019, 3:04 PM
BinaryTool
and
Script
shouldn’t be getting deprecated!
I totally agree, i just meant for the case of “I just want a jar from maven with this coordinates”, which should be handled by jvm resolution when we have that in V2.
a

aloof-angle-91616

10/10/2019, 3:05 PM
yes! but i wouldn't block on that being available although it shouldn't necessarily be hard to do if we're planning to soon
r

red-balloon-89377

10/10/2019, 3:06 PM
I fortunately solved that problem through just snapshotting the jar in the python side: https://github.com/pantsbuild/pants/pull/8371/commits/ec206523a4972cc66c02b493955358c25d8a05c9
a

aloof-angle-91616

10/10/2019, 3:06 PM
ok wonderful!
oh yes ok this is correct
thanks!