thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chet Murthy (JIRA)" <j...@apache.org>
Subject [jira] [Created] (THRIFT-4392) compiler/..../plugin.thrift structs mis-ordered blows up ocaml generator
Date Fri, 24 Nov 2017 01:40:01 GMT
Chet Murthy created THRIFT-4392:
-----------------------------------

             Summary: compiler/..../plugin.thrift structs mis-ordered blows up ocaml generator
                 Key: THRIFT-4392
                 URL: https://issues.apache.org/jira/browse/THRIFT-4392
             Project: Thrift
          Issue Type: Bug
          Components: OCaml - Compiler
    Affects Versions: 0.10.0
         Environment: Ubuntu 16.04 Linux amd64
ocaml 4.04.2

            Reporter: Chet Murthy
            Priority: Minor


in plugin.thrift, the structs are ordered
....
t_struct
t_field
....

but t_struct refers to t_field.  So when I gen ocaml code:

thrift//compiler/cpp/thrift -r --gen ocaml thrift/compiler/cpp/src/thrift/plugin/plugin.thrift

and compile:

ocamlfind ocamlc -thread -package thrift -c gen-ocaml/plugin_types.mli
File "gen-ocaml/plugin_types.mli", line 284, characters 23-30:
Error: Unbound type constructor t_field

Fixing is easy (since the types aren't recursive) -- just swap the order of the structs.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message