Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working in Windows, but found a workaround #1387

Open
philwalk opened this issue Nov 24, 2023 · 0 comments
Open

not working in Windows, but found a workaround #1387

philwalk opened this issue Nov 24, 2023 · 0 comments

Comments

@philwalk
Copy link

philwalk commented Nov 24, 2023

This is mostly to document a fix for the following ammonite launch problem.
My environment:
Windows 11
Problem seems to be independent of the type of terminal session (CMD.EXE, cygwinormsys64 bash session)

# amm.bat -v
Ammonite REPL & Script-Runner, 3.0.0-M0-59-cdeaa580

I was getting the following crash, regardless of which Windows environment or how I launch ammonite:
With amm.bat or cs launch ammonite, (cs version 2.1.8).

Following the crash, I delete ~/.ammonite and the problem goes away.

details of crash with stackdump
philwalk@d5 MINGW64 ~/workspace/pallet
# cs launch ammonite
Loading...
Compiling C:\Users\philwalk\.ammonite\predef.sc
Exception in thread "main" java.lang.Exception: Failed to resolve ivy dependencies:Error downloading com.lihaoyi:ammonite-shell_2.13.12:3.0.0-M0-59-cdeaa580
  not found: C:\Users\philwalk\.ivy2\local\com.lihaoyi\ammonite-shell_2.13.12\3.0.0-M0-59-cdeaa580\ivys\ivy.xml
  not found: https://repo1.maven.org/maven2/com/lihaoyi/ammonite-shell_2.13.12/3.0.0-M0-59-cdeaa580/ammonite-shell_2.13.12-3.0.0-M0-59-cdeaa580.pom
        at ammonite.interp.Interpreter$DefaultLoadJar.ivy(Interpreter.scala:644)
        at ammonite.predef.predef$.(C:\Users\philwalk\.ammonite\predef.sc:4)
        at ammonite.predef.predef.$main(C:\Users\philwalk\.ammonite\predef.sc)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at ammonite.runtime.Evaluator$.ammonite$runtime$Evaluator$$anon$2$$_$evalMain$$anonfun$1(Evaluator.scala:108)
        at ammonite.util.Util$.withContextClassloader(Util.scala:24)
        at ammonite.runtime.Evaluator$$anon$2.evalMain(Evaluator.scala:109)
        at ammonite.runtime.Evaluator$$anon$2.processScriptBlock$$anonfun$1(Evaluator.scala:153)
        at ammonite.util.Catching.map(Res.scala:117)
        at ammonite.runtime.Evaluator$$anon$2.processScriptBlock(Evaluator.scala:156)
        at ammonite.interp.Interpreter.processSingleBlock$$anonfun$1$$anonfun$2$$anonfun$1(Interpreter.scala:334)
        at ammonite.util.Res$Success.flatMap(Res.scala:62)
        at ammonite.interp.Interpreter.processSingleBlock$$anonfun$1$$anonfun$2(Interpreter.scala:344)
        at ammonite.util.Res$Success.flatMap(Res.scala:62)
        at ammonite.interp.Interpreter.processSingleBlock$$anonfun$1(Interpreter.scala:344)
        at ammonite.util.Catching.flatMap(Res.scala:115)
        at ammonite.interp.Interpreter.processSingleBlock(Interpreter.scala:344)
        at ammonite.interp.Interpreter.processModule$$anonfun$3$$anonfun$1$$anonfun$2(Interpreter.scala:402)
        at ammonite.interp.Interpreter.compileRunBlock$1$$anonfun$2(Interpreter.scala:530)
        at ammonite.util.Res$Success.flatMap(Res.scala:62)
        at ammonite.interp.Interpreter.compileRunBlock$1(Interpreter.scala:536)
        at ammonite.interp.Interpreter.$anonfun$7$$anonfun$2$$anonfun$1(Interpreter.scala:577)
        at ammonite.util.Res$Success.flatMap(Res.scala:62)
        at ammonite.interp.Interpreter.$anonfun$7$$anonfun$2(Interpreter.scala:578)
        at ammonite.util.Res$Success.flatMap(Res.scala:62)
        at ammonite.interp.Interpreter.$anonfun$7(Interpreter.scala:578)
        at scala.Option.getOrElse(Option.scala:201)
        at ammonite.interp.Interpreter.loop$1(Interpreter.scala:579)
        at ammonite.interp.Interpreter.processAllScriptBlocks(Interpreter.scala:609)
        at ammonite.interp.Interpreter.processModule$$anonfun$3$$anonfun$1(Interpreter.scala:404)
        at ammonite.util.Catching.flatMap(Res.scala:115)
        at ammonite.interp.Interpreter.processModule$$anonfun$3(Interpreter.scala:414)
        at ammonite.util.Res$Success.flatMap(Res.scala:62)
        at ammonite.interp.Interpreter.processModule(Interpreter.scala:414)
        at ammonite.interp.Interpreter.initializePredef$$anonfun$3(Interpreter.scala:143)
        at ammonite.interp.Interpreter.$anonfun$adapted$1(Interpreter.scala:143)
        at ammonite.interp.PredefInitialization$.apply$$anonfun$1(PredefInitialization.scala:79)
        at ammonite.util.Res$.fold$$anonfun$1(Res.scala:32)
        at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
        at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
        at scala.collection.immutable.List.foldLeft(List.scala:79)
        at ammonite.util.Res$.fold(Res.scala:33)
        at ammonite.interp.PredefInitialization$.apply(PredefInitialization.scala:90)
        at ammonite.interp.Interpreter.initializePredef(Interpreter.scala:145)
        at ammonite.repl.Repl.initializePredef(Repl.scala:149)
        at ammonite.Main.run(Main.scala:230)
        at ammonite.MainRunner.runRepl$$anonfun$1(MainRunner.scala:72)
        at ammonite.MainRunner.watchLoop(MainRunner.scala:53)
        at ammonite.MainRunner.runRepl(MainRunner.scala:72)
        at ammonite.AmmoniteMain$.main0(AmmoniteMain.scala:92)
        at ammonite.AmmoniteMain$.main(AmmoniteMain.scala:31)
        at ammonite.AmmoniteMain.main(AmmoniteMain.scala)
# mv ~/.ammonite/ ~/dot-ammonite

philwalk@d5 MINGW64 ~/workspace/pallet
# cs launch ammonite
Loading...
Welcome to the Ammonite Repl 3.0.0-M0-59-cdeaa580 (Scala 3.3.1 Java 11.0.20)
@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant