Age | Commit message (Collapse) | Author |
|
|
|
When the 'maps' option is given, the SEQUENCE and SET types are
represented as maps instead of as records. Optional and default values
must be not be given as asn1_NOVALUE or asn1_DEFAULT in a map passed
to the M:encode/2 function; they must be omitted from the
map. Similarly, when decoding missing values will be omitted from the
map.
No .hrl files will be generated when the 'maps' options is used.
That means values in an ASN.1 module must be retrieved by calling the
appropriate function in generated module.
Since we one day hope to get rid of the options 'compact_bit_string',
'legacy_bit_string', and 'legacy_erlang_types', we will not allow them
to be combined with the 'maps' option.
|
|
When attempting to build multiple ASN.1 modules in parallel (e.g. by
running 'make -j'), the ASN.1 compiler could crash because the names
of the .asn1db files clashed. For example, if A.asn1 and B.asn1 both
import from C.asn1, the compiler would write a C.asn1db file when
compiling A.asn1 and when compiling B.asn1.
We can avoid this problem if the compiler only writes the
module's own .asn1db file. That is, when compiling A.asn1,
the compiler would only write A.asn1db, not C.asn1db. Also,
make sure that we make the write atomic by first writing to
a temporary file that is then renamed.
|
|
|
|
|
|
As currently implemented, there is one call to asn1db:dbget() and
asn1db:dbput() for each type/value definitions in an ASN.1 specification.
If we check for duplicate definitions locally, we can send all
definitions in a single call.
|
|
There is (differenct) code for reading .asn1db files both in
asn1ct and asn1_db. Consolidate the reading into one routine
in asn1db.
Another problem is that the encoding rule that the .asn1db
file was created for is not in the .asn1db, but only in the
generated Erlang module. It is much easier and safer to put
the encoding rule in the .asn1db file itself. We will also
put the version number of the asn1 application into the file,
to ensure that we don't use an old .asn1db file that could
potentially be incompatible.
|
|
|
|
Those functions have no reason to be synchronous since they don't
have a useful return value.
|
|
Also replace unused code with assertions.
While at it, also let reply/2 return 'ok' to silence Dialyzer
warnings for unmatched returns.
|
|
This bug was introduced as part of the parallelization of test suites and is notpart of any released version
|
|
- Refactor and clean up asn1_db process
- Remove unused stop function in asn1ct.erl
- Remove infinite loop possibilites in asn1ct_check.erl
- test/1,2,3 now run in separate process
- Update documentation for new test options
|
|
|