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

Fixup: rich compiler output in warnings #2795

Merged
merged 1 commit into from
May 24, 2023

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented May 24, 2023

I hadn't seen this because all my projects use warnings_as_errors, but the warnings were never properly wired up.

This patch fixes that by adding the proper callbacks and invoking them from the 3 erlang-related compilers we support.

Sample run:

→ rebar3 as test compile
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling revault
===> Compiling maestro
    ┌─ apps/revault/test/id_shim.erl:
    │
 23 │  id_ask(From, To) ->
    │               ╰── Warning: variable 'To' is unused


===> Analyzing applications...
===> Compiling extra_test

This might look a bit like an error but yeah, not a good way to bypass that for now without further re-structuring of the code.

I hadn't seen this because all my projects use warnings_as_errors, but
the warnings were never properly wired up.

This patch fixes that by adding the proper callbacks and invoking them
from the 3 erlang-related compilers we support.
@ferd ferd merged commit c2bcce4 into erlang:main May 24, 2023
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

Successfully merging this pull request may close these issues.

1 participant