Github user Jens-G commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/982#discussion_r58929004
  
    --- Diff: compiler/cpp/src/generate/t_py_generator.cc ---
    @@ -384,6 +406,55 @@ void t_py_generator::init_generator() {
         py_autogen_comment() << endl <<
         py_imports() << endl <<
         "from .ttypes import *" << endl;
    +
    +  construct_object_dependent_graph();
    +}
    +
    +/**
    + * Construct object dependent graph to determine object generate order
    + * if cycle dependent is detected, generate process will be aborted
    + * object dependent example
    --- End diff --
    
    But your test case is perfectly valid Thrift IDL:
    ```
    struct A {
      1: B b;
    }
    
    struct B {
      1: A a;
    }
    ```
    
    One can do this with Thrift. Is there no way to support that in Python? 
Something like forward-declaration of types maybe?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to