cool-easter-32542
12/04/2023, 1:07 PMpants check :: and pants lint ::, fail when the JVM index used by Coursier is unavailable.
Pants version
2.18.0
OS
Linux
Additional info
The following is a sample of the output from a server running behind a proxy, and therefore unable to reach the JVM index used by Coursier:
pants --changed-since=### lint
86.22s Ensure download of JDK --jvm=zulu:8.0.372.
[INFO] Long running tasks:
79.06s Run `scalafmt` on 73 files.
79.06s Run `scalafmt` on 18 files.
79.06s Run `scalafmt` on 5 files.
[INFO] Long running tasks:
109.15s Run `scalafmt` on 73 files.
109.15s Run `scalafmt` on 18 files.
109.15s Run `scalafmt` on 5 files.
[ERROR] 1 Exception encountered:
Engine traceback:
in `lint` goal
ProcessExecutionFailure: Process 'Run `scalafmt` on 5 files.' failed with exit code 1.
stdout:
stderr:
Downloading <https://github.com/coursier/jvm-index/raw/master/index.json>
Downloaded <https://github.com/coursier/jvm-index/raw/master/index.json>
Exception in thread "main" java.lang.Exception: Error while getting <https://github.com/coursier/jvm-index/raw/master/index.json>: download error: Caught java.net.ConnectException (Connection timed out) while downloading <https://github.com/coursier/jvm-index/raw/master/index.json>
at coursier.jvm.JvmIndex$.$anonfun$load$5(JvmIndex.scala:142)
at coursier.jvm.JvmIndex$.$anonfun$load$5$adapted(JvmIndex.scala:140)
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.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base@17.0.5/java.lang.Thread.run(Thread.java:833)
at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
pantsbuild/pants