You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Lev Walkin (JIRA)" <ji...@apache.org> on 2010/07/24 23:46:50 UTC
[jira] Updated: (THRIFT-827) OCaml generator to take default values
into account
[ https://issues.apache.org/jira/browse/THRIFT-827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lev Walkin updated THRIFT-827:
------------------------------
Attachment: thrift-trunk-962854.patch
A patch against 962854 revision of the trunk.
> OCaml generator to take default values into account
> ----------------------------------------------------
>
> Key: THRIFT-827
> URL: https://issues.apache.org/jira/browse/THRIFT-827
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (General)
> Affects Versions: 0.3
> Reporter: Lev Walkin
> Priority: Minor
> Fix For: 0.4
>
> Attachments: thrift-trunk-962854.patch
>
>
> A patch to the OCaml generator which uses default values defined in the .thrift file to initialize the members of the generated class.
> I've prepared an OCaml generator patch against the current Thrift SVN trunk. The generated code:
> * makes unwrapped types for all fields for which default values are defined,
> * honors the protocol-centric semantics for the "required" field: such fields are always serialized,
> * throws exception instead of skipping "required" fields which do not have a set value,
> * avoids encoding values of "optional" and absent-requiredness fields if the field value is structurally equivalent to the field's default value,
> * does not break compatibility with C++ receivers,
> * is drop-in compatibe with OCaml code generated by the OCaml generator in the unmodified trunk
> For the full description of changes see paragraph 3.2 in http://lionet.livejournal.com/66899.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.