<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/diameter/src/compiler, branch OTP-18.2.3</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Change license text to APLv2</title>
<updated>2015-06-18T09:31:02+00:00</updated>
<author>
<name>Bruce Yinhe</name>
<email>bruce@erlang.org</email>
</author>
<published>2015-06-18T09:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=738c34d4bb8f1a3811acd00af8c6c12107f8315b'/>
<id>738c34d4bb8f1a3811acd00af8c6c12107f8315b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>diameter: Use module erl_anno</title>
<updated>2015-04-30T10:15:25+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2015-01-29T11:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2c4068dee7e8a901f0bd9104254036f4bb1ffd6e'/>
<id>2c4068dee7e8a901f0bd9104254036f4bb1ffd6e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ?MODULE in preprocessed dictionary forms</title>
<updated>2014-09-12T15:10:21+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-09-12T14:31:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8e5e66b66cf318722e5b128c1b690fa2d080f1db'/>
<id>8e5e66b66cf318722e5b128c1b690fa2d080f1db</id>
<content type='text'>
By replacing literal diameter_gen_relay atoms in forms extracted from
that module by the name of the module in question. This has been wrong
for some time, but only became noticable when the parent commit started
using ?MODULE as more than a process dictionary key or tag to match on.
In particular, the function dict/1 in diameter_gen.hrl (included by
every dictionary module) can now return ?MODULE, which is (not
surprisingly) expected to be the name of the dictionary module in
question. It wasn't in the case of a module compiled from forms: it was
diameter_gen_relay, since that's the module the forms were extracted
from.

The fix only affects dictionaries compiled from forms, as returned by
diameter_make:codec/2. In particular, dictionaries compiled from Erlang
source returned by this function, or by diameterc(1), are unaffected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By replacing literal diameter_gen_relay atoms in forms extracted from
that module by the name of the module in question. This has been wrong
for some time, but only became noticable when the parent commit started
using ?MODULE as more than a process dictionary key or tag to match on.
In particular, the function dict/1 in diameter_gen.hrl (included by
every dictionary module) can now return ?MODULE, which is (not
surprisingly) expected to be the name of the dictionary module in
question. It wasn't in the case of a module compiled from forms: it was
diameter_gen_relay, since that's the module the forms were extracted
from.

The fix only affects dictionaries compiled from forms, as returned by
diameter_make:codec/2. In particular, dictionaries compiled from Erlang
source returned by this function, or by diameterc(1), are unaffected.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix broken check for undefined AVPs in @codec and @custom_types</title>
<updated>2014-05-29T13:06:58+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-05-29T07:18:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e22d0c9c9d1bc18a68a8eefca6f87edde66c3d86'/>
<id>e22d0c9c9d1bc18a68a8eefca6f87edde66c3d86</id>
<content type='text'>
Instead of detecting the error, code generation failed when attempting
to lookup the type of an undefined AVP.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of detecting the error, code generation failed when attempting
to lookup the type of an undefined AVP.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'anders/diameter/unicode_path/OTP-11655'</title>
<updated>2014-03-31T08:58:44+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-03-31T08:58:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=91cc9ce5112591c274a1b0850b0a9f3ec0a49676'/>
<id>91cc9ce5112591c274a1b0850b0a9f3ec0a49676</id>
<content type='text'>
* anders/diameter/unicode_path/OTP-11655:
  Fix unicode path failure in diameter_make:codec/2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/unicode_path/OTP-11655:
  Fix unicode path failure in diameter_make:codec/2
</pre>
</div>
</content>
</entry>
<entry>
<title>Use fun encoding to erl_parse:abstract/2</title>
<updated>2014-03-25T14:05:28+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-03-24T16:33:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d1ceb909e8867b4dfd97130270ef16201cc3e27b'/>
<id>d1ceb909e8867b4dfd97130270ef16201cc3e27b</id>
<content type='text'>
This is an encoding that didn't exist at the time of the previous
commit, but which was added in commit 83b6daef. Use it to restrict
stringification to lists containing printable ascii.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an encoding that didn't exist at the time of the previous
commit, but which was added in commit 83b6daef. Use it to restrict
stringification to lists containing printable ascii.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adapt dictionary compilation to new default encoding</title>
<updated>2014-03-21T08:14:01+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-03-19T16:57:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2aa88958de6b07f35eea5e26a65adb69619daa7b'/>
<id>2aa88958de6b07f35eea5e26a65adb69619daa7b</id>
<content type='text'>
The problem is that the change in default encoding to utf8 in 17.0, in
commit 00e42967, changes the behaviour of erl_parse:abstract/1, which is
used by the dictionary compiler to turn terms into abstract code. In
particular, it transforms the orddict representation of a parsed
dictionary to contruct the return value of a dictionary module's dict/0
function. This orddict contains various lists, one of which is a list of
tuples of the form

  {Name, Code, [VendorId], [Avp]}

where Name is an ASCII string and VendorId is a non-negative integer.

Using erl_parse:abstract/2 instead allows a string encoding to be
specified but regardless of what encoding is used, the result of
transforming our tuple might not be what we really want, which is for
Name to always be represented as a string form and [VendorId] to always
be represented as a cons form: the [VendorId] will always end up as a
string form if the integers are small enough. The only way around this
is to transform the tuple bit by bit, but modifying the code to do this
is quite a lot of work, for not much gain: it would be nice to produce
more readable output but nothing stops working without it.

This commit restores the pre-17.0 conversion by explicilty specifying
latin1 as the string encoding to erl_parse:abstract/2. The utf8 encoding
broke the compilation of some dictionares since unicode strings aren't
expected when writing the generated code to file.

Note that the latin1 encoding does reasonably well in practice, although
it mangles the Ericsson Vendor Id list [193] into a "LATIN CAPITAL
LETTER A WITH ACUTE". The utf8 encoding does worse, mangling the 3GPP
Vendor Id 10415 into "DESERET CAPITAL LETTER CHEE". An ascii encoding
would do better than latin1 but doesn't yet exist. (Encoding isn't
really what the option is. It's a string predicate: if the predicate is
true then represent as a string form, otherwise a cons form.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem is that the change in default encoding to utf8 in 17.0, in
commit 00e42967, changes the behaviour of erl_parse:abstract/1, which is
used by the dictionary compiler to turn terms into abstract code. In
particular, it transforms the orddict representation of a parsed
dictionary to contruct the return value of a dictionary module's dict/0
function. This orddict contains various lists, one of which is a list of
tuples of the form

  {Name, Code, [VendorId], [Avp]}

where Name is an ASCII string and VendorId is a non-negative integer.

Using erl_parse:abstract/2 instead allows a string encoding to be
specified but regardless of what encoding is used, the result of
transforming our tuple might not be what we really want, which is for
Name to always be represented as a string form and [VendorId] to always
be represented as a cons form: the [VendorId] will always end up as a
string form if the integers are small enough. The only way around this
is to transform the tuple bit by bit, but modifying the code to do this
is quite a lot of work, for not much gain: it would be nice to produce
more readable output but nothing stops working without it.

This commit restores the pre-17.0 conversion by explicilty specifying
latin1 as the string encoding to erl_parse:abstract/2. The utf8 encoding
broke the compilation of some dictionares since unicode strings aren't
expected when writing the generated code to file.

Note that the latin1 encoding does reasonably well in practice, although
it mangles the Ericsson Vendor Id list [193] into a "LATIN CAPITAL
LETTER A WITH ACUTE". The utf8 encoding does worse, mangling the 3GPP
Vendor Id 10415 into "DESERET CAPITAL LETTER CHEE". An ascii encoding
would do better than latin1 but doesn't yet exist. (Encoding isn't
really what the option is. It's a string predicate: if the predicate is
true then represent as a string form, otherwise a cons form.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unicode path failure in diameter_make:codec/2</title>
<updated>2014-03-20T22:59:39+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-01-31T15:17:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a97103b601e3ec37b7ed3ae3799ff63422732b59'/>
<id>a97103b601e3ec37b7ed3ae3799ff63422732b59</id>
<content type='text'>
A dictionary path containing a unicode codepoint &gt; 255 caused the
function to fail when iolist_to_binary/1 was applied to the path.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A dictionary path containing a unicode codepoint &gt; 255 caused the
function to fail when iolist_to_binary/1 was applied to the path.
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure that Grouped AVP's are fully defined in dictionaries</title>
<updated>2014-01-16T15:11:02+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-01-16T12:17:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2b802628b59b7208b1c936309807f86745a3b6a0'/>
<id>2b802628b59b7208b1c936309807f86745a3b6a0</id>
<content type='text'>
The case in which an AVP was defined as having type Grouped in
@avp_types without a corresponding specification in @grouped was
missing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The case in which an AVP was defined as having type Grouped in
@avp_types without a corresponding specification in @grouped was
missing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't format diameter_make:codec/2 errors</title>
<updated>2014-01-16T12:06:44+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2014-01-16T11:57:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3f79e7bd7e743ffd40b624caf680aef2bdb15dc7'/>
<id>3f79e7bd7e743ffd40b624caf680aef2bdb15dc7</id>
<content type='text'>
Instead, add diameter_make:format_error/1 to allow the caller to format
if desired, which is what applications like compiler and yecc do. Use
this to check that the expected error is the one actually generated in
the compiler suite.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead, add diameter_make:format_error/1 to allow the caller to format
if desired, which is what applications like compiler and yecc do. Use
this to check that the expected error is the one actually generated in
the compiler suite.
</pre>
</div>
</content>
</entry>
</feed>
