Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 13:15
    alexarchambault opened #1926
  • 12:51
    alexarchambault commented #1815
  • 12:50
    alexarchambault commented #1815
  • 09:55
    scheleaap commented #1815
  • 09:54
    scheleaap commented #1815
  • Nov 27 11:57
    ksonj opened #1925
  • Nov 25 08:03
    ckipp01 opened #1924
  • Nov 24 23:35
    dependabot[bot] labeled #1923
  • Nov 24 23:35
    dependabot[bot] opened #1923
  • Nov 24 23:35

    dependabot[bot] on npm_and_yarn

    Bump highlight.js from 9.15.6 t… (compare)

  • Nov 23 16:13
    lefou commented #1390
  • Nov 23 10:23

    alexarchambault on gh-pages

    Update website (compare)

  • Nov 23 09:46

    alexarchambault on master

    remove Stream (#1921) `Iterabl… (compare)

  • Nov 23 09:46
    alexarchambault closed #1921
  • Nov 23 07:04
    platypii edited #1922
  • Nov 23 07:03
    platypii edited #1922
  • Nov 23 07:02
    platypii edited #1922
  • Nov 23 06:54
    platypii edited #1922
  • Nov 23 06:49
    platypii edited #1922
  • Nov 23 06:26
    platypii opened #1922
王翔(Shawn Wang)
I have a proxy
how can i pass proxy configurations to coursier cli?
by setting a system variable
Jack Koenig
In the CLI, is there anyway to make the downloading log (eg. Downloading https://repo1.maven.org/maven2/org/...) go to stdout instead of stderr?
2 replies
Anton Sviridov
do you have access to shell's redirection?
Jack Koenig
Yes, redirecting all of stderr to stdout isn't what I want in case there are real errors
Is it possible to install specific version of application? Something like coursier install bloop --version 1.4.1
1 reply
Julien Richard-Foy

I’m having an issue with checksum computation. When I try to load a project by running sbt, I get the following output:

[error] java.lang.NumberFormatException: For input string: "vars"
[error]         at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
[error]         at java.base/java.lang.Integer.parseInt(Integer.java:652)
[error]         at java.base/java.math.BigInteger.<init>(BigInteger.java:534)
[error]         at lmcoursier.internal.shaded.coursier.cache.CacheChecksum$$anonfun$findChecksum$1.applyOrElse(CacheChecksum.scala:22)
[error]         at lmcoursier.internal.shaded.coursier.cache.CacheChecksum$$anonfun$findChecksum$1.applyOrElse(CacheChecksum.scala:20)
[error]         at scala.collection.TraversableOnce.collectFirst(TraversableOnce.scala:172)
[error]         at scala.collection.TraversableOnce.collectFirst$(TraversableOnce.scala:159)
[error]         at scala.collection.AbstractTraversable.collectFirst(Traversable.scala:108)
[error]         at lmcoursier.internal.shaded.coursier.cache.CacheChecksum$.findChecksum(CacheChecksum.scala:20)
[error]         at lmcoursier.internal.shaded.coursier.cache.CacheChecksum$.$anonfun$parseChecksumAlternative$2(CacheChecksum.scala:31)
[error]         at scala.Option.orElse(Option.scala:447)
[error]         at lmcoursier.internal.shaded.coursier.cache.CacheChecksum$.parseChecksumAlternative(CacheChecksum.scala:30)
[error]         at lmcoursier.internal.shaded.coursier.cache.CacheChecksum$.$anonfun$parseRawChecksum$1(CacheChecksum.scala:58)
[error]         at scala.Option.orElse(Option.scala:447)
[error]         at lmcoursier.internal.shaded.coursier.cache.CacheChecksum$.parseRawChecksum(CacheChecksum.scala:58)
[error]         at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$validateChecksum$4(FileCache.scala:678)
[error]         at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error]         at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error]         at scala.util.Success.map(Try.scala:213)
[error]         at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error]         at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error]         at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error]         at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) java.lang.NumberFormatException: For input string: "vars"
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

I’m not sure where to look at.

1 reply
Vladyslav Pekker
The zsh completions section seems to be out of date https://get-coursier.io/docs/cli-installation.html#zsh-completions Are completions no longer supported? What's the recommended way to set them up?
1 reply
Matt Hughes
How is the sbt installed by Coursier (for 1.4) different than that provided by SBT website? The Coursier one doesn’t seem to accept flags. I used to be able to write sbt -help but that doesn’t work in the version provided by coursier.
1 reply
Corey O'Connor
Is there an option to set jvm options for the launcher created by install?
2 replies
Poorva Gokhale
Hey all, I want to use cs install for my application. Is there any way to pass java options to cs installed application? . I see java options support is there for cs launch https://get-coursier.io/docs/next/cli-launch.html#java-options. But I did not see any documentation for providing java options after cs install
Poorva Gokhale
Dale Wijnand
e.g. ./amm -J-Dfoo=bar
TATSUNO Yasuhiro
Is there any way to read last modified date time of artifact ?
4 replies
TATSUNO Yasuhiro
I would like to check how many days passed since last release for each artifacts
Octav Zaharia
hi, I have this on Linux,
Encountered 1 error(s) in dependency resolution:
[error]     com.google.http-client:google-http-client-gson::
[error]         not found:
[error]             /home/xxx/.ivy2/local/com.google.http-client/google-http-client-gson/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/com/google/http-client/google-http-client-gson//google-http-client-gson-.pom
2 replies
it seems to work fine on other machines linux/windows
it tries to load the dependency w/o the version ^^ how can I debug this
João Ferreira
Hi @alexarchambault . Maybe there was a problem publishing releasing 2.0.2 of https://github.com/coursier/sbt-coursier/releases? I dont see 2.0.2 in https://repo1.maven.org/maven2/io/get-coursier/lm-coursier-shaded_2.12/
8 replies
Poorva Gokhale

We are trying cs launch and cs install for our application. We have followed steps below:

  1. Sbt my-app/publishLocal
  2. Cs channel —add ‘<channel-url>’
  3. Cs launch my-app:0.1.0-SNAPSHOT
    Works as expected. cs launch resolves in ivy local as well as repositories specified in channel.

When we try to install launcher for snapshot version using,
Cs install my-app:0.1.0-SNAPSHOT it gives resolution error. It tries to resolve only in repositories specified in channel and not in default repositories like ivy. We also tried giving ivy2Local as an option to install command. Cs install -r ivy2Local my-app:0.1.0-SNAPSHOT also gives similar error.

We want to validate if this is as per intended usage of cs install? If not, what is possible way to install snapshot version of app?

6 replies
Kamil Kloch
Hello all, does coursier-cli have bash completions? Documentation mentions only zsh. Thanks!
2 replies

(from https://gitter.im/lihaoyi/mill; do you want me to raise something official re. this? response was that this is a bug w/ coursier install of mill 0.8.0...)

have been struggling a lot with this error recently using mill 0.8.0 (installed by coursier):

$ mill foo.run
[28/36] foo.finalMainClass
1 targets failed
foo.finalMainClass No main class specified or found

on pretty much every mill project i create or try to convert from sbt (in two environs, macOS and Debian).

simplest example, where mill.compile and mill.test are fine, is:

import mill._, scalalib._

object foo extends ScalaModule {
  def scalaVersion = "2.13.1"

  object test extends Tests {
    def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.4")
    def testFrameworks = Seq("utest.runner.Framework")
package foo

object Example {
  def main(args: Array[String]): Unit = {
  def hello(): String = "Hello World"
package foo

import utest._

object ExampleTests extends TestSuite {
  def tests = Tests {
    test("hello") {
      val result = Example.hello()
      assert(result == "Hello World")
7 replies
Rob Norris
Is it possible to specify a JRE when using a coursier launcher? For example can I do sbt --something to run coursier-installed sbt with a named JRE?
$ cs launch --help | grep jvm
  --jvm  <string?>
  --jvm-dir  <string?>
  --system-jvm  <bool?>
  --jvm-index  <string?>
@tpolecat also see cs java-home --help
idk anything more than that. I assume sbt installed by cs is equivalent to cs launch sbt
Rob Norris
$ sbt --jvm 8 console
[info] Loading global plugins from /Users/rnorris/.sbt/1.0/plugins
[info] Loading settings for project atto-build-build-build-build from metals.sbt ...
[info] Loading project definition ...
[error] Expected ';'
[error] --jvm
[error]      ^
I was hoping for something like that.
@tpolecat I mean try cs launch --jvm 8 sbt console
The cs-installed sbt doesn't seem to even have a --help screen like the usual launcher script
Rob Norris
Ok i didn't know you could do cs launch <app>. That works, thanks.
Oh I see, it looks at the default channel, not at the installed apps.
Alexandre Archambault
It should look at the channels added with cs install --add-channel, and also accepts new ones via --channel.
I'd like to have the installed launchers accept a --jvm channel option, but they don't for know.
Omar Aloraini
Hi y'all, does anyone have experience in working in an offline environment, I'm thinking of copying my local cache to the offline server and use ammonite imports, not sure if coursier can resolve dependinces using the cache only
6 replies
Chris Kipp
I know with cs install you can use the prebuild application descriptor, but is there something similiar for bootstrap?
3 replies
I'd like to use cs bootstrap to install sbtn, but a specified version of it, not latest
Tapio Reisinger
Hello, I am a beginner with Scala and I would like to use cs setup to install the Scala dev environment. But how can I specify, that it should use Scala 3.0.0-M1 ? I have read through the documentation and I can specify the java version which should be used, but haven't found any option for the scala version. Thanks for help.
Tomasz Godzik
@treisinger not 100% sure, but I think cs setup only installs the CLI tools. The actual Scala version can be setup within the build definition. For Scala 3.0.0-M1 you can use https://github.com/lampepfl/dotty-example-project or setup a new project using g8 application
I will check the exact command
you should be able to do sbt new lampepfl/dotty
Jack Koenig
Is there a maven or ivy or other standard for an unversioned SNAPSHOT? Like instead of 2.0-SNAPSHOT just SNAPSHOT as version?
Tapio Reisinger
@tgodzik Ok, thank you.
Justin Kaeser
how do I resolve an sbt plugin via coursier command line?
1 reply
Chris Kipp
Is there a way to only get direct dependencies of a dep? Basically I'm trying to use Resolve() to only get a list of direct dependencies. I saw that Dependency does have a transitive field, but it always seems to be set to true for every dependency after a Resolve. Is there an easy way with Resolve to only target direct dependencies?
Chris Kipp
actually, it looks like I can do Resolve().addDependencies(dep).run().dependenciesOf(dep) which gets me the desired deps