[
https://issues.apache.org/jira/browse/THRIFT-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673060#action_12673060
]
David Reiss commented on THRIFT-339:
------------------------------------
This looks awesome. There is one thing that I'm a little uneasy about, though,
which is that (in my example), a field with id 3 (which should be skipped)
would be treated as -2 instead. I think the only solution for this is to
provide some extra info to the extension, specifically the maximum expected
positive field id, and use that to skip over anything larger.
> THRIFT-242 is incompatible with arguments with empty key fields
> ---------------------------------------------------------------
>
> Key: THRIFT-339
> URL: https://issues.apache.org/jira/browse/THRIFT-339
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Python)
> Reporter: Jonathan Ellis
> Attachments: thrift-339-2.patch, thrift-339.patch
>
>
> Esteve's last change to how default values are stored broke stuff. Here is a
> quick example:
> {{
> service Test
> {
> bool get_slice(i32 start = -1),
> }
> }}
> generates
> {{
> class get_slice_args:
> thrift_spec = None
> def __init__(self, start=thrift_spec[-1][4],):
> self.start = start
> }}
> which is obviously invalid.
> I'm not sure how thrift_spec is supposed to be populated here so I'm unsure
> how to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.