[erlang-bugs] asn1ct: cant build asn files with names which does not agree with module name

Björn Gustavsson bjorn@REDACTED
Mon May 11 06:11:49 CEST 2015


On Sun, May 10, 2015 at 8:06 AM, yannay livneh <yannayl@REDACTED> wrote:
> Hello,
>
> asn1ct can't build asn1 file which contain module with name that is not the
> basename of the file.

Yes. asn1ct assumes that the name of the ASN.1 spec and
the basename of the file are the same. If there is an
IMPORT statement in an ASN.1 spec, asn1ct will assume
that the spec to be included is in a file whose basename is
the same as the name of the spec. Therefore, it would not
be trivial to lift the restriction that basename of the file and
the of the ASN.1 spec must be the same.

Therefore, you must rename your spec file to
RFC1157-SNMP.asn.

However, there is a way to force the name of the
generated erlang module to be named 'snmp'.
See the description of multi-file compilation in the
User's Guide. Here is a direct link:

http://www.erlang.org/doc/apps/asn1/asn1_ug.html#id62887

(This link works now but we still stop working when we
release OTP 18.)

/Björn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-bugs mailing list