Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 23 12:14
    scala-steward opened #2240
  • Oct 22 15:18

    alexarchambault on gh-pages

    Update website (compare)

  • Oct 22 14:38
    alexarchambault synchronize #2239
  • Oct 22 14:37

    alexarchambault on master

    Minor refacto Update GraalVM to 21.3.0 Merge pull request #2238 from a… (compare)

  • Oct 22 14:37
    alexarchambault closed #2238
  • Oct 22 14:37
    alexarchambault synchronize #2239
  • Oct 22 14:18
    alexarchambault opened #2239
  • Oct 22 14:17
    alexarchambault opened #2238
  • Oct 22 14:14
    alexarchambault synchronize #2237
  • Oct 22 14:04
    alexarchambault opened #2237
  • Oct 22 13:27

    alexarchambault on gh-pages

    Update website (compare)

  • Oct 22 13:24

    alexarchambault on gh-pages

    Update website (compare)

  • Oct 22 12:50

    alexarchambault on master

    Update tools to 0.4.1 (#2236) (compare)

  • Oct 22 12:50
    alexarchambault closed #2236
  • Oct 22 12:50

    alexarchambault on master

    Update jsoniter-scala-core to 2… (compare)

  • Oct 22 12:50
    alexarchambault closed #2235
  • Oct 22 12:50
    alexarchambault commented #2231
  • Oct 22 09:38
    sjrd commented #2059
  • Oct 22 09:30
    matejsarlija commented #2059
  • Oct 21 22:18
    scala-steward opened #2236
Chris Kipp
@ckipp:matrix.org
[m]
If I'm not mistaken the html listing page is actually a backup that coursier uses if it's unable to locate the maven-metadata.xml file for a project
most of the time I believe the full version information is simply parsed from the maven-metadata file both for the complete and resolve functionality
Roberto Tyley
@rtyley
That makes sense! I guess it can definitely refer to maven-metadata.xml when an artifact coordinate is specified (eg org.typelevel:cats-core_2.13) which most be the most common kind of question it faces, but there's no usable maven-metadata.xml at the group level (eg https://repo1.maven.org/maven2/org/typelevel/maven-metadata.xml doesn't exist) - so if you want to find all the artifacts that live under a group id (eg org.typelevel) then there's no choice but to parse the HTML out of the directory listing page. It's a much rarer question though - I'm currently interested in it, but I guess it's not going to be an essential part of eg resolving all the dependencies of build!
Bjorn Regnell
@bjornregnell
can cs show me which versions are installed of for example scala and scala3-repl ?
cs list just gives me the names not the versions...
Bjorn Regnell
@bjornregnell
@phendric I think you should use https://git.io/coursier-cli-linux or the thing from https://alexarchambault.github.io/posts/2020-09-21-cs-setup.html#managing-applications that tries to judge which os you are on, but not sure how that works on WSL2/Ubuntu20.04: curl -fLo cs https://git.io/coursier-cli-"$(uname | tr LD ld)" so perhaps safer to just use curl -fLo cs https://git.io/coursier-cli-linux
Ghost
@ghost~5e342765d73408ce4fd850b1
I am having trouble with using the FileCredentials class to set auth for a repo (it does not like my Windows path to a credentials file), so I thought I'd use the method described in the documentation instead, but no file location for the credentials.properties file is given for Windows. I've tried putting it under users/username/.config etc but no dice thus far. I'm using whatever version of coursier that comes with the Scala Metals plugin on VSCode
I should be able to access the properties using sys.props.get if they're properly loaded yeah?
Parth
@thepartyshukla_twitter
Hi guys, I am facing an error trying to run the project after it compiles successfully
[error] java.lang.NoClassDefFoundError: com/google/common/hash/Hashing
[error]     at io.methvin.watcher.PathUtils.<clinit>(PathUtils.java:36)
[error]     at io.methvin.watcher.DirectoryWatcher.<init>(DirectoryWatcher.java:78)
[error]     at play.dev.filewatch.DefaultFileWatchService.watch(DefaultFileWatchService.scala:36)
[error]     at play.dev.filewatch.FileWatchService$$anon$1.watch(FileWatchService.scala:87)
[error]     at play.runsupport.Reloader.<init>(Reloader.scala:359)
[error]     at play.runsupport.Reloader$.reloader$lzycompute$1(Reloader.scala:220)
[error]     at play.runsupport.Reloader$.play$runsupport$Reloader$$reloader$1(Reloader.scala:220)
[error]     at play.runsupport.Reloader$.startDevMode(Reloader.scala:230)
[error]     at play.sbt.run.PlayRun$.devModeServer$lzycompute$1(PlayRun.scala:95)
[error]     at play.sbt.run.PlayRun$.devModeServer$1(PlayRun.scala:79)
[error]     at play.sbt.run.PlayRun$.$anonfun$playRunTask$3(PlayRun.scala:102)
[error]     at play.sbt.run.PlayRun$.$anonfun$playRunTask$3$adapted(PlayRun.scala:65)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] Caused by: java.lang.ClassNotFoundException: com.google.common.hash.Hashing
[error]     at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
[error]     at io.methvin.watcher.PathUtils.<clinit>(PathUtils.java:36)
[error]     at io.methvin.watcher.DirectoryWatcher.<init>(DirectoryWatcher.java:78)
[error]     at play.dev.filewatch.DefaultFileWatchService.watch(DefaultFileWatchService.scala:36)
[error]     at play.dev.filewatch.FileWatchService$$anon$1.watch(FileWatchService.scala:87)
[error]     at play.runsupport.Reloader.<init>(Reloader.scala:359)
[error]     at play.runsupport.Reloader$.reloader$lzycompute$1(Reloader.scala:220)
[error]     at play.runsupport.Reloader$.play$runsupport$Reloader$$reloader$1(Reloader.scala:220)
[error]     at play.runsupport.Reloader$.startDevMode(Reloader.scala:230)
[error]     at play.sbt.run.PlayRun$.devModeServer$lzycompute$1(PlayRun.scala:95)
[error]     at play.sbt.run.PlayRun$.devModeServer$1(PlayRun.scala:79)
[error]     at play.sbt.run.PlayRun$.$anonfun$playRunTask$3(PlayRun.scala:102)
[error]     at play.sbt.run.PlayRun$.$anonfun$playRunTask$3$adapted(PlayRun.scala:65)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] stack trace is suppressed; run last Compile / run for the full output
[error] (Compile / run) java.lang.NoClassDefFoundError: com/google/common/hash/Hashing
[error] Total time: 2 s, completed May 19, 2021 6:17:49 PM
It used to run fine earlier on some instances, and this issue seems to have started coming out of the blue
Yadu Krishnan
@yadavan88
Hey, I am trying to install a custom application using cs. I published it to local artifactory and able to fetch it using the cs fetch -r. I am trying to create a bootstrap using -r argument. But while running the bootstrapped file, I am getting the permission error for it. Server returned HTTP response code: 401Could anyone help me to run it?
That is I am not able to understand how to pass the credentials .
1 reply
phendric
@phendric
@bjornregnell curl -fLo cs https://git.io/coursier-cli-linux works under WSL2/Ubuntu20.04. Looking back at my post, I realized I was missing a "/" after the https, and I didn't include the linux specific portion of the file!
Yadu Krishnan
@yadavan88
I created my own and app and published to a local repository. I also created a descriptor. Everything works fine if I give the exact version in the descriptor. But if I use latest.release or latest.stable, it is not getting resolved. Do I need to do something for that? Thanks in advance.
Piotr Gabara
@pgabara

Hi, I use sbt through coursier and when I try to run it with '-mem' parameter I got an error.

Here is what I get:

[error] Expected symbol
[error] Not a valid command: -
[error] Expected end of input.
[error] Expected '--'
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected 'addPluginSbtFile'
[error] -mem
[error]  ^

Do you have any idea how to fix it?

Raul Rodriguez
@raul782
Trying to update Coursier to test scala3 was very frustrating, I tried cs install cs and got the same error. I don't understand why this keeps failing as this is the recommended way to install scala3. I'm going back to sbt for now. Is somebody able to help:
cs update cs
Exception in thread "main" java.lang.Exception: Reading /Users/raul/Library/Application Support/Coursier/bin/cs
    at coursier.install.InfoFile$.readSource(InfoFile.scala:64)
    at coursier.install.InstallDir.$anonfun$maybeUpdate$3(InstallDir.scala:403)
    at coursier.install.InstallDir.$anonfun$maybeUpdate$3$adapted(InstallDir.scala:396)
    at coursier.util.Task$.$anonfun$flatMap$extension$1(Task.scala:14)
    at coursier.util.Task$.$anonfun$flatMap$extension$1$adapted(Task.scala:14)
    at coursier.util.Task$.wrap(Task.scala:84)
    at coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
    at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
    at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.lang.Thread.run(Thread.java:834)
    at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
    at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
Caused by: java.util.zip.ZipException: zip END header not found
    at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1535)
    at java.util.zip.ZipFile$Source.findEND(ZipFile.java:1436)
    at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1443)
    at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1274)
    at java.util.zip.ZipFile$Source.get(ZipFile.java:1237)
    at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:727)
    at java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:55)
    at java.util.zip.ZipFile.<init>(ZipFile.java:247)
    at java.util.zip.ZipFile.<init>(ZipFile.java:177)
    at java.util.zip.ZipFile.<init>(ZipFile.java:191)
    at coursier.install.InfoFile$.readSource(InfoFile.scala:45)
    ... 14 more
Btw, this happened in MacOS Catalina
Bjorn Regnell
@bjornregnell
@raul782 As a fallback you can just download https://github.com/lampepfl/dotty/releases/download/3.0.0/scala3-3.0.0.zip and put the extracted files in e.g. ~/scala3 and put the ~/scala3/bin on your path and you are ready to go. But perhaps it does not work if the above error is a symptom of problems with Java installation, then I'd recommend you to install JDK 11 from here https://adoptopenjdk.net/
Russ White
@russwyte
I am trying to install aarch64 jvm on my mac mini m1 - any tips on how to do that with coursier?
I see it exists in the index - but I don't know how to indicate that it should be installed:
https://github.com/shyiko/jabba/blob/11843e0b352868b41200abc445e50143c2b4a877/index.json#L1254
cs java --jvm zulu:16 --setup installs the x64 version
Eric K Richardson
@ekrich
I would go with 11 or 8 though if you are doing Scala type stuff.
Hanns Holger Rutz
@Sciss
if I want to run Versions() without any cache checks, what's the best idea? FileCache(...).withTtl(0.minutes) is that something reasonable, or ... ?
Bjorn Regnell
@bjornregnell
When I read the docs here https://get-coursier.io/docs/cli-installation I get the impression that coursier should fix my path. But when I follow the instructions it only prints a message that I should do it myself. Can coursier patch my path? If not then that page should perhaps be clarified so it is obvious that I need to do this myself. (I'm currently considering using cs for my beginner programmer students and unfortunately I think the instructions are a bit intimidating for a beginner so if we are going use cs I need to give them something easier to follow that does not assume any deeper knowledge of cmd/bash/terminal/console/powershell... etc)
image.png
Bjorn Regnell
@bjornregnell
Does anyone know how cs can install a scala3 runner? WIth the instructions here https://www.scala-lang.org/download/scala3.html you get scala3-compile and scala3-repl on your path but not any scala3 runner on your path to run your compiled programs. So how to run your programs compiled with cs scala3-compiler?
Bjorn Regnell
@bjornregnell
Damian Reeves
@DamianReeves
Hey, the coursier command line doesn’t seem to be picking up things like HTTP_PROXY I know I can pass in these options using the -J-D command line options but is there a file that both the coursier command line and coursier as a library uses to load these settings?
Eric K Richardson
@ekrich

I think it should look for JAVA_OPTS env var to find the Java -DhttpProxy... stuff but I couldn't find it looking for that in the CLI code.

I am no authority because I could even get the build to work because I started to look into this. I found a specific thing coursier or bloop couldn't do related to redirect and a proxy with basic auth.

coursier/coursier#930
scalameta/metals#2485
sbt/sbt#5496

Damian Reeves
@DamianReeves
thanks for the info
Eric K Richardson
@ekrich
I feel like JAVA_OPTS works most of the time. Some Scala tools miss a few of the edge cases.
Matt Hughes
@matthughes
What is cs list supposed to do? The help does not give much help. I was thinking it would list the things I've installed with coursier but it throws an exception without any arguments.
Bjorn Regnell
@bjornregnell
@matthughes I guess cs list was supposed to do that, but it perhaps never got implemented.
nafg
@naftoligug:matrix.org
[m]
Someone needs to implement proper help screens (unless it's been done since I last checked)
Bjorn Regnell
@bjornregnell
There is experimental work on improved scala runners going on here: https://github.com/dwijnand/scala-runners
Chris Kipp
@ckipp:matrix.org
[m]
cs list should show you all your installed applications
cs list
amm
bloop
coursier
cs
g8
mdoc
metac
metap
mill
sbt
sbtn
scala3-compiler
scala3-repl
scalac
scalafix
scalafmt
Bjorn Regnell
@bjornregnell
yeah, but it would be nice to see what version of each...
Tobias Roeser
@lefou
@alexarchambault Coursier uses the following version pattern for snapshot releases: major.minor.patch+commitcount-hash. Is there any benefit over the one used by mill: major.minor.patch-commitcount-hash?
Does it behave better in version ordering?
E.g. in Maven the minus between the version and the rest results in ordering the snapshot release before the patch release
Is the plus different and thus the better option?
vonchav
@voonchav_gitlab
Hi all, any plan to cut a new release? I have an issue with sbt but it's blocked by a merged PR in coursier :) coursier/coursier#2055
Ramiro Calle
@rrramiro
Hi @ckipp:matrix.org, there is cs search command coming up. coursier/coursier#2007
Chris Kipp
@ckipp:matrix.org
[m]
I know you can bootstrap with coursier and pass in --java-opt to give it options to run with, but is there a way to pass them in when calling the actual script that bootstrap creates?
or at that point is it just too late?
Geoffrey Knauth
@gknauth
I did cs update on a win10 system and now I have lots of .bat.bat.bat files, is this normal? If not, how do I fix this?
c:/Users/username/AppData/Local/Coursier/data/bin:
   31821 08-13 06:35 scalafmt.bat.bat.bat.bat.bat.bat.bat
   31821 08-13 06:35 scalafmt.bat.bat.bat.bat.bat.bat
   31821 08-13 06:35 scalafmt.bat.bat.bat.bat.bat
   31821 08-13 06:35 scalafmt.bat.bat.bat.bat
   31821 08-13 06:35 scalafmt.bat.bat.bat
   31821 08-13 06:35 scalafmt.bat.bat
   30260 08-13 06:35 scalac.bat.bat.bat.bat.bat.bat.bat
   30260 08-13 06:35 scalac.bat.bat.bat.bat.bat.bat
   30260 08-13 06:35 scalac.bat.bat.bat.bat.bat
   30260 08-13 06:35 scalac.bat.bat.bat.bat
   30260 08-13 06:35 scalac.bat.bat.bat
   30260 08-13 06:35 scalac.bat.bat
   30278 08-13 06:35 scala.bat.bat.bat.bat.bat.bat.bat
   30278 08-13 06:35 scala.bat.bat.bat.bat.bat.bat
   30278 08-13 06:35 scala.bat.bat.bat.bat.bat
   30278 08-13 06:35 scala.bat.bat.bat.bat
   30278 08-13 06:35 scala.bat.bat.bat
   30278 08-13 06:35 scala.bat.bat
   32402 08-13 06:35 sbt.bat.bat.bat.bat.bat.bat.bat
   35114 08-13 06:35 metals.bat.bat
   35154 08-13 06:35 metals-emacs.bat.bat
    2571 08-13 06:35 cs.bat.bat.bat.bat.bat.bat.bat
    2571 08-13 06:35 cs.bat.bat.bat.bat.bat.bat
    2571 08-13 06:35 cs.bat.bat.bat.bat.bat
    2571 08-13 06:35 cs.bat.bat.bat.bat
    2571 08-13 06:35 cs.bat.bat.bat
    2571 08-13 06:35 cs.bat.bat
   33512 08-13 06:35 coursier.bat.bat.bat.bat.bat.bat.bat
   33512 08-13 06:35 coursier.bat.bat.bat.bat.bat.bat
   33512 08-13 06:35 coursier.bat.bat.bat.bat.bat
   33512 08-13 06:35 coursier.bat.bat.bat.bat
   33512 08-13 06:35 coursier.bat.bat.bat
   33512 08-13 06:35 coursier.bat.bat
    2560 08-13 06:35 bloop.bat.bat.bat.bat.bat.bat.bat
    2560 08-13 06:35 bloop.bat.bat.bat.bat.bat.bat
    2560 08-13 06:35 bloop.bat.bat.bat.bat.bat
    2560 08-13 06:35 bloop.bat.bat.bat.bat
    2560 08-13 06:35 bloop.bat.bat.bat
    2560 08-13 06:35 bloop.bat.bat
   35369 08-13 06:35 amm.bat.bat.bat.bat.bat.bat.bat
   35369 08-13 06:35 amm.bat.bat.bat.bat.bat.bat
   35369 08-13 06:35 amm.bat.bat.bat.bat.bat
   35369 08-13 06:35 amm.bat.bat.bat.bat
   35369 08-13 06:35 amm.bat.bat.bat
   35369 08-13 06:35 amm.bat.bat
   35154 08-13 06:35 metals-emacs.bat
   35114 08-12 16:57 metals.bat
58251264 03-11 08:18 .cs.bat.bat.bat.bat.bat.bat.aux.exe
58251264 03-11 08:18 .cs.bat.bat.bat.bat.bat.aux.exe
58251264 03-11 08:18 .cs.bat.bat.bat.bat.aux.exe
58251264 03-11 08:18 .cs.bat.bat.bat.aux.exe
58251264 03-11 08:18 .cs.bat.bat.aux.exe
58251264 03-11 08:18 .cs.bat.aux.exe
40077824 02-18 09:30 .bloop.bat.bat.bat.bat.bat.bat.aux.exe
40077824 02-18 09:30 .bloop.bat.bat.bat.bat.bat.aux.exe
40077824 02-18 09:30 .bloop.bat.bat.bat.bat.aux.exe
40077824 02-18 09:30 .bloop.bat.bat.bat.aux.exe
40077824 02-18 09:30 .bloop.bat.bat.aux.exe
40077824 02-18 09:30 .bloop.bat.aux.exe
   32402 2021-01-13  sbt.bat.bat.bat.bat.bat.bat
   32402 2021-01-12  sbt.bat.bat.bat.bat.bat
    2560 2021-01-12  bloop.bat
   32402 2021-01-12  sbt.bat.bat.bat.bat
   32402 2021-01-12  sbt.bat.bat.bat
   32402 2021-01-03  sbt.bat.bat
39602176 2020-12-03  .bloop.aux.exe
   31780 2020-05-26  scalafmt.bat
   30256 2020-05-26  scalac.bat
   30275 2020-05-26  scala.bat
   32389 2020-05-26  sbt.bat
   33438 2020-05-26  coursier.bat
    2576 2020-05-26  cs.bat
   32887 2020-05-26  amm.bat
       0 2020-05-26  ..
52687360 2020-05-25  .cs.aux.exe
Geoffrey Knauth
@gknauth
Answer to my own question above. I deleted all those files. Reinstalled coursier using cmd.exe per instructions (doesn't say why not to use PowerShell for that). Did that in a scratch directory. Then used that new coursier, in PowerShell, to reinstall the programs above without all the duplicates.
Saskia Gennrich
@pektinasen

hello, I'm trying to build coursier, but it gives me an error, that it cannot find package dev.dirs. unfortunately this is my first time using mill, so I'm not sure if this is a mill issue or with my setup or with the mill script. I installed mill with cs install mill

[error] /home/saskia/projects/coursier/modules/paths/src/main/java/coursier/paths/CoursierPaths.java:7:1: package dev.dirs does not exist
[error] dev.dirs.GetWinDirs

I also used the ./mill script. same error.

I'm on ubuntu, in case that's important
Saskia Gennrich
@pektinasen
ah. figured it out. I should initialize the git submodule