You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Joel Reymont (JIRA)" <ji...@apache.org> on 2011/03/22 08:47:05 UTC

[jira] [Created] (THRIFT-1105) OCaml generator does not prefix methods of included structs with their type

OCaml generator does not prefix methods of included structs with their type
---------------------------------------------------------------------------

                 Key: THRIFT-1105
                 URL: https://issues.apache.org/jira/browse/THRIFT-1105
             Project: Thrift
          Issue Type: Bug
          Components: OCaml - Compiler
    Affects Versions: 0.7
         Environment: Mac OSX 10.6
            Reporter: Joel Reymont
             Fix For: 0.7


--- Doc.thrift

struct Document {
       1: string user_name
       2: string document_name
}

typedef Document page_id  

--- Ranking.thrift


include "Doc.thrift"

struct Request {  
  1: Doc.page_id page
}

---

You will see 

#set_page (read_document iprot)

generated in read_request, instead of the proper

#set_page (Doc_types.read_document iprot)

Generated code fails to compile as a result.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (THRIFT-1105) OCaml generator does not prefix methods of included structs with their type

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

Joel Reymont updated THRIFT-1105:
---------------------------------

    Attachment: 0001-THRIFT-1105-OCaml-generator-does-not-prefix-methods-.patch

> OCaml generator does not prefix methods of included structs with their type
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1105
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1105
>             Project: Thrift
>          Issue Type: Bug
>          Components: OCaml - Compiler
>    Affects Versions: 0.7
>         Environment: Mac OSX 10.6
>            Reporter: Joel Reymont
>             Fix For: 0.7
>
>         Attachments: 0001-THRIFT-1105-OCaml-generator-does-not-prefix-methods-.patch
>
>
> --- Doc.thrift
> struct Document {
>        1: string user_name
>        2: string document_name
> }
> typedef Document page_id  
> --- Ranking.thrift
> include "Doc.thrift"
> struct Request {  
>   1: Doc.page_id page
> }
> ---
> You will see 
> #set_page (read_document iprot)
> generated in read_request, instead of the proper
> #set_page (Doc_types.read_document iprot)
> Generated code fails to compile as a result.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (THRIFT-1105) OCaml generator does not prefix methods of included structs with their type

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

Hudson commented on THRIFT-1105:
--------------------------------

Integrated in Thrift #97 (See [https://hudson.apache.org/hudson/job/Thrift/97/])
    THRIFT-1105. ocaml: OCaml generator does not prefix methods of included structs with their type

This patch fixes the ocaml generator to generate good code when the 'include' Thrift IDL directive is used.

Patch: Joel Raymont


> OCaml generator does not prefix methods of included structs with their type
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1105
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1105
>             Project: Thrift
>          Issue Type: Bug
>          Components: OCaml - Compiler
>    Affects Versions: 0.7
>         Environment: Mac OSX 10.6
>            Reporter: Joel Reymont
>            Assignee: Joel Reymont
>             Fix For: 0.7
>
>         Attachments: 0001-THRIFT-1105-OCaml-generator-does-not-prefix-methods-.patch
>
>
> --- Doc.thrift
> struct Document {
>        1: string user_name
>        2: string document_name
> }
> typedef Document page_id  
> --- Ranking.thrift
> include "Doc.thrift"
> struct Request {  
>   1: Doc.page_id page
> }
> ---
> thrift -gen ocaml Doc.thrift
> thrift -gen ocaml Ranking.thrift
> ---
> You will see 
> #set_page (read_document iprot)
> generated in read_request, instead of the proper
> #set_page (Doc_types.read_document iprot)
> Generated code fails to compile as a result.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (THRIFT-1105) OCaml generator does not prefix methods of included structs with their type

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

Joel Reymont updated THRIFT-1105:
---------------------------------

    Description: 
--- Doc.thrift

struct Document {
       1: string user_name
       2: string document_name
}

typedef Document page_id  

--- Ranking.thrift


include "Doc.thrift"

struct Request {  
  1: Doc.page_id page
}

---

thrift -gen ocaml Doc.thrift
thrift -gen ocaml Ranking.thrift

---

You will see 

#set_page (read_document iprot)

generated in read_request, instead of the proper

#set_page (Doc_types.read_document iprot)

Generated code fails to compile as a result.


  was:
--- Doc.thrift

struct Document {
       1: string user_name
       2: string document_name
}

typedef Document page_id  

--- Ranking.thrift


include "Doc.thrift"

struct Request {  
  1: Doc.page_id page
}

---

You will see 

#set_page (read_document iprot)

generated in read_request, instead of the proper

#set_page (Doc_types.read_document iprot)

Generated code fails to compile as a result.



> OCaml generator does not prefix methods of included structs with their type
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1105
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1105
>             Project: Thrift
>          Issue Type: Bug
>          Components: OCaml - Compiler
>    Affects Versions: 0.7
>         Environment: Mac OSX 10.6
>            Reporter: Joel Reymont
>             Fix For: 0.7
>
>         Attachments: 0001-THRIFT-1105-OCaml-generator-does-not-prefix-methods-.patch
>
>
> --- Doc.thrift
> struct Document {
>        1: string user_name
>        2: string document_name
> }
> typedef Document page_id  
> --- Ranking.thrift
> include "Doc.thrift"
> struct Request {  
>   1: Doc.page_id page
> }
> ---
> thrift -gen ocaml Doc.thrift
> thrift -gen ocaml Ranking.thrift
> ---
> You will see 
> #set_page (read_document iprot)
> generated in read_request, instead of the proper
> #set_page (Doc_types.read_document iprot)
> Generated code fails to compile as a result.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (THRIFT-1105) OCaml generator does not prefix methods of included structs with their type

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

Bryan Duxbury closed THRIFT-1105.
---------------------------------

    Resolution: Fixed
      Assignee: Joel Reymont

I just committed this.

> OCaml generator does not prefix methods of included structs with their type
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1105
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1105
>             Project: Thrift
>          Issue Type: Bug
>          Components: OCaml - Compiler
>    Affects Versions: 0.7
>         Environment: Mac OSX 10.6
>            Reporter: Joel Reymont
>            Assignee: Joel Reymont
>             Fix For: 0.7
>
>         Attachments: 0001-THRIFT-1105-OCaml-generator-does-not-prefix-methods-.patch
>
>
> --- Doc.thrift
> struct Document {
>        1: string user_name
>        2: string document_name
> }
> typedef Document page_id  
> --- Ranking.thrift
> include "Doc.thrift"
> struct Request {  
>   1: Doc.page_id page
> }
> ---
> thrift -gen ocaml Doc.thrift
> thrift -gen ocaml Ranking.thrift
> ---
> You will see 
> #set_page (read_document iprot)
> generated in read_request, instead of the proper
> #set_page (Doc_types.read_document iprot)
> Generated code fails to compile as a result.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira