Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1105

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: OCaml - Compiler
    • Labels:
      None
    • Environment:

      Mac OSX 10.6

    • Patch Info:
      Patch Available

      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.

        Attachments

          Activity

            People

            • Assignee:
              wagerlabs Joel Reymont
              Reporter:
              wagerlabs Joel Reymont
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: