thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-3458) Register thrift in D package registry
Date Sun, 16 Sep 2018 23:57:00 GMT

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

ASF GitHub Bot commented on THRIFT-3458:
----------------------------------------

jeking3 closed pull request #1593: THRIFT-3458: add dub support for dlang
URL: https://github.com/apache/thrift/pull/1593
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.gitignore b/.gitignore
index 96101f779e..0e7eedcd86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@ tags
 
 .*project
 .classpath
+.dub
 .settings
 .checkstyle
 junit*.properties
@@ -37,8 +38,11 @@ Makefile
 Makefile.in
 aclocal.m4
 acinclude.m4
+apache-thrift-test-library
 autom4te.cache
 cmake-*
+dub.selections.json
+libapache-thrift.a
 node_modules
 compile
 test-driver
diff --git a/dub.json b/dub.json
new file mode 100644
index 0000000000..1e268600e5
--- /dev/null
+++ b/dub.json
@@ -0,0 +1,28 @@
+{
+  "name": "apache-thrift",
+  "description": "Apache Thrift D library",
+  "authors": [
+    "Apache Thrift Developers <dev@thrift.apache.org>"
+  ],
+  "homepage": "http://thrift.apache.org",
+  "license": "Apache-2.0",
+  "dependencies": {
+    "libevent": {
+      "version": "~>2.0.2"
+    },
+    "openssl": {
+      "version": "~>1.1.6"
+    }
+  },
+  "systemDependencies": "requires openssl 1.0 until deimos module is updated",
+  "targetType": "library",
+  "sourcePaths": [
+    "lib/d/src" 
+  ],
+  "importPaths": [
+    "lib/d/src"
+  ],
+  "excludedSourceFiles": [
+    "lib/d/src/thrift/index.d"
+  ]
+}
diff --git a/lib/d/src/thrift/server/base.d b/lib/d/src/thrift/server/base.d
index b19768e62b..a23b1c7f21 100644
--- a/lib/d/src/thrift/server/base.d
+++ b/lib/d/src/thrift/server/base.d
@@ -112,12 +112,44 @@ protected:
     outputProtocolFactory_ = outputProtocolFactory;
   }
 
-  public TProcessorFactory processorFactory_;
-  public TServerTransport serverTransport_;
-  public TTransportFactory inputTransportFactory_;
-  public TTransportFactory outputTransportFactory_;
-  public TProtocolFactory inputProtocolFactory_;
-  public TProtocolFactory outputProtocolFactory_;
+  TProcessorFactory processorFactory_;
+  TServerTransport serverTransport_;
+  TTransportFactory inputTransportFactory_;
+  TTransportFactory outputTransportFactory_;
+  TProtocolFactory inputProtocolFactory_;
+  TProtocolFactory outputProtocolFactory_;
+
+public:
+
+  @property TProcessorFactory processorFactory()
+  {
+    return processorFactory_;
+  }
+
+  @property TServerTransport serverTransport()
+  {
+    return serverTransport_;
+  }
+
+  @property TTransportFactory inputTransportFactory()
+  {
+    return inputTransportFactory_;
+  }
+
+  @property TTransportFactory outputTransportFactory()
+  {
+    return outputTransportFactory_;
+  }
+
+  @property TProtocolFactory inputProtocolFactory()
+  {
+    return inputProtocolFactory_;
+  }
+
+  @property TProtocolFactory outputProtocolFactory()
+  {
+    return outputProtocolFactory_;
+  }
 }
 
 /**
diff --git a/lib/d/src/thrift/server/nonblocking.d b/lib/d/src/thrift/server/nonblocking.d
index 02167996ee..5860c0c427 100644
--- a/lib/d/src/thrift/server/nonblocking.d
+++ b/lib/d/src/thrift/server/nonblocking.d
@@ -893,14 +893,14 @@ private {
       callsSinceResize_ = 0;
 
       factoryInputTransport_ =
-        server_.inputTransportFactory_.getTransport(inputTransport_);
+        server_.inputTransportFactory.getTransport(inputTransport_);
       factoryOutputTransport_ =
-        server_.outputTransportFactory_.getTransport(outputTransport_);
+        server_.outputTransportFactory.getTransport(outputTransport_);
 
       inputProtocol_ =
-        server_.inputProtocolFactory_.getProtocol(factoryInputTransport_);
+        server_.inputProtocolFactory.getProtocol(factoryInputTransport_);
       outputProtocol_ =
-        server_.outputProtocolFactory_.getProtocol(factoryOutputTransport_);
+        server_.outputProtocolFactory.getProtocol(factoryOutputTransport_);
 
       if (server_.eventHandler) {
         connectionContext_ =
@@ -908,7 +908,7 @@ private {
       }
 
       auto info = TConnectionInfo(inputProtocol_, outputProtocol_, socket_);
-      processor_ = server_.processorFactory_.getProcessor(info);
+      processor_ = server_.processorFactory.getProcessor(info);
     }
 
     ~this() {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Register thrift in D package registry
> -------------------------------------
>
>                 Key: THRIFT-3458
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3458
>             Project: Thrift
>          Issue Type: Improvement
>          Components: D - Compiler, D - Library
>            Reporter: Tolstokulakov Nikolay
>            Assignee: James E. King III
>            Priority: Major
>
> add dub.sdl or dub.json and register it at code.dlang.org  #723 has this work.
> from THRIFT-4504: use dub to build the dlang bits and pull in the deimos dependencies
properly instead of putting them into the dockerfile for the CI build.  #1380 has most of
this work.
> The effort in #723 and #1380 are highly related and should be combined.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message