Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 23 17:22
    alexarchambault synchronize #2541
  • Sep 23 16:51
    alexarchambault synchronize #2541
  • Sep 23 16:42
    alexarchambault synchronize #2541
  • Sep 23 16:36
    alexarchambault synchronize #2541
  • Sep 23 16:20
    alexarchambault synchronize #2541
  • Sep 22 19:16
    LaurenceWarne commented #2538
  • Sep 22 19:12
    LaurenceWarne synchronize #2538
  • Sep 22 12:02
    alexarchambault synchronize #2541
  • Sep 22 11:50
    alexarchambault synchronize #2541
  • Sep 22 11:33
    alexarchambault synchronize #2541
  • Sep 22 09:28
    alexarchambault synchronize #2541
  • Sep 22 09:22
    alexarchambault synchronize #2541
  • Sep 22 09:17
    alexarchambault synchronize #2541
  • Sep 21 17:21
    alexarchambault synchronize #2541
  • Sep 21 17:11
    LaurenceWarne commented #2538
  • Sep 21 16:58

    alexarchambault on gh-pages

    Update website (compare)

  • Sep 21 16:46
    alexarchambault synchronize #2541
  • Sep 21 16:41
    alexarchambault synchronize #2541
  • Sep 21 16:31
    alexarchambault synchronize #2541
  • Sep 21 16:25
    alexarchambault synchronize #2541
Hanns Holger Rutz
@Sciss
hmm, no that's Resolve vs Resolution. Is there no way I can pass a Resolution onto Fetch without resolving a second time?
Hanns Holger Rutz
@Sciss
and passing fetchCacheOpt doesn't seem to have any effect
Hanns Holger Rutz
@Sciss
how do I attach a custom progress monitor? e.g. I want to render a progress bar in a window showing the overall fetch progress
2 replies
Hanns Holger Rutz
@Sciss

and can I shorten the download locations to skip the repository? Like instead of

/home/hhrutz/.local/share/mellite/coursier/https/repo1.maven.org/maven2/de/sciss/lucre-geom_2.13/3.17.7/lucre-geom_2.13-3.17.7.jar

have

/home/hhrutz/.local/share/mellite/coursier/de/sciss/lucre-geom_2.13/3.17.7/lucre-geom_2.13-3.17.7.jar

?

2 replies
Hanns Holger Rutz
@Sciss
ok, I guess progress goes through withLogger
Hanns Holger Rutz
@Sciss
if I resolve latest.release, how can I determine the version actually found? Like res.rootDependencies.head.version still returns just latest.release?
1 reply
Conny Brunnkvist
@cbrunnkvist
I'm playing with cs setup - can someone explain the reason why we first download cs while the default "apps" also contains / downloads coursier and/or cs executables one more time?
Anton Sviridov
@keynmol
it's probably to treat coursier as yet another app, so that it can be updated using coursier i.e. cs update cs :)
Conny Brunnkvist
@cbrunnkvist
  Installed cs
  Installed coursier
like, yeah thanks but
There seems to be no difference, functionality-wise, between the "jar" and "native" versions I can download directly from the GH Releases page, and the ones installed by "setup"
but the sizes of the jar differ a little bit 🤔
same version reported. Strange.
Conny Brunnkvist
@cbrunnkvist
I assume the "double-download" is due to a conflation of the "update" and "install" ... but on the other hand, it prints "Checking if the standard Scala applications are installed" so uh, it should consider itself installed when e.g. cs is already in the COURSIER_BIN_DIR
Mitesh Patel
@MasterDDT
Hi, does anybody know if 2.x is backward compatible with 1.1.0? Specifically when used by pantsbuild 1.27 (it calls the command line like java -jar <coursier jar> fetch junit:junit:4.12)
1 reply
kurgansoft
@kurgansoft
Is it possible to query the latest version of an artifact with coursier?
Let's say I'm using monocle in my project, so I have it as a dependency:
com.github.julien-truffaut::monocle-core::2.0.3
Now I want to check if there is a new version of it available, but I don't want to check it manually.
Can coursier help me with that?
2 replies
Chris Kipp
@ckipp:matrix.org
[m]
I'm assuming the answer is no, but is there a way to setup an application descriptor that defaults to latest.stable but with a flag or something will pull in the latest snapshot?
basically so a user could just do the cs install metals if they want the latest stable and then cs install metals --snapshot or something of that nature for the latest nightly
3 replies
Chris Kipp
@ckipp:matrix.org
[m]
ah thanks @alexarchambault . So playing around with it and adding in sonatype:snapshots to the descriptor and then attempting to get the snapshot still doesn't work as expected. When targeting metals:latest.release it still gives me the latest stable
❯ cs launch --default-channels=false --channel ./apps/resources metals:latest.release -- -version
metals 0.9.8

# Note:
#   supported Scala versions: 0.27.0-RC1, 2.11.12, 2.12.10, 2.12.11, 2.12.12, 2.12.8, 2.12.9, 2.13.0, 2.13.1, 2.13.2, 2.13.3, 2.13.4, 3.0.0-M1, 3.0.0-M2, 3.0.0-M3
And then trying to for example target a snapshot directly gives me the following
❯ cs launch --default-channels=false --channel ./apps/resources metals:0.9.8+4-5d512f11-SNAPSHOT -- -version
Exception in thread "main" coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::metals:0.9.8+4-5d512f11-SNAPSHOT (likely a non existing module or version)
        at coursier.install.AppDescriptor.$anonfun$processDependencies$9(AppDescriptor.scala:184)
        at scala.Option.toRight(Option.scala:485)
        at coursier.install.AppDescriptor.processDependencies(AppDescriptor.scala:184)
        at coursier.cli.resolve.Resolve$.$anonfun$depsAndReposOrError$4(Resolve.scala:91)
        at scala.util.Either.flatMap(Either.scala:341)
        at coursier.cli.resolve.Resolve$.$anonfun$depsAndReposOrError$2(Resolve.scala:62)
        at scala.util.Either.flatMap(Either.scala:341)
        at coursier.cli.resolve.Resolve$.depsAndReposOrError(Resolve.scala:62)
        at coursier.cli.resolve.Resolve$.task(Resolve.scala:249)
        at coursier.cli.fetch.Fetch$.task(Fetch.scala:27)
        at coursier.cli.launch.Launch$.task(Launch.scala:453)
        at coursier.cli.launch.Launch$.run(Launch.scala:514)
        at coursier.cli.Coursier$.$anonfun$runA$2(Coursier.scala:157)
        at coursier.cli.Coursier$.$anonfun$runA$2$adapted(Coursier.scala:139)
        at coursier.cli.CommandAppPreA.run(CommandAppPreA.scala:22)
        at caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$5(CommandAppWithPreCommand.scala:99)
        at caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$5$adapted(CommandAppWithPreCommand.scala:99)
        at scala.util.Either.fold(Either.scala:191)
        at caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$3(CommandAppWithPreCommand.scala:99)
        at caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$3$adapted(CommandAppWithPreCommand.scala:85)
        at scala.Option.foreach(Option.scala:407)
        at caseapp.core.app.CommandAppWithPreCommand.main(CommandAppWithPreCommand.scala:85)
        at coursier.cli.Coursier$.main(Coursier.scala:104)
        at coursier.cli.Coursier.main(Coursier.scala)
Martijn
@martijnhoekstra:matrix.org
[m]
can I use the coursier launcher to launch a specific version of scalac?
4 replies
or the scala REPL for that matter?
I can't find it in the doc among the CLI options. Maybe I'm looking in the wrong place
Anton Sviridov
@keynmol
Moving out of the thread - the magical incantation for bootstrapping 3.0.0-M3 locally for compilation woes seems to be:
✗ cs bootstrap org.scala-lang:scala3-compiler_3.0.0-M3:3.0.0-M3 -D scala.usejavacp=true -M dotty.tools.dotc.Main -o scala_3.0.0-M3

✗./scala_3.0.0-M3 test.worksheet.sc 
-- [E007] Type Mismatch Error: test.worksheet.sc:28:14 -------------------------
28 |    forall { (bla: Int) =>
   |              ^
   |              Found:    Int => Expectations
   |              Required: Nothing => ListSuite.Prop
29 |      new Expectations {}
1 error found
Eitan Adler
@grimreaper
using the command line is it possible to resolve "latest" instead of a specific version?
Chris Kipp
@ckipp:matrix.org
[m]
yes, for example you can do the following:
cs resolve com.lihaoyi::ujson:latest.stable
com.lihaoyi:geny_2.13:0.6.2:default
com.lihaoyi:ujson_2.13:1.2.2:default
com.lihaoyi:upickle-core_2.13:1.2.2:default
org.scala-lang:scala-library:2.13.1:default
org.scala-lang.modules:scala-collection-compat_2.13:2.1.4:default
Eitan Adler
@grimreaper
@ckipp:matrix.org thanks! I could not find that anywhere in the documentation. how might i have discovered this?
Sammi
@sammi
When I run cs resolve com.google.protobuf::protobuf-java:3.0.0
it complians Can't find a scala version suffix for com.google.protobuf::protobuf-java:3.0.0 (likely a non existing module or version)
what I'm missing here?
Martijn
@martijnhoekstra:matrix.org
[m]
I think :: means it's a scala dependency, but the dependency is a java dependency instead
Does it work with : instead of ::?
Sammi
@sammi

No, not working with : ```cs resolve com.google.protobuf:protobuf-java:3.0.0
Ignoring environment variable COURSIER_REPOSITORIES, error parsing repositories from it:
Error parsing URL "https://repo1.maven.org/maven2/" (no protocol: "https://repo1.maven.org/maven2/")

https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.0.0/protobuf-java-3.0.0.pom
100.0% [##########] 4.0 KiB (16.9 KiB / s)
com.google.protobuf:protobuf-java:3.0.0:default```

I tried to set maven central by COURSIER_REPOSITORIES
Sammi
@sammi
Alright, after I removed my wrong env variable set, it works now.
coursier resolve com.google.protobuf:protobuf-java:3.0.0
https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.0.0/protobuf-java-3.0.0.pom
  100.0% [##########] 4.0 KiB (10.1 KiB / s)
https://repo1.maven.org/maven2/com/google/protobuf/protobuf-parent/3.0.0/protobuf-parent-3.0.0.pom
  100.0% [##########] 6.7 KiB (142.2 KiB / s)
https://repo1.maven.org/maven2/com/google/google/1/google-1.pom
  100.0% [##########] 1.5 KiB (49.0 KiB / s)
com.google.protobuf:protobuf-java:3.0.0:default
Martijn
@martijnhoekstra:matrix.org
[m]
Glad to hear!
Damian Reeves
@DamianReeves
Hi I am trying to use coursier to connect to an internal artifactory instance, I’m trying to use the repository mirror instructions along with credentials instructions, but I’m getting a 401 from coursier… the credentials work when I use direct HTTP access
Chris Kipp
@ckipp:matrix.org
[m]
Just in case you're hitting on this coursier/coursier#1826 I've had issues getting COURSIER_CREDENTIALS to work, but they do work if you pas them directly to the command that you're using
Damian Reeves
@DamianReeves
@ckipp:matrix.org Thanks for responding but even that doesn’t work. I’ve gone as far as even putting the username and password in the mirror.properties file as part of the URL and I still get a 401.
If I do a HTTP GET myself, it works
Damian Reeves
@DamianReeves
Is there anyway to trace what coursier is doing when it does its HTTP gets?
Dmitry Voronov
@dmitry-worker
Hello everyone! I have a dumbest question but I'm not much into the plugin itself.
Consider that I have another plugin which is built on sbt-coursier 1.0.3.
The plugin requires Scala 2.11 or 2.12 IIRC
Can I build against Scala 2.13 with it?
Martijn
@martijnhoekstra:matrix.org
[m]
Sbt plugins for sbt 1.x always need to be built against 2.12.x
Dmitry Voronov
@dmitry-worker
@martijnhoekstra:matrix.org sorry, does it mean that I can't build a project on scala 2.13 with it?
Chris Kipp
@ckipp:matrix.org
[m]
no, it just means plugins themselves are built with 2.12. If you are using sbt-coursier you should be able to build a Scala 2.13 project with no issues
however, as of sbt 1.3.x coursier is included in sbt itself, so in many cases sbt-coursier is no longer needed, and you can just use normal sbt
Dmitry Voronov
@dmitry-worker
@ckipp:matrix.org many thanks!
Chris Kipp
@ckipp:matrix.org
[m]
unless you are building an actual sbt plugin, then you'll need to stick with 2.12
anirgit
@anirgit

Hello guys, I have a question on coursier resolution exception that I can't figure out a way around. I am using sbt 1.3.13 with 1.0.3 coursier plugin (not using latest coursier due to sbt/sbt#5040). My default scalaVersion is 2.12, however I am trying to compile one subproject on 2.11 only which depends on a couple of other subprojects that are cross compatible for scala 2.11 and 2.12. So it looks like --
module A (scala 2.11 only) depends on module B (supports both 2.11 and 2.12) and module C (supports both 2.11 and 2.12).
When I try sbt +module A/test:compile, everything works fine.
But when I do sbt +test:compile, I get a dependency resolution exception as --

ObjectEvent(error, TraceEvent(Error, coursier.ResolutionException: Encountered 2 error(s) in dependency resolution:
    com.org:moduleB_2.11:0.1-SNAPSHOT:
        not found:
            /home/org/.ivy2/local/com.org/moduleB_2.11/0.1-SNAPSHOT/ivys/ivy.xml
            https://repo1.maven.org/maven2/com/org/moduleB_2.11/0.1-SNAPSHOT/moduleB_2.11-0.1-SNAPSHOT.pom

com.org:moduleC_2.11:0.1-SNAPSHOT:
        not found:
            /home/org/.ivy2/local/com.org/moduleC_2.11/0.1-SNAPSHOT/ivys/ivy.xml
            https://repo1.maven.org/maven2/com/org/moduleC_2.11/0.1-SNAPSHOT/moduleC_2.11-0.1-SNAPSHOT.pom

So I am a bit baffled here is there any difference in terms of coursier resolution when just the moduleA is compiled vs all subprojects get cross compiled. What am I supposed to interpret out of this?