Warning as errors doesn't work on undefined module warning?

I have warnings as errors enabled for my projects and it seemed to work - like removing an underscore from an unused variable led to an error.

We see, however, that the compiler emits undefined module warnings and then happily finishes compilation. This is elixir 1.10.4, btw. So we get compilation failures on trivial things like unused variables but not on using the wrong module or breaking the dependency chain.

We have exactly one temporary suppression in our code, it goes like this:
@compile {:no_warn_undefined, <specific module>} (and it’s a different module)

But even if I remove that one, I get yet another warning but still no compile error. I don’t see a global suppression either.

Is this warning not included in the ones that can cause errors?

2 Likes

That does seem odd. Could you create a reproducible example?