You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Esteve Fernandez (JIRA)" <ji...@apache.org> on 2009/01/11 10:29:59 UTC

[jira] Created: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Generated code for child service is invalid if both child and parent are defined in the same Thrift file
--------------------------------------------------------------------------------------------------------

                 Key: THRIFT-256
                 URL: https://issues.apache.org/jira/browse/THRIFT-256
             Project: Thrift
          Issue Type: Bug
          Components: Compiler (Python)
            Reporter: Esteve Fernandez


Given a Thrift file like this:

----simple.thrift----
service Base {
}

service Child extends Parent {
}
----simple.thrift----

the parent service is not qualified properly in the code service.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669274#action_12669274 ] 

David Reiss commented on THRIFT-256:
------------------------------------

What do you think about this version?  It solves it in a central place.  The patch is actually smaller than it looks.

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss reassigned THRIFT-256:
----------------------------------

    Assignee: David Reiss

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>            Assignee: David Reiss
>         Attachments: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, 0002-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "Esteve Fernandez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Esteve Fernandez updated THRIFT-256:
------------------------------------

    Attachment: thrift-256.patch

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "Esteve Fernandez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670401#action_12670401 ] 

Esteve Fernandez commented on THRIFT-256:
-----------------------------------------

I like it much more than mine, it's cleaner and easier to read. I don't know what I had in mind when I wrote that patch...

Do you think it should have an accompanying unit test?

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670986#action_12670986 ] 

David Reiss commented on THRIFT-256:
------------------------------------

It still doesn't work if the IDL has a service with the same name as the Python module ("namespace"), because it tries to do relative imports.  I think that is a wontfix, though.

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, 0002-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "Esteve Fernandez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Esteve Fernandez updated THRIFT-256:
------------------------------------

    Description: 
Given a Thrift file like this:

simple.thrift:

service Base {
}

service Child extends Parent {
}

the parent service is not qualified properly in the child service code.

  was:
Given a Thrift file like this:

# simple.thrift
service Base {
}

service Child extends Parent {
}
# simple.thrift

the parent service is not qualified properly in the child service.


> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "Esteve Fernandez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669266#action_12669266 ] 

Esteve Fernandez commented on THRIFT-256:
-----------------------------------------

Can anyone have a look at this? It's fairly simple to reproduce and I provided a patch.

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss resolved THRIFT-256.
--------------------------------

    Resolution: Fixed

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, 0002-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss updated THRIFT-256:
-------------------------------

    Attachment: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "Esteve Fernandez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Esteve Fernandez updated THRIFT-256:
------------------------------------

    Description: 
Given a Thrift file like this:

# simple.thrift
service Base {
}

service Child extends Parent {
}
# simple.thrift

the parent service is not qualified properly in the child service.

  was:
Given a Thrift file like this:

----simple.thrift----
service Base {
}

service Child extends Parent {
}
----simple.thrift----

the parent service is not qualified properly in the code service.


> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>
> Given a Thrift file like this:
> # simple.thrift
> service Base {
> }
> service Child extends Parent {
> }
> # simple.thrift
> the parent service is not qualified properly in the child service.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-256) Generated code for child service is invalid if both child and parent are defined in the same Thrift file

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss updated THRIFT-256:
-------------------------------

    Attachment: 0002-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch

> Generated code for child service is invalid if both child and parent are defined in the same Thrift file
> --------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-256
>                 URL: https://issues.apache.org/jira/browse/THRIFT-256
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Esteve Fernandez
>         Attachments: 0001-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, 0002-THRIFT-256.-python-Fix-inheritance-of-services-in-t.patch, thrift-256.patch
>
>
> Given a Thrift file like this:
> simple.thrift:
> service Base {
> }
> service Child extends Parent {
> }
> the parent service is not qualified properly in the child service code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.