Skip to content

3.24.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 29 Aug 12:18
3.24.0
74c766d

New features:

Bug fixes:

Internal maintenance:

Regarding rich compiler errors, the change is optional.

Given the module:

-module(fake_mod).

-export([diagnostic/1]).

diagnostic(A) ->
    X = add(5 / 0),
    {X,X}.

add(X) -> X.

add(X, Y) -> X + Y.

Calling rebar3 compile can now yield:

...
===> Compiling apps/rebar/src/fake_mod.erl failed
   ┌─ apps/rebar/src/fake_mod.erl:
   │
 5 │  diagnostic(A) ->
   │             ╰── variable 'A' is unused

   ┌─ apps/rebar/src/fake_mod.erl:
   │
 6 │      X = add(5 / 0),
   │                ╰── evaluation of operator '/'/2 will fail with a 'badarith' exception

    ┌─ apps/rebar/src/fake_mod.erl:
    │
 11 │  add(X, Y) -> X + Y.
    │  ╰── function add/2 is unused

and in a terminal supporting color output:

By default, this format is turned on, but can be turned off optionally by configuring values with

{compiler_error_format, minimal}.

If this breaks your tooling, you may want to put it in your global rebar3 config file.