[
https://issues.apache.org/jira/browse/THRIFT-2835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299892#comment-14299892
]
ASF GitHub Bot commented on THRIFT-2835:
----------------------------------------
GitHub user nsuke opened a pull request:
https://github.com/apache/thrift/pull/368
THRIFT-2835 Add possibility to distribute generators separately from thr...
...ift core, and load them dynamically
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nsuke/thrift THRIFT-2835
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/368.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #368
----
commit 89d1f8942ebcf2e228f71dbe4f114695891852d6
Author: Nobuaki Sukegawa <[email protected]>
Date: 2015-01-27T18:29:23Z
THRIFT-2835 Add possibility to distribute generators separately from thrift
core, and load them dynamically
----
> 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)