alexarchambault on gh-pages
Update website (compare)
Hi just got myself an ARM-based Apple computer and tried installing Java, Scala, sbt, etc. through coursier. It appears to work for Java (adopt-openj9:1.8.0-292) and Scala (2.13.6). But when launching sbt I am presented with the following error:
❯ sbt
[info] [launcher] getting org.scala-sbt sbt 1.5.5 (this may take some time)...
assertion failed [found_x86_offset]: no instruction entry found for jit breakpoint at arm address 0x10838cbb0
(TranslationCacheJit.cpp:300 handle_jit_breakpoint)
I don't see anything on this on the docs so was hoping someone could help me out with this. I'd prefer to install everything thsough one manager (coursier) and not have to install e.g. sbt through brew. Thanks!
bloop v1.4.10-8-8d1cbc4f
.cs update bloop
. I even uninstall bloop and install again, but somehow it installs version 1.4.10, even if 1.4.11 is available.~/.local/share/coursier/bin/bloop
location.❯ cs install bloop
https://repo1.maven.org/maven2/ch/epfl/scala/bloopgun_2.12/maven-metadata.xml
No new update since 2021-11-02 20:11:03
Wrote bloop
~/.cache/coursier/v1/https/repo1.maven.org/maven2/ch/epfl/scala/bloop-launcher_2.12
❯ bloop about
bloop v1.4.10-8-8d1cbc4f
but if I follow the link, then latest version is 1.4.11
cs update bloop
? @eugenemedvediev
Hello!
I'm wondering if https://logging.apache.org/log4j/2.x/security.html could affect https://github.com/coursier/sbt-coursier
See that there is log4j
as a third-party dependency:
io.get-coursier:lm-coursier_2.12:2.0.9+5-935e59c8+20211213-1307-SNAPSHOT [S]
+-io.get-coursier:coursier_2.12:2.1.0-M1-1
...
|
+-org.scala-sbt:librarymanagement-ivy_2.12:1.3.4 [S]
...
+-org.scala-sbt:librarymanagement-core_2.12:1.3.4 [S]
...
+-org.scala-sbt:util-logging_2.12:1.3.3 [S]
| +-org.apache.logging.log4j:log4j-core:2.11.2
| | +-org.apache.logging.log4j:log4j-api:2.11.2
COURSIER_ARCHIVE_CACHE
and then things such as cs setup --jvm adopt:1.11.0-11
will write into that folder. However, the JAVA_HOME ends up looking similar to the following: .coursier.d/https/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%252B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.11_9.tar.gz/jdk-11.0.11+9/Contents/Home/
Is there currently a way to get a more direct route to JAVA_HOME? What I mean by that is that when I say adopt:1.11.0-11
, the actual PATH is fairly unpredictable. I would like to know JAVA_HOME without calling cs java --env
if at all possible. Maybe something like $COURSIER_ARCHIVE_CACHE/jvm/$JDK_SHORTNAME
would be amazing as a symlink into the directory structure. So I suppose my question here is whether something similar already exists. And if not, I would to contribute such functionality but am having a bit of a hard time finding where exactly these paths would be built. Is modules/jvm/src/main/scala/coursier/jvm/JvmCache.scala
a good place to start?
Does Coursier support ssh resolvers?
I have used an ssh resolver in SBT for years and I like it. But I can't make it work in the current environment. The SBT doc is unchanged, but I am getting an error out of coursier.internal.PlatformRepositoryParser:89. I guess I'm not saying Maven or Ivy repo type.
Hey all, I'm having trouble getting coursier to discover new versions of a dependency even when setting coursier_mode and coursier_ttl to the following
export COURSIER_TTL="0s"
export COURSIER_MODE="update-local-changing,offline,missing"
The dependency in question is an sbt plugin and is wildcarding on the patch version like so 1.2.+
. I'm hoping that when new patch versions of the dependency are published coursier will automatically discover and download them but as of right now it doesn't seem like that's happening. Also, the maven-metadata.xml
file in the local coursier cache does not match the file in the remote repository, the local file seems to be a few versions behind. Wondering if anyone has thoughts on what I can try to make this work the way I'm expecting it to, thanks in advance!
I am using the standalone JAR coursier (V 2.1.0 M2) to set up scala .
$ ./coursier install -r https://username:password@artifactory.corp:443/artifactory/r-XXX-virtual scala
https://artifactory.corp:443/artifactory/r-XXX-virtual/io/get-coursier/apps/maven-metadata.xml
No new update since 2021-11-16 00:52:42
Exception in thread "main" coursier.error.ResolutionError$CantDownloadModule: Error downloading org.scala-lang:scala-compiler:latest.stable
download error: Caught javax.net.ssl.SSLException (Connection reset) while downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/maven-metadata.xml
at coursier.Resolve$.$anonfun$validate$1(Resolve.scala:347)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
at scala.collection.Iterator.foreach(Iterator.scala:943)
at scala.collection.Iterator.foreach$(Iterator.scala:943)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
at scala.collection.IterableLike.foreach(IterableLike.scala:74)
at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
at scala.collection.TraversableLike.map(TraversableLike.scala:286)
at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
at scala.collection.AbstractTraversable.map(Traversable.scala:108)
at coursier.Resolve$.validate(Resolve.scala:345)
at coursier.Resolve.validate0$1(Resolve.scala:117)
at coursier.Resolve.$anonfun$ioWithConflicts0$4(Resolve.scala:167)
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:82)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Any idea why the custom repository '-r' is not considered? I am in a enterprise environment and we cannot use repo1.maven.org.
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?
scalafmt
, I reformatted the code and pushed new changes.
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
[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?
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
@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
: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.
.bash_profile
for a vert specific JDK.
~/.local/share/coursier/bin
in your PATH