Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:48
    sideeffffect edited #2057
  • 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
  • Jun 22 03:02
    armanbilge commented #2178
  • Jun 20 22:51
    smarter commented #2408
  • Jun 20 22:51
    smarter closed #2408
  • Jun 20 13:21
    bishabosha edited #2451
  • Jun 20 13:21
    bishabosha edited #2451
  • Jun 20 13:20
    bishabosha opened #2451
  • Jun 20 04:21
    dzx-dzx opened #2450
  • Jun 19 23:41
    nafg commented #2408
  • Jun 16 20:03
    marktsuchida opened #2449
  • Jun 16 16:49

    alexarchambault on gh-pages

    Update website (compare)

  • Jun 16 16:43

    alexarchambault on gh-pages

    Update website (compare)

  • Jun 16 16:41

    alexarchambault on gh-pages

    Update website (compare)

  • Jun 16 16:08
    alexarchambault closed #2418
A. Alonso Dominguez
@alonsodomin

hi all, wondering if any of the maintainers could take a look at the following PR and give some feedback (or at least trigger the CI build): coursier/coursier#2317

giving some visibility to this, if any of the maintainers is around, could this PR be reviewed please?

Mark T. Kennedy
@mtk
right now metals v0.11.0 wants bloop v1.4.12. but cs (even after a 'cs update') has bloop 1.4.11 installed. a 'cs uninstall bloop' followed by a 'cs install bloop' still downloads 1.4.11. the online doc for a cs install of bloop lists the current version as 1.4.12. i'm confused :-).
Mark T. Kennedy
@mtk
belay that question. it just needed to be restarted.
A. Alonso Dominguez
@alonsodomin
just a quick reminder for the maintainers that this PR is waiting again for approval: coursier/coursier#2317. Last time it failed because of the code format check made by scalafmt, I reformatted the code and pushed new changes.
Thijs Broersen
@ThijsBroersen
Is coursier setup currently broken? I get the following on any env I try to install it: Checking if the standard Scala applications are installed Installed ammonite Error downloading gz+https://github.com/coursier/coursier/releases/download/v2.1.0-M5-1-gc8a0a64bd/cs-x86_64-pc-linux.gz
simonjscott
@simonjscott
I've run into a problem with artefact resolution using sbt-coursier 2.0.10, sbt 1.2.6, on Windows 10. My compilations are failing because a needed artefact can't be found on the classpath. What seems to be happening is that, if an artefact is already present in my local .m2 repo, then coursier doesn't add the artefact's location to the classpath. If I remove the artefact from the .m2 repo, then coursier downloads and everything works. Does this sound familiar to anyone? I am wondering if it is related to this issue: coursier/coursier#372
2 replies
Chris Kipp
@ckipp:matrix.org
[m]
maybe not the answer you're looking for, but depending on why you are using sbt-coursier, you could just consider using mainline sbt without sbt-coursier since as of 1.4.x it uses coursier by default
1 reply
since you are on a pretty old version of sbt
Chris Kipp
@ckipp:matrix.org
[m]
but rather your coursier cache location
Gideon Potok
@GideonPotok
image.png
image.png
image.png
image.png
image.png
image.png
image.png

[error] (update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/org/apache/avro/avro-mapred/1.10.2/avro-mapred-1.10.2-hadoop2.jar: not found: https://repo1.maven.org/maven2/org/apache/avro/avro-mapred/1.10.2/avro-mapred-1.10.2-hadoop2.jar
[error] Total time: 3 s, completed Feb 18, 2022 10:01:42 PM

What is my next move?

anyone want to dm me and help me walk through some dependency issues?
Steve Jones
@sjfloat
Is anyone else aware of problems with coursier? I seem to be limited to scala 3
cs install scala:2.13.1 https://repo1.maven.org/maven2/io/get-coursier/apps/maven-metadata.xml No new update since 2022-02-06 13:51:21 Exception in thread "main" coursier.error.ResolutionError$CantDownloadModule: Error downloading org.scala-lang:scala3-compiler_3:2.13.1 not found: https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/2.13.1/scala3-compiler_3-2.13.1.pom
Steve Jones
@sjfloat
OK, problem was an old cs executable
sunLightLeaf
@sunLightLeaf
Hi! I have a problem with cs setup - it throws java.util.zip.ZipException: invalid entry CRC (expected 0x8899ec42 but got 0xd4a7d99d). I've checked my jars, and none seem to be corrupted. What might be the problem here?..
Lakin Wecker
@lakinwecker
I'm running into something similar, except I was just trying to install scalafmt
Looks like you also reported it on github and it's a known issue with arch linux and calculating CRCs, which is fun
skestle
@skestle

@vijayemmanuel did you figure this out? Unfortuantely, I have no idea how to determine what my cs/coursier version is.
:point_up: January 8, 2022 8:36 PM

I can successfully run fetch, but not install

Vijay Emmanuel PAZHEPARAMPIL
@vijayemmanuel
@skestle It is working after I set the coursier credentials property file as described in https://get-coursier.io/docs/other-credentials. I ignored the realm property and install command worked.
skestle
@skestle
@vijayemmanuel Ah - I see, you were requiring credentials. Mine has none. I've raised coursier/coursier#2405, since even if such a fix is available, it's a bug that it won't tell you anything about the problem
Florian Schmaus
@Flow_gitlab
I am in the process of packaging coursier for my Gentoo overlay and wonder about the versioning scheme. The latest coursier release is 2.1.0-M5, is the -M part like a pre-release for 2.1.0?
Kevin Sjöberg
@kevinsjoberg

:wave: I'm new to Scala (started today) and I'm trying to understand how Coursier fit into everything. Would anyone mind explaining a bit? I installed it on my M1 MBP (But I still it runs under Rosetta since it doesn't support Apple Sillicon?) and it required me to have OpenJDK installed. Once installed, I run cs setup and it installs yet another JDK, including some tools like amm, sbt, scala and scalafmt. I'm trying to follow the Functional Programming Principles in Scala course on Coursera but ran into problem when they asked me to run sbt in the example project. Instead of starting the sbt prompt I got the following error:

~/code/scala-course $ sbt
[info] [launcher] getting org.scala-sbt sbt 1.5.0  (this may take some time)...
java.lang.ClassCastException: class java.lang.UnsupportedOperationException cannot be cast to class xsbti.FullReload (java.lang.UnsupportedOperationException is in module java.base of loader 'bootstrap'; xsbti.FullReload is in unnamed module of loader 'app')
    at sbt.internal.XMainConfiguration.run(XMainConfiguration.java:59)
    at sbt.xMain.run(Main.scala:46)
    at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
    at xsbt.boot.Launch$.run(Launch.scala:149)
    at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
    at xsbt.boot.Launch$.launch(Launch.scala:159)
    at xsbt.boot.Launch$.apply(Launch.scala:44)
    at xsbt.boot.Launch$.apply(Launch.scala:21)
    at xsbt.boot.Boot$.runImpl(Boot.scala:78)
    at xsbt.boot.Boot$.run(Boot.scala:73)
    at xsbt.boot.Boot$.main(Boot.scala:21)
    at xsbt.boot.Boot.main(Boot.scala)
[error] [launcher] error during sbt launcher: java.lang.ClassCastException: class java.lang.UnsupportedOperationException cannot be cast to class xsbti.FullReload (java.lang.UnsupportedOperationException is in module java.base of loader 'bootstrap'; xsbti.FullReload is in unnamed module of loader 'app')

After some debugging on my part, it looks like Coursier installed sbt, version 1.6.2 and the project had configured sbt.version=1.5.0. Changing this to sbt.version=1.6.2 instead, solved the problem.

What I'm not entirely sure about is what's the purpose of Coursier. To manage multiple installs of apps and JDKs? That was my initial thought, but it doesn't look like it as it wants me to put hardcoded paths in my .bash_profile for a vert specific JDK.
I'm super confused right now, so any high level overview would be much appreciated. :slight_smile:
Florian Schmaus
@Flowdalic
@kevinsjoberg does https://get-coursier.io/docs/cli-java help?
I don't think there is any reason for coursier being able to manage JVM installs (alongside JVM-based app installs) that requires one to push hardcoded paths in .bash_profile
all that is needed is ~/.local/share/coursier/bin in your PATH
Kevin Sjöberg
@kevinsjoberg

@Flowdalic When I run cs setup it asks to put things into .profile and .bash_profile. Specifically the following:

# >>> JVM installed by coursier >>>
export JAVA_HOME="/Users/kevin/Library/Caches/Coursier/arc/https/github.com/adoptium/temurin18-binaries/releases/download/jdk-18%252B36/OpenJDK18U-jdk_x64_mac_hotspot_18_36.tar.gz/jdk-18+36/Contents/Home"
# <<< JVM installed by coursier <<<

# >>> coursier install directory >>>
export PATH="$PATH:/Users/kevin/Library/Application Support/Coursier/bin"
# <<< coursier install directory <<<

Adding /Users/kevin/Library/Application Support/Coursier/bin to my PATH is fine, but the JAVA_HOME is explicit. If I'm supposed to use Coursier to manage different versions of the JVM, I don't see how this fits into that.

Florian Schmaus
@Flowdalic
tbh, I wouldn't want to mess coursier with the JAVA_HOME environment variable, and I did not set that
so one way to manage select the JVM that is used for a particular app is cs java --jvm 11 --env
I did not find a way for the user to manage the default (user) JVM. that is typically done by having JAVA_HOME point to a path which is a symlink to the actual JVM the user wants
For example, that is how Gentoo lets its user select (and override) the system JVM setting
Having JAVA_HOME not point to a symlink feels wrong to me :)
But really, I am probably as new as you to coursier, so if someone else wants to shed some light into this, then please step forward :)
Kevin Sjöberg
@kevinsjoberg
Yeah, same here. I removed it now, as it feels wrong to hardcode that value. But what's the purpose of cs setup. Can I set up multiple JVMs and apps? It's all a tad confusing to me to be honest.
Alright, if I removed JAVA_HOME that coursier added to my .bash_profile I can't use the apps anymore.
Unless I set JAVA_HOME to the output of cs java-home again.
As an example, running scala now spits out The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java..
Florian Schmaus
@Flowdalic
@kevinsjoberg it appears you need to set JAVA_HOME to something sensible then. not sure about the internals of coursier, but some apps are just happy with java in PATH
note that I too have JAVA_HOME set, just not with a value provided by couriser
Kevin Sjöberg
@kevinsjoberg
I'm so confused. I understand the purpose of JAVA_HOME, but I do have a JVM installation outside of Coursier. It was needed to actually run Coursier itself. Then Coursier installs another JVM that it manages.
I could of course use direnv and create a .envrc file that sets things up using cs java --env but I'm still confused how things is intended to work.
How do I choose what JVM to use? Can I list installed JVMs (I've only found cs list that lists installed apps)?