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
RuntimeException from REPL predef only after compilation is cached #472
Comments
Ah, yeah, the "don't initialize compiler until needed" logic probably made this break. The solution would be to add a call to if (interp.compiler == null) interp.init() Into this function: @ches if you have time, check out the repo and see if this fixes your problem. If it works send a PR |
A better solution would be to make for(c <- interp.compiler) c().settings.nowarnings.value = ... That would make our compiler-setup code properly trigger the first time the compiler gets initialized, without forcing initialisation of the compiler when not necessary. The |
The first fix you suggested did solve the issue. I started to look around for whether there are tests around this area of code but I have essentially no familiarity with the codebase and running the full suite was proving to be an exercise in patience, I roamed off to other things I'll take another look at your second suggestion when I can devote some time to really understanding what I'm doing in there… |
Fixed by c6a282d |
I've just upgraded to 0.7.6 and adapted my
predef.sc
for changes likeinterp
namespacing, etc.When I freshly
rm -rf ~/.ammonite/cache
and runamm
, everything compiles and my predef works. Once I quit that REPL instance, it won't start again. Wiping the cache again fixes it, once.My
~/.ammonite/predef.sc
looks like this:And the backtrace on every
amm
run after the first looks like this:The text was updated successfully, but these errors were encountered: