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
agateriver
@agateriver
why I got a dumb terminal in Win10 ?
PS C:\Users\Xie> amm
Loading...
Compiling C:\Users\Xie\.ammonite\predef.sc
Compiling C:\Users\Xie\.ammonite\predef.sc #2
7月 08, 2021 10:40:17 上午 org.jline.utils.Log logr
警告: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
Welcome to the Ammonite Repl 2.4.0 (Scala 2.13.6 Java 11.0.2)
martingd
@martingd

Writing a Ammonite script like this:

#!/usr/bin/env amm

//... imports, etc.

@main(doc = "one entrypoint")
def entryOne() = {
    ???
}

@main(doc = "another entrypoint")
def entryTwo() = {
    ???
}

Running it results in:

% ./test.sc 
Need to specify a sub command: entryOne, entryTwo

Is there a way to have Ammonite print a usage message including the doc from the @main annotation?

jeroentervoorde
@jeroentervoorde
Hi, i'm running ammonite (2.4.0) in thin mode ('amm --thin') to avoid a dependency problem with guava. That works but now i'm running into an issue that sun.misc.Unsafe does not exist. Is there some way i can load the jdk.unsupported module from my ammonite script?
LoranceChen
@LoranceChen
Hi, I'm use vscode+metals to wirte ammonite .sc files. But one sc file cannot recognize another one. does someone encounter same problem?
LoranceChen
@LoranceChen
Metals output: Request textDocument/completion failed. and first caused by Caused by: java.nio.file.NoSuchFileException: /mnt/d/project/testshell/.ammonite/scala-2.13.6/amm-2.4.0/File02/src/ammonite/$file/File02.scala. but currently under the File02.sc file.
LoranceChen
@LoranceChen
has post a issue to vscode_metal project on github. scalameta/metals-vscode#626
Jesse Atkinson
@jsatk
I'm on Ammonite 2.4.0. When I run amm it fails on start up with this error: "Failed to resolve ivy dependencies". My ~/.ammonite/predef.sc looks like this http://i.jsatk.us/FY5FlN
Any ideas?
Li Haoyi
@lihaoyi
@jsatk can you try separating it out into three different import $ivy statements? IIRC I've seen bugs with this sort of multi-import in the past
Jesse Atkinson
@jsatk
Will try @lihaoyi . To be transparent. I'm very ignorant of ivy. Do I need to ... set up an credentials?
Jesse Atkinson
@jsatk
same error @lihaoyi
James Kyle
@jameskyle
Curious if anyone's gottten spark 3, ammonite-spark working with the current version?
when I try I get exceptions like
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: ammonite/util/Frame
  org.apache.spark.sql.ammonitesparkinternals.AmmoniteSparkSessionBuilder.getOrCreate(AmmoniteSparkSessionBuilder.scala:209)
  ammonite.predef.predef$Helper.<init>(predef.sc:21)
  ammonite.predef.predef$.<init>(predef.sc:7)
  ammonite.predef.predef$.<clinit>(predef.sc)
Mason Lazalier Edmison
@masonedmison

Hi, I am new to ammonite and following the documentation I am unable to import using the magic ivy import. Importing the following

masonedmison-masonedmison@ import $ivy.`org.scalaz::scalaz-core:7.2.27` 
Failed to resolve ivy dependencies:Error downloading org.scalaz:scalaz-core_3:7.2.27
  not found: /Users/masonedmison/.ivy2/local/org.scalaz/scalaz-core_3/7.2.27/ivys/ivy.xml
  not found: https://repo1.maven.org/maven2/org/scalaz/scalaz-core_3/7.2.27/scalaz-core_3-7.2.27.pom

yields an error. Can someone please advice tips to troubleshoot this issue? Thanks in advance.

Chris Kipp
@ckipp:matrix.org
[m]
@masonedmison: it looks like that dep isn't available for Scala 3
the only availabel version published for Scala 3 is 7.4.0-M7
Mason Lazalier Edmison
@masonedmison
Very much a noob here, but did you just find the dependency available by searching... maven?
Thanks for the quick reply btw :)
Chris Kipp
@ckipp:matrix.org
[m]
nope, I use coursier via the command line
so for example from your error mesage I see that it's searching for Scala 3, so I used the complete functionality like this:
cs complete org.scalaz:scalaz-core_3:
7.4.0-M7
the only value returned is 7.4.0-M7, signifying that it's the only one published for Scala 3
Mason Lazalier Edmison
@masonedmison
Thanks Chris!
Li Haoyi
@lihaoyi
@jsatk looks like it may be some kind of scala3 issus. Can you search maven central (google "search maven central") to see if that artifact exists? it might not be published for scala3, or it may be ynder a different version
Jesse Atkinson
@jsatk
Thanks @lihaoyi-databricks I’ve been AFK for a bit but I will try more on Monday. I strongly suspect it’s my company’s VPN.
Chris Kipp
@ckipp:matrix.org
[m]
@jsatk: the same thing I just mentioned up above can also be done. I just took a peek, and 3.1.0 doesn't exist for Scala 3
cs complete org.typelevel:cats-effect_3:
2.5.1
3.1.1
3.2.0
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