hi, I have a little problem. If I compile twice th...
# general
b
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
what commands should i run to reproduce?
b
./pants compile test-app/src/main/scala
run it twice
do you reproduce it ? should I open an issue ?
a
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
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
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
"cool" ! thank you for looking into it. I'll open the issue tomorrow when I arrive at work.
a
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
I dont repro. what’s the error?
a
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
w
@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
in the
test-pants-coursier
or pants repo?
w
in
test-pants-coursier
w
makes sense
w
would point to an inconsistency in the
self.invalidated
block
b
first_run.txt
second_run.txt
w
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
it's just that copy pasting this seem a bit excessive
I'll do a gist
w
it will let you attach
.txt
files, i believe
b
sorry did not found how, I created a gist
I posted it in the issue