Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 01 12:11
    lefou commented #1815
  • Jul 01 10:07
    ollyw commented #1815
  • Jul 01 10:02
    lefou commented #1815
  • Jul 01 09:31
    ollyw commented #1815
  • Jul 01 09:27
    ollyw commented #1815
  • Jul 01 08:58
    lefou commented #1815
  • Jul 01 08:45
    ollyw commented #1815
  • Jun 30 18:16
    lefou commented #1815
  • Jun 30 18:05
    lefou commented #1815
  • Jun 30 17:00
    ollyw commented #1815
  • Jun 29 22:45
    lefou commented #1815
  • Jun 29 22:44
    lefou commented #1815
  • Jun 29 21:18
    ollyw commented #1815
  • Jun 27 08:48
    sideeffffect edited #2057
  • Jun 27 08:39
    sideeffffect edited #2057
  • Jun 24 21:57
    mtk opened #2452
  • Jun 24 00:13
    quelgar commented #2450
  • Jun 22 13:55
    bishabosha commented #2451
  • Jun 22 13:23
    bishabosha commented #2451
  • Jun 22 13:22
    bishabosha commented #2451
Martijn
@martijnhoekstra:matrix.org
[m]
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?

Tobias Roeser
@lefou

Hi, in mill we got the following issue opened lihaoyi/mill#1099:

Actually, Mill seems to pull dependencies by directly building an URL to the supposed pom. However, this method doesn't work on some repositories like for Spigot dependencies.

Mill should first pull the first maven-metadata.xml (example) at <repoUrl>/<group separated by />/<artifactId>/maven-metadata.xml to retrieve the version's metadata file (example) and get the jar name from it.

Does coursier support maven-metatdata.xml?

I opened a new discussion for that: #1945
Max
@maxstreese

Hi everyone, I got a strange resolution question. Consider the code below:

val module = mod"com.streese.registravka4s::registravka4s-core"
// val module = mod"com.sksamuel.avro4s::avro4s-core"

val res = Resolve()
  .addDependencies(Dependency(module, "latest.release"))
  .addRepositories(MavenRepository("https://packages.confluent.io/maven/"))
  .run()

When I run this for the module that is not commented out (registravka4s) I get the following error:

[error] (run-main-6) coursier.error.ResolutionError$CantDownloadModule: Error downloading com.streese.registravka4s:registravka4s-core_2.13:latest.release
[error]   No latest release version found in file:/home/max/.ivy2/local/com.streese.registravka4s/registravka4s-core_2.13/
[error]   not found: https://repo1.maven.org/maven2/com/streese/registravka4s/registravka4s-core_2.13/maven-metadata.xml
[error]   not found: https://packages.confluent.io/maven/com/streese/registravka4s/registravka4s-core_2.13/maven-metadata.xml
[error] coursier.error.ResolutionError$CantDownloadModule: Error downloading com.streese.registravka4s:registravka4s-core_2.13:latest.release
[error]   No latest release version found in file:/home/max/.ivy2/local/com.streese.registravka4s/registravka4s-core_2.13/
[error]   not found: https://repo1.maven.org/maven2/com/streese/registravka4s/registravka4s-core_2.13/maven-metadata.xml
[error]   not found: https://packages.confluent.io/maven/com/streese/registravka4s/registravka4s-core_2.13/maven-metadata.xml
[error]         at coursier.Resolve$.$anonfun$validate$1(Resolve.scala:323)
[error]         at scala.collection.immutable.List.map(List.scala:246)
[error]         at scala.collection.immutable.List.map(List.scala:79)
[error]         at coursier.Resolve$.validate(Resolve.scala:321)
[error]         at coursier.Resolve.validate0$1(Resolve.scala:115)
[error]         at coursier.Resolve.$anonfun$ioWithConflicts0$4(Resolve.scala:161)
[error]         at coursier.util.Task$.$anonfun$flatMap$extension$1(Task.scala:14)
[error]         at coursier.util.Task$.$anonfun$flatMap$extension$1$adapted(Task.scala:14)
[error]         at coursier.util.Task$.wrap(Task.scala:84)
[error]         at coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
[error]         at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[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)

However when I run the code with the other module (avro4s) then everything works as expected.

What I cannot wrap my head around is the error description which states that the file https://repo1.maven.org/maven2/com/streese/registravka4s/registravka4s-core_2.13/maven-metadata.xml does not exist but it actually does. And what is more is it looks equivalent to https://repo1.maven.org/maven2/com/sksamuel/avro4s/avro4s-core_2.13/maven-metadata.xml, as does the whole directory structure. So I do not get how registravka4s is different from avro4s here in such a way that for one the code fails and for the other it does not.

3 replies
Nishant Vishwakarma
@nishantv12

I am getting this error when trying to do sbt compile on a project

 coursier.ResolutionException: Exception during resolution
[error] Caused by: java.io.FileNotFoundException: <path to artifactory>/artifactory/typesafe-ivy-releases/org.junit.vintage/junit-vintage-engine/5.7.0/ivys/ivy.xml.sha1.lock (No such file or directory)

I am using sbt 1.3.13. I have checked and the dependency is present in the remote artifactory. The repostories configuration is proper. I am confused because I don't see an attempt to try to resolve this from the remote repository as it is not present in cache. What am I missing?

Anton Sviridov
@keynmol

If I get

Exception in thread "main" coursier.cache.ArtifactError$DownloadError: download error: Caught java.net.MalformedURLException: unknown protocol: zip+https (unknown protocol: zip+https) while downloading zip+https://github.com/sbt/sbt/releases/download/v1.4.6/sbt-1.4.6.zip!sbt/bin/sbtn-x86_64-pc-linux

when running coursier install sbtn - where should I look for issues? old coursier version? jdk issue?

Chris Kipp
@ckipp:matrix.org
[m]
Anyone have any idea if this is supposed to work coursier/coursier#1700 I just hit on this again and forgot I created an issue for it long ago
Boris Steiner
@bs76
Hi all, when I try to symlink ~/.local/share/coursier/bin/cs to ~/bin/cs then running ~/bin/cs fails to run. The path of .cs.aux is being 'resolved' via dirname which resolves the dirname of the symlink, not to the actual cs under ~/.local;
looking at ~/.local/.../cs adding readlink $(dirname $(readlink -f "$0")) solves this issue
Chris Kipp
@ckipp:matrix.org
[m]
Is --progress supposed to completely hide any progress at all?
Like should I be seeing this with progress set to false?
Lorenzo Gabriele
@lolgab
Hi everyone :-)
Does coursier need special treatment to update GraalVM to 21.0.0 ? If so, is it tracked somewhere?
Shane Delmore
@ShaneDelmore
I have a question I wasn't able to answer reading the docs, how do I set the scala version for zinc? For example, when I try to download zinc, it tells me it ca't find a scala version suffix for zinc, but I have entered it right here cs fetch org.scala-sbt::zinc_2.12:1.4.4 Exception in thread "main" coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scala-sbt::zinc_2.12:1.4.4
Shane Delmore
@ShaneDelmore
Although cs complete can find it ❯ cs complete org.scala-sbt:zinc_2.12 zinc_2.12
Tobias Roeser
@lefou
@ShaneDelmore Either add the _2.12 OR the double colon :: between org and name, but not both.
Shane Delmore
@ShaneDelmore
Thanks @lefou, I never would have figured that out on my own.
And if I use ::, is there a way to set scala version, or does it just always use 2.13?
That's just a question out of curiousity, the single colon worked great.
Tobias Roeser
@lefou
Can't tell you where the default comes from. I guess, it's the scala version used by ammonite, so atm 2.13.x
Sorry, I was asuming your using ammonite, but actually I don't know the context, so I can't tell you
Shane Delmore
@ShaneDelmore
No ammonite, just cs fetch org.scala-sbt::zinc_2.12:1.4.4
Or, in this case, when doing cs fetch org.scala-sbt::zinc:1.4.4 how does it decide which scala version?
No worries if you don't know.
Siddhant Sanyam
@siddhant3s
COURSIER_REPOSITORIES="https://mycompany.com/nexus/content/groups/public" COURSIER_CACHE=/tmp/yo/ coursier fetch scalafmt

Exception in thread "main" coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::scalafmt-cli:latest.release (likely a non existing module or version)
I'm getting this exception when I'm trying coursier fetch with a private repository. Anyone has any idea what might be going on?
Eric K Richardson
@ekrich
The interface for Scala Native has changed a bit in 0.4.0 although the old interface still works but is deprecated. I didn't see any issues or PRs - is this update being considered?
Siddhant Sanyam
@siddhant3s
I guess I'm not understanding coursier's repo resolution at all:
I've set my mirrors.properties to point central.to correctly my local maven proxy. On top of that, I'm passing -r https://maven.company.com/nexus/content/groups/public --no-default to coursier. Even then... it's trying to connect to repo1.maven.org. I don't understand why.
Ondra Pelech
@sideeffffect
Hello, when using coursier/cache-action, we're seeing warnings like reserveCache failed. Is it OK? Or is something going wrong? /cc @mijicd
coursier/cache-action#102
Oliver
@xthemage:synapse.xthemage.net
[m]
Hi folks. First off, fantastic tool. Coursier bootstrap is amazing! I've been noticing that recent versions of coursier have been embedding the primary jar file in the bootstrap binary. Is there a way to disable this feature?
1 reply
(or perhaps am I using it wrong?)
Specifically, I have a little bit of a hack that relies on python's ability to execute a tar file to package python code with my jar, and recently I've noticed that bootstrap binaries are seeing the classloader reading from path/to/bootstrap!coursier/bootstrap/launcher/jars/___.jar instead of the typical file:/path/to/__main__.py or jar:/path/to/___.jar
Oliver
@xthemage:synapse.xthemage.net
[m]
Hmm... is coursier automatically packaging files that aren't visible to a global resolver? If so, is there a command-line flag that will turn this behavior into an error?
ekrich
@ekrich:matrix.org
[m]
I have been trying to get the Scala tool set to work behind a corp proxy with basic auth. The following meta issue was added - scalameta/metals#2485 I did some analysis starting at the very beginning.