Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 30 2019 14:37
    bhaskarmelkani starred lihaoyi/Ammonite
  • Jan 29 2019 04:27
    JYInMyHeart starred lihaoyi/Ammonite
  • Jan 29 2019 04:27
    JYInMyHeart starred lihaoyi/Ammonite
  • Jan 28 2019 15:07
    ishubelko starred lihaoyi/Ammonite
  • Jan 25 2019 22:38
    borissmidt starred lihaoyi/Ammonite
  • Jan 25 2019 17:12

    alexarchambault on 1.6.3

    (compare)

  • Jan 25 2019 17:11

    alexarchambault on master

    1.6.3 (compare)

  • Jan 25 2019 15:48
    alexarchambault commented #923
  • Jan 25 2019 01:15

    lihaoyi on gh-pages

    5ad9ae5538f23cab92ccd8c6b1617d8… (compare)

  • Jan 25 2019 00:50

    alexarchambault on master

    Partly revert 84d48542 (#923) … (compare)

  • Jan 25 2019 00:50
    alexarchambault closed #923
  • Jan 25 2019 00:50
    alexarchambault closed #920
  • Jan 25 2019 00:50
    alexarchambault closed #922
  • Jan 24 2019 23:13
    lihaoyi commented #923
  • Jan 24 2019 22:39
    alexarchambault closed #921
  • Jan 24 2019 22:39
    alexarchambault commented #921
  • Jan 24 2019 22:39
    alexarchambault edited #923
  • Jan 24 2019 22:38
    alexarchambault opened #923
  • Jan 24 2019 22:37
    david-bouyssie commented #919
  • Jan 24 2019 21:33
    nksureshkumar commented #922
Chris Kipp
@ckipp:matrix.org
[m]
btw since I know you use Neovim, you can also always double check this using the built in coursier stuff in the scala-utils plugin, right inside Neovim
Jesse Atkinson
@jsatk
🤦‍♂️ thank you. Embarrassing. Wonder where I got that version number from then.
Thank you as always
Jesse Atkinson
@jsatk
apologies, but i'm still very confused. I set the versions correct as far as I know http://i.jsatk.us/u3SHxc
It looks like it thinks I'm on scala 3?
Jesse Atkinson
@jsatk
Looking for how to tell ammonite to use scala 2.13
Jesse Atkinson
@jsatk
hm. I tried cs launch ammonite:2.1.4 --scala 2.13.2 but I get the same errors.
Chris Kipp
@ckipp:matrix.org
[m]
@jsatk: you'll want to put the version in there as well, like cs launch com.lihaoyi:ammonite_2.13.4:2.1.4 ammonite.Main -- script.sc
Jesse Atkinson
@jsatk
@ckipp:matrix.org what's the ammonite.Main bit?
I read through most of the Ammonite docs yesterday and't still couldn't quite figure it out.
Chris Kipp
@ckipp:matrix.org
[m]
so that part specifically is coursier, not ammonite
afaik, ammonite doesn't have a great way to dynamically switch Scala versions, since by default it will use the version of Scala that it was installed with. In your case 3.x it looks like
so a way to get around that is to launch ammonite with coursier so you can directly easily specify the version of Scala and the version of ammonite
Jesse Atkinson
@jsatk
Ah. I needed the flag with -M ammonite.Main
Chris Kipp
@ckipp:matrix.org
[m]
ahhh sorry!
Jesse Atkinson
@jsatk
I'm still getting the exact same issues. :(
$ cs launch com.lihaoyi:ammonite_2.13.0:2.1.4 -M ammonite.Main
Loading...
Failed to resolve ivy dependencies:Error downloading org.typelevel:cats-core_2.13:2.13.0
  not found: /Users/jesse.atkinson/.ivy2/local/org.typelevel/cats-core_2.13/2.13.0/ivys/ivy.xml
  not found: https://repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.13.0/cats-core_2.13-2.13.0.pom
Error downloading io.catbird:catbird-finagle_2.13:2.12.0
  not found: /Users/jesse.atkinson/.ivy2/local/io.catbird/catbird-finagle_2.13/2.12.0/ivys/ivy.xml
  not found: https://repo1.maven.org/maven2/io/catbird/catbird-finagle_2.13/2.12.0/catbird-finagle_2.13-2.12.0.pom
Error downloading org.typelevel:cats-effect_2.13:2.13.0
  not found: /Users/jesse.atkinson/.ivy2/local/org.typelevel/cats-effect_2.13/2.13.0/ivys/ivy.xml
  not found: https://repo1.maven.org/maven2/org/typelevel/cats-effect_2.13/2.13.0/cats-effect_2.13-2.13.0.pom
Do I have some version set wrong here or...?
Chris Kipp
@ckipp:matrix.org
[m]
:) the issue is actually the same
for example let's take cats-core as an example
you're trying to pull in 2.13.0 published for 2.13
however, there is no 2.13.0 that is published for 2.13
you can see this with cs complete org.typelevel:cats-core_2.13:
Jesse Atkinson
@jsatk
Now I get it.
holy cow. This is...
not intuitive.
Earlier I ran just cs complete org.typelevel:cats-core and that's how I got 2.13. Didn't realize I needed to specify that bit to see what versions are available for scala 2.13.
Sorry. Clearly I'm still a newbie with the tooling.
Chris Kipp
@ckipp:matrix.org
[m]
yea so not to go too far into cs on an Ammonite channel, but complete completes as far as it can basically until a :, so your completion should have given you any artifact that starts with cats-core including the cross endings of _2.13 etc. If you want the specific version of scala specified, then always make sure to use the full org:artifact_withscalversion:
so cs complete org.typelevel:cats-core_2.13: for the 2.13 artifacts and cs complete org.typelevel:cats-core_3: for the Scala 3 artifacts
or just look on maven central or another webpage if a gui is more your thing
but I know it's not 😉
Jesse Atkinson
@jsatk
java.lang.BootstrapMethodError: java.lang.NoSuchMethodError: scala.collection.immutable.List.$anonfun$flatMap$1$adapted(Lscala/runtime/BooleanRef;Lscala/runtime/ObjectRef;Lscala/runtime/ObjectRef;Ljava/lang/Object;)Ljava/lang/Object; scala.tools.nsc.PhaseAssembly$DependencyGraph.compilerPhaseList(PhaseAssembly.scala:101) scala.tools.nsc.PhaseAssembly.computePhaseAssembly(PhaseAssembly.scala:230)
I got past the previous step. Now I get ☝️
My goals are, I think, simple. I want to run ammonite with scala version 2.13 (and sometimes 2.12) and I want it to have the cats libraries available globally.
Jesse Atkinson
@jsatk
@lihaoyi I'm working through "Hands-On Scala" right now. How would I use the version of ammonite and scala specified therein? I believe all the examples in the book are for scala 2.
Jesse Atkinson
@jsatk
@lihaoyi-databricks is there really no way to use the ammonite + scala version in "Hands-On Scala" together right now?
Eric K Richardson
@ekrich
Have you seen this - com-lihaoyi/Ammonite#1093
Eric K Richardson
@ekrich
cc @jsatk
Li Haoyi
@lihaoyi
I honestly don't know anything about cats, and havent tested it with the instructions in the book. You should be able to work through the entire book without cats
you're free to try to get it working, but it's not the common path, and you need to know that you'll need to sort through any issues that arise
looks to me like you have some wrong scala version on the classpath somewhere
that's likely a result of trying to get both scala 212 and 213 working
might be a bug in Ammonite, but an easy workaround is to jusy stick with 2.13 wrt the book
213 is the common path; you can try other things later
Eric K Richardson
@ekrich
I agree, you should definitely use 2.13 unless you can't. No need to learn older stuff unless you have to.
Chris Kipp
@ckipp:matrix.org
[m]
I don't think this is necessarily a cats thing that @jsatk is bringing up. Since the added support for Scala 3 there has been some major regressions. For example when using the latest version with 2.13, you can't import Try, stuff like that com-lihaoyi/Ammonite#1182
so even if you use 2.13 without Cats, be cautious of some of these errors that are popping up
Eric K Richardson
@ekrich
Oh yes, that is a bummer.