Re: [elixir-core:9288] Normalize compile errors and warnings

2019-11-27 Thread Mijail Rondon
Oh, I get it, thanks for the replies and explanation. Thinking about it, you are right, because is not a machine making the code, it is a human. So the machine should be able to parse that, it's not hard. I make a change in the PR of GitHub Actions to parse warnings too.

Re: [elixir-core:9287] Normalize compile errors and warnings

2019-11-27 Thread José Valim
Correct. We had this discussion before and we reached some important conclusions: * warnings and errors should be visually distinct * output should favor human readability rather than being parseable by machines * because compiling Elixir code is the same as running Elixir code, compilation can

Re: [elixir-core:9286] Normalize compile errors and warnings

2019-11-27 Thread eksperimental
> Currently we have different ways to display errors or warnings during > compile time, we should normalize the output. I would say currently there is one way to displays errors and one way to display warnings. I think it is important to keep different formats to visually differentiate them

Re: [elixir-core:9285] Re: Normalize compile errors and warnings

2019-11-27 Thread Louis Pilfold
I agree there may not be any reason to introduce more formats, but Elixir is now stable so we may want to think twice before we change any existing output formats. I quite like the idea of having a flag that can be given to cause all output to be emitted in a structured format (such as JSON or

Re: [elixir-core:9284] PROPOSAL: Improvements to doctests with pattern matching

2019-11-27 Thread José Valim
Good call! What if we simply convert any line where = is the root expression and the left-side is not a variable to an assertion? The rationale is that this is an ok doctest: iex> {:error, _} = do_something(var, 0) iex> :ok = do_something(var, 1) And we would most likely want to raise

[elixir-core:9284] PROPOSAL: Improvements to doctests with pattern matching

2019-11-27 Thread Devon Estes
I think doctests are extremely helpful and powerful since they encourage developers to write testable, accurate documentation for their code. But the lack of some of the niceties that exist in ExUnit might make it less likely for developers to choose doctests instead of ExUnit tests, so I've

Re: [elixir-core:9282] Re: Normalize compile errors and warnings

2019-11-27 Thread Mijail Rondon
There is not a prevention to parse both formats but also there is not a reason to have 2 formats. Currently to handle the warnings and errors anyone who want to do that have to create 2 regex to handle each one, with one format you only need one. I think there is not a problem if we normalize