Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug?: Confusing behaviour when combining --optimize with --output=/dev/null #2324

Open
dave4420 opened this issue May 6, 2024 · 1 comment

Comments

@dave4420
Copy link

dave4420 commented May 6, 2024

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.

Copy link

github-actions bot commented May 6, 2024

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions in a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant