by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 28 23:01

    alexarchambault on gh-pages

    Update website (compare)

  • May 28 22:27

    alexarchambault on master

    Update case-app to 2.0.0 (#1748) (compare)

  • May 28 22:27
    alexarchambault closed #1748
  • May 28 20:21
    scala-steward opened #1748
  • May 28 20:20
    scala-steward opened #1747
  • May 28 20:00
    olafurpg closed #1745
  • May 28 20:00
    olafurpg commented #1745
  • May 27 23:41
    alexarchambault commented #1745
  • May 27 22:27
    alexarchambault commented #1745
  • May 27 22:26
    alexarchambault commented #1745
  • May 27 18:33
    rhande-mdsol opened #1746
  • May 27 15:15
    olafurpg opened #1745
  • May 26 14:03
    callado4 commented #1739
  • May 26 13:38
    accu-knauthg closed #1744
  • May 26 13:38
    accu-knauthg commented #1744
  • May 26 13:31
    accu-knauthg opened #1744
  • May 26 13:03

    alexarchambault on gh-pages

    Update website (compare)

  • May 26 12:29

    alexarchambault on master

    Update jsoniter-scala-core, ...… (compare)

  • May 26 12:29
    alexarchambault closed #1721
  • May 25 18:28

    alexarchambault on gh-pages

    Update website (compare)

Jason Turim
@logicbomb
I'm trying to use gitlab's maven repository to host dependencies for my scala projects. Gitlab requires custom headers appended to the HTTP request. I've been banging my head against using the native sbt resolvers, and I'm wondering how I might be able to do that using Coursier? Does Coursier respect the maven settings xml file? I think I could do something with proxy servers, but it'd be nice to use the setRequestProperty method on the underlying java.net.HttpURLConnection, any ideas on how I might go about doing that?
Jason Turim
@logicbomb
@mjuanes :wave:
Eric Peters
@er1c
Did 1.1.0-M14-7 never get published to maven central?
Yun Lai
@lyonlai

is there a standalone coursier CLI jar that I can use for pants? I'm trying the CLI jar but it seems like it's missing something

Caused by: java.lang.NoClassDefFoundError: caseapp/core/RemainingArgs

I'm using this jar io/get-coursier/coursier-cli_2.12/2.0.0-RC6-12/coursier-cli_2.12-2.0.0-RC6-12.jar from maven central
N.S. Cutler
@godenji
Just migrated from Sbt 1.23 to 1.3.10; is Coursier included in Sbt now? If yes, in the past I depended on "sbt-coursier" in my global ~/.sbt. Not sure if the separate Coursier plugin is still required, or if you get Coursier's dependency management out-of-the-box with latest Sbt.
N.S. Cutler
@godenji

Well, it doesn't matter, either way dependency management seems to be broken with Sbt >= 1.3. Impossible to resolve publishLocal libs (or they're resolved, but Coursier is throwing an exception at some point in dep resolution process).

Pretty much instantly Coursier fails on update with: lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts. The artifact path is correct, except it's looking for artifact.jar instead of artifact_2.13.jar.

Chris
@ckipp01
I don't believe you need the plugin anymore if you're using sbt 1.3.x
N.S. Cutler
@godenji
Sure, Coursier is integrated into Sbt now, yes. Still doesn't change the fact that things are broken :)
If I revert to Sbt 1.2 + sbt-coursier 1.x everything works fine
Might have something to do with CrossProject support in a Scala/Scala.js app. Sbt bails out "upstream" in an Sbt project that dependsOn the root project where affected publishLocal library dependency is declared.
N.S. Cutler
@godenji
If the dependency weren't able to be resolved I'd expect that to happen right in the project where libraryDependencies are declared.
Probably a spurious error that's wreaking havoc due to -Xfatal-warnings
Joan Goyeau
@joan38
Hi,
What is difference between coursier.ivy.IvyRepository and coursierapi.IvyRepository?
Brian Maso
@bmaso
@joan38 +1 on that question. In the context of mill: Mill's current docs reference courier.ivy.IvyRepository, but the latest version seems to only want to use coursierapi.IvyRepository. Patchy and aging docs in both projects are pretty big speed-bumps to using either with non-trivial repo configuration. The project are both truly awesome, but there is frustration there...
Joan Goyeau
@joan38
The Mill. build definition is referring to courier.ivy.Repository but if you need to add a repo for your build definition Ammonite uses coursierapi.Repository, super confusing
Also coursierapi.Repository has the advantage of being able to specify things like https://myrepo.com/everything/[orgPath]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]
Whereas with courier.ivy.IvyRepository I had to do things like:
  Pattern(
    Seq(
      Var("orgPath"),
      "/",
      Var("module"),
      "/",
      Var("revision"),
      "/",
      Var("artifact"),
      "-",
      Var("revision"),
      Opt("-", Var("classifier")),
      ".",
      Var("ext")
    )
  )
Damian Reeves
@DamianReeves
Hi, I want to use coursier inside a walled garden to download packages and execute applications from a private Artifactory instance. I am not able to reach out at all to download applications, but I can place a jar that can be run via java -jar in the Artifactory repositorty (given that jar is available on maven central), does such a jar exist? And how would I lunch coursier from said jar?
Richard Gilmore
@gilandose
Hi looking at the cache/CacheUrl.scala file and the cache.protocol. Handlers, in the documents there is a link (dead) to coursier-s3, was wondering if you had an example of writing a handler plugin to provide custom functionality, also is it possible to override the default http or https plugins?
Jack Koenig
@jackkoenig
Using the CLI, is there a way to fetch only the source jar for the primary dependency and not all transitive dependencies? When you use withSources() in SBT it only gets the source jar for the marked dependency
Tobias Roeser
@lefou
Hi, how am I supposed to resolve a ZIP file from a repository, e.g. Maven Central or a local ivy?
Assuming, the zip file has the type "zip" instead of "jar".
Second case: assuming the zip file has the type "zip" and the classifier "dist".
I first tried to do it in mill, but I wasn't able the get the zip files. So I want to try the coursier cmdline app, but when I use coursier resolve it never shows what type of classifier is used
Tobias Roeser
@lefou
When I run coursier fetch, I only see JAR files
Tobias Roeser
@lefou
Ore is there some other place to ask? I couldn't find anything in the documentation regarding selection of specific type and classifiers.
Tobias Roeser
@lefou
@alexarchambault Can you tell how to resolve an artifact which is a ZIP instead of a JAR? e.g. https://repo1.maven.org/maven2/de/wayofquality/blended/blended.launcher_2.12/3.1-RC2/blended.launcher_2.12-3.1-RC2.zip
jeroentervoorde
@jeroentervoorde
Hi, i'm trying the semver version reconcillation. I can't find in the docs whether it should conflict on major or minor versions. I assumed major but it appears to be minor. Should I file a bug for this?
jeroentervoorde
@jeroentervoorde

I found this check in coursier.graph.Conflict:

    def compatible(wanted: String, selected: String): Boolean =
      wanted == selected || {
        val c = Parse.versionConstraint(wanted)
        val v = Version(selected)
        if (c.interval == VersionInterval.zero) {
          if (semVer)
            c.preferred.exists(_.items.take(2) == v.items.take(2))
          else
            c.preferred.contains(v)
        } else
          c.interval.contains(v)
      }

I didn't verify it with a debugger (couldn't get it to work with the shaded coursier in sbt) but it appears to check major and minor version which matches my conflicts when running sbt update.
I am using sbt-lm-coursier 2.0.0-RC6-2 with sbt 1.13.10

Jose Martinez
@callado4

Should coursier be showing a more descriptive error message when you are getting blocked from the remote, like getting a 403 response when maven central blocks your build server? See our log output below I was able to correctly assume that we were being blocked and make sure to add a missing setting to use our own artifactory server but the error message has no details about why it was not found.

sbt -Dsbt.log.noformat=true -Dsbt.gigahorse=false test
[info] Loading settings for project workspace-build from plugins.sbt ...
[info] Loading project definition from /workspace/project
[info] Loading settings for project workspace from build.sbt ...
[info] Set current project to workspace (in build file:/workspace/)
[warn] 
[warn]     Note: Unresolved dependencies path:
snip
[info] All tests passed.
[error] sbt.librarymanagement.ResolveException: Error downloading org.scala-lang:scala-library:2.13.2
[error]   Not found
[error]   Not found
[error]     at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:247)
[error]     at lmcoursier.CoursierDependencyResolution.$anonfun$update$35(CoursierDependencyResolution.scala:216)
[error]     at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]     at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:216)
[error]     at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]     at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)
[error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
[error]     at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
[error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
[error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
[error]     at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2950)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]     at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]     at sbt.Execute.work(Execute.scala:290)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[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) sbt.librarymanagement.ResolveException: Error downloading org.scala-lang:scala-library:2.13.2
[error]   Not found
[error]   Not found

Those 2 messages with Not Found (blank) seem like some context is missing (and why are there 2??). When I add only local to my repositories config I see a line saying

[error]   not found: /Users/username/.ivy2/local/org.scala-lang/scala-library/2.13.2/ivys/ivy.xml
Jose Martinez
@callado4
If I can carve out some time, I would maybe like to look into putting in a change if I could get guidance on where it would make sense in the codebase to make that change
Another thing that I noticed is that the process seemed to hang if I blocked the maven remote ip address using something like iptables (I used pfctl locally on my mac)
Yun Lai
@lyonlai
hey all I'm using pants with couriser and I'm running into some issue with hibernate-validator relocation issue. doesn't seems like cousier follows the package relocation correctly.
package org.hibernate.validator.constraints does not exist: 
   import org.hibernate.validator.constraints.NotEmpty;
                                                                                           ^
Jamal CHAQOURI
@redarqas_twitter
Hi, maybe I am missing something obvious, I am using oh-my-zsh and trying to have coursier completion
cs --completions zsh
Exception in thread "main" java.lang.NullPointerException
    at coursier.cli.Coursier$.zshCompletions(Coursier.scala:42)
    ...
When trying to generate scripts/_coursier, if someone have an idea ?
Jamal CHAQOURI
@redarqas_twitter
Jar-based install did it
Wojtek Pituła
@Krever
I would like to add a host coursier cache as a local repo during docker build. Does anyone tried this? Is coursier cache a valid ivy repo?
Jack Koenig
@jackkoenig
@Krever You can use local repositories by prefixing the path with file://, it will use the local artifacts, it won't recache them locally unless you use the additional argument --cache-file-artifacts
$ cs fetch --cache cache io.circe::circe-core:0.12.3                                                          
https://repo1.maven.org/maven2/io/circe/circe-core_2.13/maven-metadata.xml
  100.0% [##########] 781 B (31.8 KiB / s)
https://repo1.maven.org/maven2/io/circe/circe-core_2.13/0.12.3/circe-core_2.13-0.12.3.pom                                                                  
  100.0% [##########] 1.9 KiB (91.1 KiB / s)
https://repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.0.0/cats-core_2.13-2.0.0.pom                                                                 
  100.0% [##########] 4.5 KiB (118.4 KiB / s)
https://repo1.maven.org/maven2/io/circe/circe-numbers_2.13/0.12.3/circe-numbers_2.13-0.12.3.pom                                                            
  100.0% [##########] 1.6 KiB (27.6 KiB / s)
https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.0/scala-library-2.13.0.pom                                                                
  100.0% [##########] 1.6 KiB (27.4 KiB / s)
https://repo1.maven.org/maven2/io/circe/circe-numbers_2.13/0.12.3/circe-numbers_2.13-0.12.3.jar                                                            
  100.0% [##########] 12.7 KiB (289.4 KiB / s)
https://repo1.maven.org/maven2/org/typelevel/cats-macros_2.13/2.0.0/cats-macros_2.13-2.0.0.jar                                                             
  100.0% [##########] 305 B (6.8 KiB / s)
https://repo1.maven.org/maven2/io/circe/circe-core_2.13/0.12.3/circe-core_2.13-0.12.3.jar                                                                  
  100.0% [##########] 1.1 MiB (4.0 MiB / s)
https://repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.0.0/cats-core_2.13-2.0.0.jar                                                                 
  100.0% [##########] 4.5 MiB (7.3 MiB / s)
https://repo1.maven.org/maven2/org/typelevel/cats-kernel_2.13/2.0.0/cats-kernel_2.13-2.0.0.jar                                                             
  100.0% [##########] 3.3 MiB (4.3 MiB / s)
https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.0/scala-library-2.13.0.jar                                                                
  100.0% [##########] 5.4 MiB (5.4 MiB / s)
cache/https/repo1.maven.org/maven2/io/circe/circe-core_2.13/0.12.3/circe-core_2.13-0.12.3.jar                                                              
cache/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.0/scala-library-2.13.0.jar                                                            
cache/https/repo1.maven.org/maven2/io/circe/circe-numbers_2.13/0.12.3/circe-numbers_2.13-0.12.3.jar                                                        
cache/https/repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.0.0/cats-core_2.13-2.0.0.jar                                                             
cache/https/repo1.maven.org/maven2/org/typelevel/cats-macros_2.13/2.0.0/cats-macros_2.13-2.0.0.jar                                                         
cache/https/repo1.maven.org/maven2/org/typelevel/cats-kernel_2.13/2.0.0/cats-kernel_2.13-2.0.0.jar                                                         
$ cs fetch --no-default --repository file://$PWD/cache/https/repo1.maven.org/maven2 --cache cache2 io.circe::circe-core:0.12.3
/Users/jack/work/coursier-test/cache/https/repo1.maven.org/maven2/io/circe/circe-core_2.13/0.12.3/circe-core_2.13-0.12.3.jar
/Users/jack/work/coursier-test/cache/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.0/scala-library-2.13.0.jar
/Users/jack/work/coursier-test/cache/https/repo1.maven.org/maven2/io/circe/circe-numbers_2.13/0.12.3/circe-numbers_2.13-0.12.3.jar
/Users/jack/work/coursier-test/cache/https/repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.0.0/cats-core_2.13-2.0.0.jar
/Users/jack/work/coursier-test/cache/https/repo1.maven.org/maven2/org/typelevel/cats-macros_2.13/2.0.0/cats-macros_2.13-2.0.0.jar
/Users/jack/work/coursier-test/cache/https/repo1.maven.org/maven2/org/typelevel/cats-kernel_2.13/2.0.0/cats-kernel_2.13-2.0.0.jar
Wojtek Pituła
@Krever
@jackkoenig Thanks a lot, sounds good. I will try it today.
Yann Moisan
@YannMoisan_twitter
Hello. I have a question related to old versions. At some point between coursier-api 1.0.2 and 1.1.0, the parameter beforeMain has been removed from Launcher.launch. Is there a workaround ?
Jason Pickens
@steinybot
Hi. I am trying to launch a JAR and it has a META-INF/MANIFEST.MF with a Main-Class attribute but coursier can’t seem to find it. If I specify the same class manually then it works. Any idea why?
matrixbot
@matrixbot
antranigv was kicked by tigran.
Ryan Peters
@sloshy
Setting the stack size w/ sbt installed through coursier seems to not function properly. I have some code that uses Shapeless on a very large (198-field) case class and derives something from it, and no matter where I set my stack size to increase it seems to not be making a difference. I get a stack overflow on compile each time.
If anyone else has experience setting this and knowing it works, I'd appreciate the help.
One other thing I noticed: it's not entirely obvious when you are installing sbt that it seems to not use the same launcher script as a normally-installed SBT, so it seems to not respect .jvmopts or .sbtopts for example
Ryan Peters
@sloshy
Seems that it works if you export JAVA_OPTS, but SBT_OPTS, etc. do not work
Ryan Peters
@sloshy
Issue created to track java opts support: coursier/sbt-launcher#167
Jan Trtík
@honzatrtik

Hi, I'm stuck with defining multiple reconciliation rules (using both cli & sbt plugin):
This works as expected :

coursier resolve  --reconciliation "org.typelevel:*:strict" org.http4s:http4s-blaze-server_2.12:0.21.4 

Resolution error: Rule Strict(Set(ModuleMatcher(org.typelevel:*)), Set(ModuleMatcher(*:*)), true, true, false) not satisfied: coursier.params.rule.Strict$EvictedDependencies: Unsatisfied rule Strict(org.typelevel:*, exclude=*:*, ignoreIfForcedVersion=true): Found evicted dependencies:

org.typelevel:cats-core_2.12:2.1.1 (2.0.0 wanted)
└─ io.chrisdavenport:unique_2.12:2.0.0
   └─ io.chrisdavenport:vault_2.12:2.0.0
      └─ org.http4s:http4s-core_2.12:0.21.4
         ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
         │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
         └─ org.http4s:http4s-server_2.12:0.21.4
            └─ org.http4s:http4s-blaze-server_2.12:0.21.4

org.typelevel:cats-core_2.12:2.1.1 (2.0.0 wanted)
└─ io.chrisdavenport:vault_2.12:2.0.0
   └─ org.http4s:http4s-core_2.12:0.21.4
      ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
      │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
      └─ org.http4s:http4s-server_2.12:0.21.4
         └─ org.http4s:http4s-blaze-server_2.12:0.21.4

org.typelevel:cats-effect_2.12:2.1.3 (2.1.2 wanted)
└─ co.fs2:fs2-core_2.12:2.3.0
   └─ co.fs2:fs2-io_2.12:2.3.0
      └─ org.http4s:http4s-core_2.12:0.21.4
         ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
         │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
         └─ org.http4s:http4s-server_2.12:0.21.4
            └─ org.http4s:http4s-blaze-server_2.12:0.21.4

org.typelevel:cats-effect_2.12:2.1.3 (2.1.2 wanted)
└─ co.fs2:fs2-io_2.12:2.3.0
   └─ org.http4s:http4s-core_2.12:0.21.4
      ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
      │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
      └─ org.http4s:http4s-server_2.12:0.21.4
         └─ org.http4s:http4s-blaze-server_2.12:0.21.4

org.typelevel:cats-effect_2.12:2.1.3 (2.0.0 wanted)
└─ io.chrisdavenport:unique_2.12:2.0.0
   └─ io.chrisdavenport:vault_2.12:2.0.0
      └─ org.http4s:http4s-core_2.12:0.21.4
         ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
         │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
         └─ org.http4s:http4s-server_2.12:0.21.4
            └─ org.http4s:http4s-blaze-server_2.12:0.21.4

org.typelevel:cats-effect_2.12:2.1.3 (2.0.0 wanted)
└─ io.chrisdavenport:vault_2.12:2.0.0
   └─ org.http4s:http4s-core_2.12:0.21.4
      ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
      │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
      └─ org.http4s:http4s-server_2.12:0.21.4
         └─ org.http4s:http4s-blaze-server_2.12:0.21.4

But this takes only first argument into account (no strict errors are shown for cats-effect dependency):

coursier resolve  --reconciliation "org.typelevel:cats-core_2.12:strict" --reconciliation "org.typelevel:cats-effect_2.12:strict" org.http4s:http4s-blaze-server_2.12:0.21.4

Resolution error: Rule Strict(Set(ModuleMatcher(org.typelevel:cats-core_2.12)), Set(ModuleMatcher(*:*)), true, true, false) not satisfied: coursier.params.rule.Strict$EvictedDependencies: Unsatisfied rule Strict(org.typelevel:cats-core_2.12, exclude=*:*, ignoreIfForcedVersion=true): Found evicted dependencies:

org.typelevel:cats-core_2.12:2.1.1 (2.0.0 wanted)
└─ io.chrisdavenport:unique_2.12:2.0.0
   └─ io.chrisdavenport:vault_2.12:2.0.0
      └─ org.http4s:http4s-core_2.12:0.21.4
         ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
         │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
         └─ org.http4s:http4s-server_2.12:0.21.4
            └─ org.http4s:http4s-blaze-server_2.12:0.21.4

org.typelevel:cats-core_2.12:2.1.1 (2.0.0 wanted)
└─ io.chrisdavenport:vault_2.12:2.0.0
   └─ org.http4s:http4s-core_2.12:0.21.4
      ├─ org.http4s:http4s-blaze-core_2.12:0.21.4
      │  └─ org.http4s:http4s-blaze-server_2.12:0.21.4
      └─ org.http4s:http4s-server_2.12:0.21.4
         └─ org.http4s:http4s-blaze-server_2.12:0.21.4

Do I miss something? Thanks!