Setup:
src/Main.elm:
module Main exposing (main)
main : Program () () ()
main = Debug.todo "eventually"
I run elm make src/Main.elm --optimize --output=/dev/null.
Expected behaviour
The compiler gives me an error (including exiting with a non-zero status code), just as it would if I had specified --output=some.js.
Actual behaviour
The compiler prints Success! to stdout and exits with status 0.
Versions
- Elm: 0.19.1
- Operating System: macOS Sonoma 14.4.1
Additional Details
This appears to be caused by the compiler not generating code when given --output=/dev/null, and therefore not checking whether the Debug module is used.
An alternative would be to output a message in this case saying that --optimize --output=/dev/null does not check that --optimize --output=some-file.js would succeed, only that the source code typechecks.