red-balloon-89377
11/16/2018, 1:05 AMpants/goal/run_tracker.py:177
, I thinkwide-energy-11069
11/16/2018, 1:05 AMhappy-kitchen-89482
11/16/2018, 6:32 AMaloof-angle-91616
11/16/2018, 6:42 AMwide-energy-11069
11/16/2018, 6:45 AMtests/python/pants_test/backend/jvm/tasks:jar_publish_integration
for some reason, but I’m not sure what’s so special about these testswide-energy-11069
11/16/2018, 6:51 AM# Select a globally unique ID for the run, that sorts by time.
millis = int((self._run_timestamp * 1000) % 1000)
run_id = 'pants_run_{}_{}_{}'.format(
time.strftime('%Y_%m_%d_%H_%M_%S', time.localtime(self._run_timestamp)),
millis,
uuid.uuid4().hex
)
wide-energy-11069
11/16/2018, 6:52 AMwide-energy-11069
11/16/2018, 7:16 AMbrief-engineer-67497
11/16/2018, 9:51 AMclasspath_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 ?brief-engineer-67497
11/16/2018, 9:53 AMclasspath_spec
is passed to the register
and I'm not clear on the nature of this functionbrief-engineer-67497
11/16/2018, 10:02 AMpants-plugin
python
foo
targets
foo_library.py
tasks
foo_gen.py
register.py
scala
foo-cli
Foo.scala
BUILD
In foo_gen.py
, there is
cls.register_jvm_tool(register, 'foo-cli',
classpath=[
JarDependency(org='bar',
name='foo-cli',
rev='0.0.1-SNAPSHOT'),
],
classpath_spec='//pants-plugins/scala/foo-cli'
)
and in scala/foo-cli/BUILD
java_library(
sources = rglobs('*.scala'),
dependencies = [
'3rdparty/jvm/some/dependency'
],
provides = artifact(org='bar',
name='foo-cli',
repo=snapshots)
)
When I run my task I still get a ClassNotFoundException
from my third party dependency. (I'm sure that foo-cli
is correctly published with a pom listing the 3rd party dependencies and that the foo-cli jar used is fetched from the nexus repository).
Do you see how to fix this ?average-vr-56795
11/16/2018, 2:19 PMenough-analyst-54434
11/16/2018, 2:41 PMaverage-vr-56795
11/16/2018, 2:43 PMnailMain
for it?enough-analyst-54434
11/16/2018, 2:43 PMenough-analyst-54434
11/16/2018, 2:44 PMenough-analyst-54434
11/16/2018, 2:44 PMaverage-vr-56795
11/16/2018, 2:44 PMaverage-vr-56795
11/16/2018, 2:44 PMenough-analyst-54434
11/16/2018, 2:45 PMaverage-vr-56795
11/16/2018, 2:45 PMaverage-vr-56795
11/16/2018, 2:45 PMred-balloon-89377
11/16/2018, 5:02 PMsilly-refrigerator-91543
11/17/2018, 8:04 AMjar_library(
name = 'scalac-plugin-dep',
jars = [
scala_jar('org.spire-math', 'kind-projector', '0.9.7'),
],
)
in my BUILD.tools. (I'm using 1.11.0rc1.)
Unfortunately it seems to have no effect whatsoever. FWIW, if I 'misdeclare' the dependency, e.g. by misspelling the group name (org.spire-math) is does result in resolution errors, so it's at least going through ivy resolution. It just doesn't seem to have any effect on compilation and I get compilation errors where none would be expected. (I have a fully working SBT build, so I know for a fact that the code all compiles).
(Aside: Would scalac plugins be expected to work with the pants IDEA plugin and/or project generation? If not then the above question is irrelevant 🙂 )silly-refrigerator-91543
11/17/2018, 8:20 AMscalac_plugins
in the [compile.zinc]
section in the pants.ini
file, but that approach complains that there's no such option.
EDIT: Any help debugging this (e.g. flags I can use to show the compiler options actually being used, etc.) would be greatly appreciated.aloof-angle-91616
11/18/2018, 6:29 AMbrief-engineer-67497
11/19/2018, 4:18 PMwide-energy-11069
11/19/2018, 7:05 PMwitty-crayon-22786
11/19/2018, 7:34 PMwide-energy-11069
11/19/2018, 7:35 PM