0

I just spent a lot of time hunting down a bug in Phoenix (1.3). The problem was in /my_app/content/post.ex, in a function called create_item/1. I compiled several times, but this function was not working correctly.

Finally I discovered that there was another function create_item/1 in the same file (a few hundred lines down), and that was the function that was being called.

As it turned out, this was a warning that the compiler was printing to iex, but running anyway. Is there any way to adjust the compiler's settings so that it does not allow running with warnings like this?

Mark Karavan
  • 2,654
  • 1
  • 18
  • 38
  • 2
    Possible duplicate of [Is it possible to get the compiler to exit early, failing the build, if a compile time warning is raised?](https://stackoverflow.com/questions/31982577/is-it-possible-to-get-the-compiler-to-exit-early-failing-the-build-if-a-compil) – Kevin Johnson Dec 18 '17 at 20:45
  • 2
    I assume you mean to say: `so that it does NOT allow running with warnings like this?` – Kevin Johnson Dec 18 '17 at 20:45
  • @KevinJohnson Yes, just changed that – Mark Karavan Dec 19 '17 at 14:48

0 Answers0