I try to use the version 1.1.0-M8 (from <https://...
# general
f
I try to use the version 1.1.0-M8 (from https://oss.sonatype.org/content/repositories/releases/io/get-coursier/coursier-cli_2.12/1.1.0-M8/coursier-cli_2.12-1.1.0-M8-standalone.jar) of coursier instead of the default one (1.0) but I get some
ClassNotFoundException: coursier.cli.Coursier
. A diff between the 2 jar I have show me that they are pretty different in their structure, can you give me an hint from where come the one in the dropbox ?
a
i believe we have a slightly different version of coursier on the dropbox (built with the pants BUILD files in the coursier repo i think?) @wide-energy-11069 would know the specific difference
b
Copy code
# 3rdparty/jvm/io/get-coursier/BUILD

jar_library(name='coursier-dep',
  jars=[
    jar(org='io.get-coursier', name='coursier-cli_2.12', rev='1.1.0-M8'),
  ],
)

jvm_binary(
    name='coursier-bin',
    main='coursier.cli.Coursier',
    dependencies=[
        ':coursier-dep',
    ])

jvm_app(
    name='coursier',
    binary=':coursier-bin',
)
./pants bundle 3rdparty/jvm/io/get-coursier:coursier
👖 1
☝️ 1
a
just for future reference @brief-engineer-67497 you can use
scala_jar(org='io.get-coursier', name='coursier-cli', rev='1.1.0-M8')
which avoids the
_2.12
(it uses the scala version you're using)
i can't believe this isn't on the docsite lol
(making a PR)
b
thx @aloof-angle-91616 for the tip, but in this precise case I did not want it to be bind to my scala version
just in case
w
we need to vet the newer versions internally before actually bumping it
@famous-holiday-38439 afaict the standalone jar, can you verify it has
Copy code
$ unzip -l coursier-cli_2.12-1.1.0-M8-standalone.jar | grep Coursier
warning [coursier-cli_2.12-1.1.0-M8-standalone.jar]:  55 extra bytes at beginning or within zipfile
  (attempting to process anyway)
      209  10-24-2018 10:28   coursier/cli/Coursier.class
The standalone one is proguarded, so the classnames are gibberish. How are you using it?
b
we used it as the value for
bootstrap_jar_url
that's the reason why we created a fat jar and uploaded it somewhere. However not using an "official" link was really disapproved by our ops. After some digging the problem comes from nailgun so
Copy code
[resolve.coursier]
execution_strategy=subprocess
let us use
<https://oss.sonatype.org/content/repositories/releases/io/get-coursier/coursier-cli_2.12/1.1.0-M8/coursier-cli_2.12-1.1.0-M8-standalone.jar>
i haven’t tried
coursier-cli_2.12-1.1.0-M8-standalone.jar
yet, but will do in a bit
b
thx ^_^
actually the coursier sonatype address is also "official" enough
😛
w
ok. so are you unblocked?
b
we are ! thank you
I just added the info to let you know about the
execution_strategy=subprocess
trick
w
are you saying
coursier-cli_2.12-1.1.0-M8-standalone.jar
works with subprocess but fails with nailgun?
b
well, messes the jar as far nailgun is concerned
indeed
w
thanks for the pointer, maybe we can remove that line upstream
b
you're welcome !
w
although you might not want to set
execution_strategy=subprocess
globally for perf reasons
b
yeah, I figured. but what I'm not sure is
Copy code
[resolve.coursier]
execution_strategy=subprocess
will impact only coursier bootstrap or every coursier resolution ?
w
coursier invocation
there’s no bootstrap for coursier per se. it’s just downloading the jar via pants
b
ok, anyway still faster than ivy and the real deal is compilation & test so we will be ok ^_^
thk you very much !
a
i also made https://github.com/pantsbuild/pants/pull/6857 for
scala_jar()
-- thanks for clarifying @brief-engineer-67497 that was not your situation though, that was a hasty assumption on my part (i have actually just done the same thing this morning for a jvm tool)
b
No problem! Thank you for the spontaneous tip ^_^
f
Thank you for all these tips
b
@wide-energy-11069 so, actually the
execution-strategy=subprocess
seems to be ignored by the intellij plugin because the problem reappear when refreshing the project (or on initial loading)