alexarchambault on 1.6.3
alexarchambault on master
1.6.3 (compare)
lihaoyi on gh-pages
5ad9ae5538f23cab92ccd8c6b1617d8… (compare)
alexarchambault on master
Partly revert 84d48542 (#923) … (compare)
It depends on your definition :) Intellij has improved a lot recently, Metals is a bit more lightweight and more controllable, it matches build definition and compiler output better.
It doesn't have the vast array of IJ's refactorings, but its support for worksheets and ammonite is much better. I don't miss the refactorings because more complex ones constantly break something for me :)
JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 && mill -i "amm[2.12.6].run"
@yilinwei
Why don't you just create a binary using Graal? and just compile the scripts normally.
Thanks, but I'm not sure how, and I'm not I want to bite off GraalVM for this. I have working Docker images now, where the scripts are run via ammonite. The only issue is that when the container runs, it recompiles everything every time.
read[Seq[Map[String, String]]](str)
. When calling this function from inside of ammonite shell I get errorimport $ivy.`org.datasyslab:geospark:1.3.2-SNAPSHOT`
Hi!
I'm trying to run this ammonite script and it doesn't see an instance of Concurrent for cats.effect.IO:
import coursierapi.MavenRepository
interp.repositories.update(
interp.repositories() ::: List(MavenRepository.of("~/.m2/local"))
)
import $ivy.`org.typelevel::cats-effect:2.3.1`, cats._, cats.effect.IO._, cats.effect._, cats.syntax.flatMap._, cats.syntax.functor._
import $ivy.`org.codehaus.janino:janino:3.1.2`
import $ivy.`org.jgrapht:jgrapht-core:1.5.0`
import $ivy.`ch.qos.logback:logback-classic:1.2.3`
import $ivy.`io.monix::monix:3.3.0`, monix.eval._, monix.execution.Scheduler.global
import $ivy.`com.typesafe.scala-logging::scala-logging:3.9.2`, com.typesafe.scalalogging._
import $ivy.`org.scalatest::scalatest:3.2.3`
import $ivy.`com.softwaremill.sttp.client3::core:3.0.0`, sttp.client3.SttpBackend
import $ivy.`com.softwaremill.sttp.client3::async-http-client-backend-cats:3.0.0`, sttp.client3.asynchttpclient.cats.AsyncHttpClientCatsBackend
import $ivy.`com.softwaremill.sttp.client3::circe:3.0.0`
import $ivy.`my.custom.local::artifact:1.0.0`, my.custom.local.artifact.alg._, my.custom.local.artifact.graph._, my.custom.local.artifact.input._
import cats.MonadError
import cats.effect.IO._
import cats.effect._
import cats.syntax.flatMap._
import cats.syntax.functor._
import com.typesafe.scalalogging.StrictLogging
import monix.eval._
import monix.execution.Scheduler.global
import my.custom.local.artifact.alg.CycleFinderImpl
import my.custom.local.artifact.flow._
import my.custom.local.artifact.graph.GraphBuilderImpl
import my.custom.local.artifact.input._
import sttp.client3.SttpBackend
import sttp.client3.asynchttpclient.cats.AsyncHttpClientCatsBackend
import scala.concurrent.ExecutionContext
import my.custom.local.artifact.MainCatsEffectIOImpl
MainCatsEffectIOImpl.run()
Error:
java.lang.NullPointerException: Cannot invoke "cats.effect.IO.map(scala.Function1)" because "fa" is null
cats.effect.IOLowPriorityInstances$IOEffect.map(IO.scala:870)
cats.effect.IOLowPriorityInstances$IOEffect.map(IO.scala:863)
cats.Functor$Ops.map(Functor.scala:233)
cats.Functor$Ops.map$(Functor.scala:233)
cats.Functor$ToFunctorOps$$anon$4.map(Functor.scala:250)
my.custom.local.artifact.Main.<init>(Main.scala:29)
my.custom.local.artifact.MainCatsEffectIOImpl$.run(Main.scala:61)
ammonite.$sess.cmd24$.<clinit>(cmd24.sc:1)
What do I do wrong?
That's the only two things in my experience that don't play nice with Ammonite in particular.
If that fails, I'd recommend minimising your implementation (to demonstrate a problem with CE, if there is one) and providing code in typelevel/cats-effect room.
null
is returned instead of IO[A]
.