You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2015/02/04 21:02:37 UTC

[jira] [Commented] (THRIFT-2835) Add possibility to distribute generators separately from thrift core, and load them dynamically

    [ https://issues.apache.org/jira/browse/THRIFT-2835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14305853#comment-14305853 ] 

Roger Meier commented on THRIFT-2835:
-------------------------------------

[~nsuke] this is great stuff! 
Define Thrift with Thrift, I really like it!
Thats probably the way we can go to define ENUM's for PROTOCOL types, etc.

currently I have these issues with *make check*, but did not had a closer look:
{noformat}
Makefile:1048: gen-cpp/.deps/ChildService.Plo: No such file or directory
Makefile:1049: gen-cpp/.deps/DebugProtoTest_types.Plo: No such file or directory
Makefile:1050: gen-cpp/.deps/EnumTest_types.Plo: No such file or directory
Makefile:1051: gen-cpp/.deps/OptionalRequiredTest_types.Plo: No such file or directory
Makefile:1052: gen-cpp/.deps/ParentService.Plo: No such file or directory
Makefile:1053: gen-cpp/.deps/Recursive_types.Plo: No such file or directory
Makefile:1054: gen-cpp/.deps/ThriftTest_constants.Plo: No such file or directory
Makefile:1055: gen-cpp/.deps/ThriftTest_types.Plo: No such file or directory
Makefile:1056: gen-cpp/.deps/TypedefTest_types.Plo: No such file or directory
Makefile:1057: gen-cpp/.deps/proc_types.Plo: No such file or directory
make[1]: *** No rule to make target 'gen-cpp/.deps/proc_types.Plo'.  Stop.
make: *** [check-recursive] Error 1
{noformat}

> Add possibility to distribute generators separately from thrift core, and load them dynamically
> -----------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-2835
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2835
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Compiler (General)
>            Reporter: Anatol Pomozov
>              Labels: fbthrift
>
> It is a follow-up for discussion with Facebook's fbthrift https://github.com/facebook/fbthrift/issues/48
> fbthrift adds its own generator that creates C++ classes based on their libraries. I do not know how upstreamable this generator but I think other companies would want to do the same - create their own custom generators.
> Currently there is no way to distribute generators separately from the thrift core. Thus the company have to fork whole project and add their own generator. It is what Facebook did.
> The idea is that thrift should be able to load language generators dynamically. i.e. a company foo creates its own generator and puts it to system /usr/lib/thrift/generators/cpp_foo.so When thrift compiler starts - it checks /usr/lib/thrift/generators/ and uses dlopen() to load the shared libraries. The shared library contains information about the generator (name, options, ...) thus it allows thrift core to use this custom third-party generator.
> This allows companies to create and distribute generator will less pain and no need to fork the project.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)