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

A compiler (warning?) message could be clearer #8599

Open
michaelklishin opened this issue Jun 20, 2024 · 1 comment
Open

A compiler (warning?) message could be clearer #8599

michaelklishin opened this issue Jun 20, 2024 · 1 comment
Assignees
Labels
enhancement help wanted Issue not worked on by OTP; help wanted from the community team:VM Assigned to OTP team VM

Comments

@michaelklishin
Copy link
Contributor

michaelklishin commented Jun 20, 2024

When gen_batch_server is compiled with erlc from Erlang/OTP 26.2.x, the compiler emits the following:

gen_batch_server.erl:269: Warning: INFO: receive matches any message, this is always fast
gen_batch_server.erl:323: Warning: INFO: receive matches any message, this is always fast

I find this message to not be particularly helpful. Two specific complaints:

  1. Is this a warning? is this an info message? It says both
  2. This is likely meant to be a warning but it says "this is always fast" which is usually something to strive for

So what is this message trying to tell me? With the current wording I have to guess.

@michaelklishin michaelklishin added the bug Issue is reported as a bug label Jun 20, 2024
@jhogberg
Copy link
Contributor

Thanks for your report!

The messages printed by bin_opt_info and recv_opt_info are returned as warnings to keep things simpler internally. The compiler currently lacks a mechanism for purely informational messages, and we're thinking of adding one in the future -- it's just fairly low priority at the moment.

In the meantime, whenever you see Warning: INFO:, read it as INFO:. :-)

@jhogberg jhogberg removed the bug Issue is reported as a bug label Jun 20, 2024
@jhogberg jhogberg self-assigned this Jun 20, 2024
@jhogberg jhogberg added enhancement help wanted Issue not worked on by OTP; help wanted from the community labels Jun 20, 2024
@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted Issue not worked on by OTP; help wanted from the community team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

3 participants