[erlang-questions] Erlang 17 issue with dialyzer and nowarn_deprecated_type

Shayan Pooya shayan@REDACTED
Sat Apr 12 03:58:05 CEST 2014


Kenji:
Thanks for the response, but my question was about the dialyzer error
*with* this option given to the compiler.


On Fri, Apr 11, 2014 at 9:16 PM, Kenji Rikitake <kenji@REDACTED> wrote:

> See OTP-10342 at http://www.erlang.org/download/otp_src_17.0.readme.
>
> Quote:
>
> A compiler option, nowarn_deprecated_type, has been
> introduced. By including the attribute
>
> -compile(nowarn_deprecated_type).
>
> in an Erlang source file, warnings about deprecated types can
> be avoided in Erlang/OTP 17.0.
>
> The option can also be given as a compiler flag:
>
> erlc +nowarn_deprecated_type file.erl
>
> Unquote.
>
> Kenji Rikitake
>
> ++> Shayan Pooya <shayan@REDACTED> [2014-04-11 10:03:05 -0400]:
> > Date: Fri, 11 Apr 2014 10:03:05 -0400
> > From: Shayan Pooya <shayan@REDACTED>
> > To: "erlang-questions@REDACTED" <erlang-questions@REDACTED>
> > Subject: [erlang-questions] Erlang 17 issue with dialyzer and
> >  nowarn_deprecated_type
> >
> > Hello,
> >
> > In order to make Disco compile with Erlang 17 without warnings, I added
> > nowarn_deprecated_type to silence the warnings.  However, after doing so,
> > dialyzer fails with the following error:
> >
> > ddfs_master.erl:345: Attempt to test for inequality between a term of
> type
> > 'false' and a term of opaque type 'false' | gb_set()
> >
> >
> > (
> >
> https://github.com/discoproject/disco/blob/develop/master/src/ddfs/ddfs_master.erl#L345
> > )
> >
> >
> > Oddly enough, a simple s/gb_set()/gb_sets:gb_set()/g in this file fixes
> > this issue but I do not want to do that since it breaks the builds for
> > older versions (and that's the reason nowarn_deprecated_type has been
> > added).
> >
> > Any suggestions?  The error message itself does not make much sense to
> me.
> >
> > Regards.
>
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140411/0df064d8/attachment.htm>


More information about the erlang-questions mailing list