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

brief-engineer-67497

11/16/2018, 9:51 AM
Hi, I'm having trouble to undersand how the argument
classpath_spec
of the method
register_jvm_tool
of the class
JvmToolMixin
works. in pants codebas I often see
//:foo
even if there is no target foo in the
BUILD
file in the same directory of the declaration. Btw, how is the
//
intrepreted ?
e

enough-analyst-54434

11/16/2018, 1:05 PM
That's right. The spec is the BUILD file address pants will look at to see if there is an override of the default jvm tool classpath. If the spec points to a non-existant BUILD file address, pants uses the default (typical). If the spec points to a live BUILD file address it is expected that address points to a jar_library. The key point being the pants jvm tool support only currently works for pre-built jvm tools.
And the
//
is just general pants BUILD file address syntax to indicate an absolute path from the repo root. This is explained a bit here: https://www.pantsbuild.org/target_addresses.html
b

brief-engineer-67497

11/16/2018, 1:15 PM
thanks for the precisions !
5 Views