[erlang-bugs] Specs missing or wrong in ssl, inet and gen_tcp

Ingela Anderton Andin <>
Wed May 4 10:54:37 CEST 2011


Hi!

Answer to the ssl-related parts of your mail.

Loïc Hoguin wrote:
> Hello,
>
> Just forwarding a few issues I've encountered with type specs in ssl,
> inet and gen_tcp. Hope you don't mind me sending all of them in a single
> email.
>
> I will try to send patches when I get some free time and would probably
> benefit from any comment you might make here.
>
> * https://github.com/erlang/otp/blob/dev/lib/ssl/src/ssl.erl
>
>   * socketoption() is incomplete: it can also accept atoms like binary,
>     list, inet6 or inet and also other kinds of tuples
>
>   
We will change it to term() for now, until  there exists a exported type 
that
we can use.
>   * socketoption() should probably depend on types defined
>     in gen_tcp and inet
>
>   * option() is defined as socketoption()|ssloption()|transportoption(),
>     problem is socketoption() is defined as a list of options while
>     others are tuples; socketoption() should be tuples too
>   
I agree there is a list too much.
> * https://github.com/erlang/otp/blob/dev/lib/kernel/src/gen_tcp.erl
>
>   * no specs at all, any plans on writing them? if not, any advice?
>
> * https://github.com/erlang/otp/blob/dev/lib/kernel/src/inet.erl#L109
>
>   * I'm assuming 'mode' is 'list' | 'binary' and not list() | binary()
>
> Thanks.
>
>   

Regards Ingela Erlang/OTP team - Ericsson AB


More information about the erlang-bugs mailing list