Dialyzer nowarn_funtion attribute not working in all cases on OTP-26

Before OTP-26 this:

resulted in no warning from dialyzer. On 26 I get the warning the attribute is meant to silence:

Line 200 Column 9: Unknown function release_handler:which_releases/1

Before I open an isusue on the OTP repo I figured I’d check here if I’m just missing something…

Note that there are many other uses of -dialyzer in the project but they do not fail.

I’m also seeing warnings from dependencies…

Line 21 Column 28: Unknown type timer:time/0
Line 21 Column 42: Unknown type timer:time/0

But not sure yet if thats an issue in dialyzer or rebar3, but noting here in case others are seeing this as well.

1 Like

The last one is because Dialyzer switched to having the unknown option as a default; the timer:time/0 type is unexported but the ctx library has a fix in main about that (Type timer:time() is not exported from timer module · tsloughter/ctx@e3acf4d · GitHub).

I have added support for the no_unknown option in my Rebar3 PR (OTP-26-rc1 support: Fix incremental dialyzer usage, and make it even more incremental by ferd · Pull Request #2774 · erlang/rebar3 · GitHub) – which strips it in older Dialyzer versions to avoid errors for compatibility.



And for others reading this I’ll note here we discussed elsewhere that the -dialyzer({nowarn... should work to silence that warning, instead of having to disable unknown entirely with no_unknown, so I guess I’ll be opening an issue on the Erlang repo later today.

1 Like

Thanks for opening the issue. I am looking into it :slight_smile:

1 Like

this PR should fix it. Merging tomorrow if it passes all tests (which it does locally)