[erlang-questions] Dialyzer, Callback info about the behaviour is not available
Magnus Klaar
magnus.klaar@REDACTED
Thu Jan 5 22:08:43 CET 2012
Hi!
We created a development branch for adding this information to this, and
other behaviors and came to the same conclusion, we'd have to drop R14
support, something which we cannot do when we know that there are users who
still haven't upgraded their production environments to R15. It was a
rather negative surprise to see the build fail after having put great care
into making sure the -callback specifications were accurate. ;)
Since we're on the subject, is there currently a good way to add
specifications for optional callback functions? I noticed that there is no
specification for the format_status/2 callback in the gen_* behaviors.
We're interested in this for our REST resources. The basho guys have a
great description of this type of interface at
http://wiki.basho.com/Webmachine-Resource.html . The main point is "There
are over 30 resource functions you can define, but any of them can be
omitted as they have reasonable defaults.".
MVH Magnus
On Thu, Jan 5, 2012 at 11:40 AM, Kostis Sagonas <kostis@REDACTED> wrote:
>
> and it appears to be very minimal. (As a matter of fact, I am a bit
> baffled by its minimality.) To avoid this warning the developers of cowboy
> need to adapt its code so that it contains -callback attributes instead of
> a behaviour_info/1 function. (This function will be generated automatically
> if callback attributes are present.) But of course this will mean that
> cowboy will require R15B. Until this change is done, you can either create
> your own version of this module with proper callback information in it, or
> use the -Wno_behaviours command line option of dialyzer.
>
> Kostis
>
> ______________________________**_________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120105/a4e36a60/attachment.htm>
More information about the erlang-questions
mailing list