7

Say I'm writing a new module, the code isn't ready yet and I want to test something in the repl. I run iex -S mix and it fails because of compilation errors I didn't intend to fix yet.

I presume there is a last compiled version of my app that I could run with iex. How do I do that?

Morozov
  • 2,719
  • 2
  • 21
  • 23
  • I could start an `iex` session before changing the files but I often forget to do so. Also I could reset the project state with git but maybe there's an easier way. – Morozov Jan 15 '18 at 11:03

1 Answers1

18

mix is a shortcut to mix run. If you invoke mix help run, you will see there are many options there, including a --no-compile one. Therefore:

iex -S mix run --no-compile
José Valim
  • 50,409
  • 12
  • 130
  • 115