Erlang supports disabling a given warning using compilation configuration 
(see https://www.erlang.org/doc/man/compile.html). There are use cases for 
letting developers decide what they treat as a warning and what not. For 
instance, I'm using `--warnings-as-errors` when compiling the code for 
production. However, it is impossible to use `deprecated` tags anymore as 
the complication will fail. I treat deprecations special here because some 
refactorings can't be done in a single run or some of them don't make sense 
as the code is legacy anyway.

I know that there is a `doc deprecated: "..."` mechanism, but it just feels 
right to use `deprecated` and still allow the `--warnings-as-errors`. The 
difference between those two would be: no warning during the compilation, 
but still logging the message when invoking the function.

This could be implemented similarly to `no_warn_undefined` (see 
https://hexdocs.pm/elixir/1.14.0/Code.html#put_compiler_option/2).

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/0b7281bd-62ae-4a65-a153-eabfe90d5551n%40googlegroups.com.

Reply via email to