Hi, I'm having trouble to undersand how the argume...
# general
b
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
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
thanks for the precisions !