com-lihaoyi / Ammonite

Scala Scripting
http://ammonite.io
MIT License
2.6k stars 367 forks source link

(Ammonite/REPL) add command to recompile the project and drop back to ammonite #327

Closed matanox closed 8 years ago

matanox commented 8 years ago

It would be a major productivity booster if one could recompile the project without exiting the ammonite REPL, or more practically, have an ammonite REPL command that closes the REPL, compiles (or runs some other arbitrary sbt command), then drops back into the ammonite REPL for the same sbt sub-project as it was originally launched for.

Manually going through this is quite very tedious and urges a productivity boost.

If only an atomic command to drop out of the REPL & execute an sbt command was added in the ammonite REPL, the rest would be a piece of cake and mostly solved.

lihaoyi commented 8 years ago

Have you tried sbt ~subproject/test:run? Then it's just exit and it'll re-compile and re-run ammonite for you

matanox commented 8 years ago

Thanks, that's a good idea indeed. I can make it a custom sbt task even.