You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the entry in the release notes of 1.0.0 (congrats on the release 🎉 ):
interp.load.exec and interp.load.apply have been moved to repl.load.exec and repl.load.apply, and are now not available when running scripts: they never had a really well-defined semantic when run within scripts. Using repl.load.exec or repl.load.apply within the predef.sc of your REPL is still possible
I updated my predef.sc accordingly and the file I exec is executed, but its definitions aren't available in the REPL session as expected. My predef.sc is as follows:
repl.prompt() ="\n> "
interp.configureCompiler(_.settings.nowarnings.value =false)
// Load utility definitions I share with default scala REPLtry repl.load.exec(ammonite.ops.home/".config"/'scala/"replinit.scala")
catch { case_: Exception=> println("=== replrc not loaded! ===") }
$ amm
Loading...
Compiling /Users/ches/(console)
===== Running replinit exec =====
Welcome to the Ammonite Repl 1.0.0
(Scala 2.12.2 Java 1.8.0_112)
If you like Ammonite, please support our development at www.patreon.com/lihaoyi
> accessible
cmd1.sc:1: not found: value accessible
val res1 = accessible
^
Compilation Failed
> repl.load.exec(ammonite.ops.home/".config"/'scala/"replinit.scala")
Compiling /Users/ches/(console)
===== Running replinit exec =====
> accessible
res3: String = "yay"
The text was updated successfully, but these errors were encountered:
ches
added a commit
to ches/dotfiles
that referenced
this issue
Jul 8, 2017
I noticed the entry in the release notes of 1.0.0 (congrats on the release 🎉 ):
I updated my
predef.sc
accordingly and the file Iexec
is executed, but its definitions aren't available in the REPL session as expected. Mypredef.sc
is as follows:If the
replinit.scala
contains this:Then:
The text was updated successfully, but these errors were encountered: