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

brief-engineer-67497

01/07/2019, 5:23 PM
hi, I have a little problem. If I compile twice the same target, first time it is a success, second time it fails as if the dependency is not in the classpath. I've set up a minimal example here : https://github.com/lgirault/test-pants-coursier
a

aloof-angle-91616

01/07/2019, 5:24 PM
what commands should i run to reproduce?
b

brief-engineer-67497

01/07/2019, 5:25 PM
./pants compile test-app/src/main/scala
run it twice
do you reproduce it ? should I open an issue ?
a

aloof-angle-91616

01/07/2019, 5:35 PM
sorry, got distracted right as i asked that. running it now
i do immediately repro. this is exactly a case for an issue. i don't expect this will be a hugely difficult fix and providing a minimal example as you have here is the most wonderful thing for debugging.
the weird thing though is that it's getting run again at all
why are you using this version of coursier, actually?
that's almost definitely going to be related
it doesn't mean you have to change it, just what is that coursier url providing you?
b

brief-engineer-67497

01/07/2019, 6:05 PM
sorry I was commuting
I need a version of coursier higher than M6 because of this fix : https://github.com/coursier/coursier/pull/870
the provided url is a version that one of my colleague build because the official one (https://oss.sonatype.org/content/repositories/releases/io/get-coursier/coursier-cli_2.12/1.1.0-M9/coursier-cli_2.12-1.1.0-M9-standalone.jar) has an exec trick https://github.com/coursier/coursier/blob/84727d8883007cbd3abb25a3707841c5b4391e26/project/ZipUtil.scala#L77 that messes nailgun and force us to use
execution_strategy=subprocess
(see this thread https://pantsbuild.slack.com/messages/C046T6T9U/ )
Actually it seems the link is the "official" jar with the exec trick stripped from it
a

aloof-angle-91616

01/07/2019, 6:24 PM
i tried upgrading pants to use the new coursier bootstrap url and that also fails with the same error
i would make an issue for sure since you have a clear repro
you can mention that if you change the pants version to
1.14.0.dev0
it also fails with the same error, even if i remove your overrides to coursier
b

brief-engineer-67497

01/07/2019, 6:26 PM
"cool" ! thank you for looking into it. I'll open the issue tomorrow when I arrive at work.
a

aloof-angle-91616

01/07/2019, 6:27 PM
yes -- sorry for the hassle, i was also delayed. please please do make an issue, or at this point i can if you're busy. this definitely seems like a fixable bug and i wouldn't want it to go unfixed
w

wide-energy-11069

01/07/2019, 7:25 PM
I dont repro. what’s the error?
a

aloof-angle-91616

01/07/2019, 7:33 PM
one of the thirdparty dependencies (
org.elasticsearch.something
) was failing on the second compile (which should have been cached) — the pants.ini doesn’t turn off caching so it seems like the error starts with
./pants compile
caching not working for some reason
probably ends with that too
b

brief-engineer-67497

01/08/2019, 8:51 AM
w

witty-crayon-22786

01/08/2019, 6:52 PM
@wide-energy-11069: i don't see breakage on the second run, but i do see the second run missing the cache
which is what might trigger breakage if it was going to happen
w

wide-energy-11069

01/08/2019, 6:53 PM
in the
test-pants-coursier
or pants repo?
w

witty-crayon-22786

01/08/2019, 6:54 PM
in
test-pants-coursier
w

wide-energy-11069

01/08/2019, 6:57 PM
makes sense
w

witty-crayon-22786

01/08/2019, 6:57 PM
would point to an inconsistency in the
self.invalidated
block
b

brief-engineer-67497

01/08/2019, 7:00 PM
first_run.txt
second_run.txt
w

witty-crayon-22786

01/08/2019, 7:01 PM
sorry, please post those to the ticket... i don't think Yi is planning to look at this right now, so i shouldn't have started the conversation here
b

brief-engineer-67497

01/08/2019, 7:02 PM
it's just that copy pasting this seem a bit excessive
I'll do a gist
w

witty-crayon-22786

01/08/2019, 7:02 PM
it will let you attach
.txt
files, i believe
b

brief-engineer-67497

01/08/2019, 7:14 PM
sorry did not found how, I created a gist
I posted it in the issue
3 Views