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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.7
    • OCaml - Compiler
    • None
    • Mac OSX 10.6

    • 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

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

            Dates

              Created:
              Updated:
              Resolved: