[jira] [Commented] (THRIFT-2945) Implement support for Rust language

2017-02-16 Thread Tony Przygienda (JIRA)

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

Tony Przygienda commented on THRIFT-2945:
-

OK, rephrased in other points what I read

a) we agree the trait is called serializable then 
b) I will check the README and extend it with namespace example and make sure 
everything conforms. I will add a simple example of custom trait (this default 
thingy) 
c) will look @ the service inheritance test
d) We add Hash. Having said that: I discourage you from moving bask to HashSet. 
BTreeSet/Map can we range-walked which can be a very serious asset. 
e) I will look @ the format issue & fix `rust_safe_case`
f) Understood your reasoning about the Rc Implement support for Rust language
> ---
>
> Key: THRIFT-2945
> URL: https://issues.apache.org/jira/browse/THRIFT-2945
> Project: Thrift
>  Issue Type: New Feature
>  Components: Rust - Compiler, Rust - Library
>Reporter: Maksim Golov
>Assignee: Allen George
> Fix For: 0.11.0
>
>
> Work on implementing support for Rust is in progress: 
> https://github.com/maximg/thrift by Simon GĂ©nier and myself.
> It will probably take quite some time to complete. Please keep us updated if 
> there are changes related to our work.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1191: THRIFT-3706 - Implement multiplexor.

2017-02-16 Thread gadLinux
Github user gadLinux commented on the issue:

https://github.com/apache/thrift/pull/1191
  
I must say that like the SSL patch this is already tested in production. 
Java vs c_glib. We have to add support for the Server c_glib and Client Java. 
But I suppose this time it will work without problems.

About the multiplex fact, you cannot change the multplexor in runtime while 
it's already running. You must do it at initialization time. I want to add in 
the future the ability to add new multiplexed services "on the fly". But I 
should be add the properties in gobject and make sure I don't break 
multithreading. So this has to be added at latter step, like always.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-3706) There's no support for Multiplexed protocol on c_glib library

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3706:


Github user gadLinux commented on the issue:

https://github.com/apache/thrift/pull/1191
  
I must say that like the SSL patch this is already tested in production. 
Java vs c_glib. We have to add support for the Server c_glib and Client Java. 
But I suppose this time it will work without problems.

About the multiplex fact, you cannot change the multplexor in runtime while 
it's already running. You must do it at initialization time. I want to add in 
the future the ability to add new multiplexed services "on the fly". But I 
should be add the properties in gobject and make sure I don't break 
multithreading. So this has to be added at latter step, like always.


> There's no support for Multiplexed protocol on c_glib library
> -
>
> Key: THRIFT-3706
> URL: https://issues.apache.org/jira/browse/THRIFT-3706
> Project: Thrift
>  Issue Type: Improvement
>  Components: C glib - Library
>Affects Versions: 0.9.3
>Reporter: Gonzalo Aguilar
>Assignee: Gonzalo Aguilar
>
> There's no multiplexed protocol. 
> I will implement the same way it's done in Java an C++



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1175: THRIFT-4064 Update node library dependencies

2017-02-16 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1175
  
Looks like the bufferutil thing caused some build jobs to break.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-4064) Update node library dependencies

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4064:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1175
  
Looks like the bufferutil thing caused some build jobs to break.


> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1175: THRIFT-4064 Update node library dependencies

2017-02-16 Thread bgould
Github user bgould commented on the issue:

https://github.com/apache/thrift/pull/1175
  
`clang: error: unknown argument: '-fno-tree-vrp'

clang: error: unknown argument: '-fno-delete-null-pointer-checks'`

I'm guessing these are GCC-only options... and in that test runner CC=clang 
and CXX=clang++

I don't have time to look more into this right now but perhaps can 
experiment with it in the next few days


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-4064) Update node library dependencies

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4064:


Github user bgould commented on the issue:

https://github.com/apache/thrift/pull/1175
  
`clang: error: unknown argument: '-fno-tree-vrp'

clang: error: unknown argument: '-fno-delete-null-pointer-checks'`

I'm guessing these are GCC-only options... and in that test runner CC=clang 
and CXX=clang++

I don't have time to look more into this right now but perhaps can 
experiment with it in the next few days


> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1083: THRIFT-3921 Add C++ ostream operator<< functions for enu...

2017-02-16 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1083
  
I'm going to pick this up and implement it in the context of THRIFT-4060.  
The compiler will emit a declaration for operator << of an enumeration, but the 
emitter for the definition of same will be optional.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-3921) C++ code should print enums as strings

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3921:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1083
  
I'm going to pick this up and implement it in the context of THRIFT-4060.  
The compiler will emit a declaration for operator << of an enumeration, but the 
emitter for the definition of same will be optional.


> C++ code should print enums as strings
> --
>
> Key: THRIFT-3921
> URL: https://issues.apache.org/jira/browse/THRIFT-3921
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler
>Reporter: Vivek Jain
>
> THRIFT-2067 added {{operator<<}} to the C++ generated code, which is great, 
> but enums are printed as numbers rather than their string representation. It 
> would be great if the generated code printed them as a string instead. There 
> might be some backwards-compatibility concerns (if users have already defined 
> their own versions, then thrift's version would cause compile errors), not 
> sure how important you guys think those are.
> Other thoughts/concerns? I am willing to work on a patch if no one else is 
> able to work on it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (THRIFT-3921) C++ code should print enums as strings

2017-02-16 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-3921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III reassigned THRIFT-3921:
--

Assignee: James E. King, III

> C++ code should print enums as strings
> --
>
> Key: THRIFT-3921
> URL: https://issues.apache.org/jira/browse/THRIFT-3921
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler
>Reporter: Vivek Jain
>Assignee: James E. King, III
>
> THRIFT-2067 added {{operator<<}} to the C++ generated code, which is great, 
> but enums are printed as numbers rather than their string representation. It 
> would be great if the generated code printed them as a string instead. There 
> might be some backwards-compatibility concerns (if users have already defined 
> their own versions, then thrift's version would cause compile errors), not 
> sure how important you guys think those are.
> Other thoughts/concerns? I am willing to work on a patch if no one else is 
> able to work on it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1194: THRIFT-3921 cpp library- optional operator ostrea...

2017-02-16 Thread jeking3
GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1194

THRIFT-3921 cpp library- optional operator ostream support for enumerations



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-3921

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1194.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 #1194


commit 570717279501ab1c0184ab76b93b8b35abae2914
Author: Vivek Jain 
Date:   2016-09-07T17:34:25Z

THRIFT-3921 Add C++ ostream operator<< functions for enums

commit 05012da4996455330a58f8664341d3d38beba758
Author: James E. King, III 
Date:   2017-02-16T20:23:42Z

Merge branch 'THRIFT-3921' of https://github.com/viveksjain/thrift into 
THRIFT-3921

commit 777a98bf7506b26033f14976ff7cc1b63d1e1fde
Author: James E. King, III 
Date:   2017-02-16T21:06:29Z

THRIFT-3921: made initial implementation conform to THRIFT-4060 optional 
output and added unit tests




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-3921) C++ code should print enums as strings

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3921:


GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1194

THRIFT-3921 cpp library- optional operator ostream support for enumerations



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-3921

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1194.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 #1194


commit 570717279501ab1c0184ab76b93b8b35abae2914
Author: Vivek Jain 
Date:   2016-09-07T17:34:25Z

THRIFT-3921 Add C++ ostream operator<< functions for enums

commit 05012da4996455330a58f8664341d3d38beba758
Author: James E. King, III 
Date:   2017-02-16T20:23:42Z

Merge branch 'THRIFT-3921' of https://github.com/viveksjain/thrift into 
THRIFT-3921

commit 777a98bf7506b26033f14976ff7cc1b63d1e1fde
Author: James E. King, III 
Date:   2017-02-16T21:06:29Z

THRIFT-3921: made initial implementation conform to THRIFT-4060 optional 
output and added unit tests




> C++ code should print enums as strings
> --
>
> Key: THRIFT-3921
> URL: https://issues.apache.org/jira/browse/THRIFT-3921
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler
>Reporter: Vivek Jain
>Assignee: James E. King, III
>
> THRIFT-2067 added {{operator<<}} to the C++ generated code, which is great, 
> but enums are printed as numbers rather than their string representation. It 
> would be great if the generated code printed them as a string instead. There 
> might be some backwards-compatibility concerns (if users have already defined 
> their own versions, then thrift's version would cause compile errors), not 
> sure how important you guys think those are.
> Other thoughts/concerns? I am willing to work on a patch if no one else is 
> able to work on it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (THRIFT-4094) run "config" error in docker

2017-02-16 Thread Weizhi Li (JIRA)
Weizhi Li created THRIFT-4094:
-

 Summary: run "config" error in docker 
 Key: THRIFT-4094
 URL: https://issues.apache.org/jira/browse/THRIFT-4094
 Project: Thrift
  Issue Type: Bug
Reporter: Weizhi Li


I am trying to build the thrift in docker. However, I got the error below:

configure: creating ./config.status
config.status: creating Makefile
config.status: creating compiler/cpp/Makefile
config.status: creating compiler/cpp/src/Makefile
config.status: creating compiler/cpp/src/thrift/plugin/Makefile
config.status: creating compiler/cpp/test/Makefile
config.status: creating compiler/cpp/src/thrift/version.h
config.status: creating lib/Makefile
config.status: creating lib/cpp/Makefile
mkdir: cannot create directory 'lib/cpp': File exists
mkdir: cannot create directory 'lib/cpp': File exists
mv: failed to access 'lib/cpp/Makefile': Not a directory



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1031: THRIFT-3859: Unix Domain Socket Support in Objective-C

2017-02-16 Thread clindsay
Github user clindsay commented on the issue:

https://github.com/apache/thrift/pull/1031
  
Thanks @jeking3. Sorry for the slow response, a bit busy these days!

Just to clarify, as far as I can tell there isn't a cocoa test client 
today. Is this correct? So, in order to add these tests to "make cross", we 
would first need to add a "cocoa" folder to `thrift/test`, and put together a 
test server, and test client executable that could participate in these tests?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-3859) Unix Domain Socket Support in Objective-C

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3859:


Github user clindsay commented on the issue:

https://github.com/apache/thrift/pull/1031
  
Thanks @jeking3. Sorry for the slow response, a bit busy these days!

Just to clarify, as far as I can tell there isn't a cocoa test client 
today. Is this correct? So, in order to add these tests to "make cross", we 
would first need to add a "cocoa" folder to `thrift/test`, and put together a 
test server, and test client executable that could participate in these tests?


> Unix Domain Socket Support in Objective-C
> -
>
> Key: THRIFT-3859
> URL: https://issues.apache.org/jira/browse/THRIFT-3859
> Project: Thrift
>  Issue Type: Improvement
>  Components: Cocoa - Library
>Affects Versions: 0.10.0
>Reporter: Chris Vasselli
>Priority: Minor
>
> I would like to be able to use Unix Domain Sockets as the transport to 
> communicate between different processes on a single machine. There seems to 
> be support in the C++ and Python libraries (the two other languages used in 
> my project), but no support in Objective-C.
> Proposed server interface:
> {{TSocketServer *server = [[TSocketServer alloc] 
> initWithPath:@"/path/to/pipe" protocolFactory:protocolFactory 
> processorFactory:processorFactory];}}
> Proposed client interface:
> {{TSocketTransport *socket = [[TSocketTransport alloc] 
> initWithPath:@"/path/to/pipe"];}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1031: THRIFT-3859: Unix Domain Socket Support in Objective-C

2017-02-16 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1031
  
If there isn't one there yet I would recommend following the pattern for 
java in there.  Specifically you would need a new test/ subdirectory for cocoa 
with test_client and test_server scripts, and you would need a stanza in 
tests.json that the test.py script could run.

You can test your scripts against a single client or server like this, 
after running a "make" following configure in test/:

./test.py --client cocoa --server java
./test.py --client java --server cocoa

You could substitute cpp for java as well.  Then when those pass, try a 
"make cross" to see if everything passes.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-3859) Unix Domain Socket Support in Objective-C

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3859:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1031
  
If there isn't one there yet I would recommend following the pattern for 
java in there.  Specifically you would need a new test/ subdirectory for cocoa 
with test_client and test_server scripts, and you would need a stanza in 
tests.json that the test.py script could run.

You can test your scripts against a single client or server like this, 
after running a "make" following configure in test/:

./test.py --client cocoa --server java
./test.py --client java --server cocoa

You could substitute cpp for java as well.  Then when those pass, try a 
"make cross" to see if everything passes.


> Unix Domain Socket Support in Objective-C
> -
>
> Key: THRIFT-3859
> URL: https://issues.apache.org/jira/browse/THRIFT-3859
> Project: Thrift
>  Issue Type: Improvement
>  Components: Cocoa - Library
>Affects Versions: 0.10.0
>Reporter: Chris Vasselli
>Priority: Minor
>
> I would like to be able to use Unix Domain Sockets as the transport to 
> communicate between different processes on a single machine. There seems to 
> be support in the C++ and Python libraries (the two other languages used in 
> my project), but no support in Objective-C.
> Proposed server interface:
> {{TSocketServer *server = [[TSocketServer alloc] 
> initWithPath:@"/path/to/pipe" protocolFactory:protocolFactory 
> processorFactory:processorFactory];}}
> Proposed client interface:
> {{TSocketTransport *socket = [[TSocketTransport alloc] 
> initWithPath:@"/path/to/pipe"];}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (THRIFT-4094) run "config" error in docker

2017-02-16 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III resolved THRIFT-4094.

Resolution: Fixed

> run "config" error in docker 
> -
>
> Key: THRIFT-4094
> URL: https://issues.apache.org/jira/browse/THRIFT-4094
> Project: Thrift
>  Issue Type: Question
>Reporter: Weizhi Li
>Assignee: James E. King, III
>
> I am trying to build the thrift in docker. However, I got the error below:
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating compiler/cpp/Makefile
> config.status: creating compiler/cpp/src/Makefile
> config.status: creating compiler/cpp/src/thrift/plugin/Makefile
> config.status: creating compiler/cpp/test/Makefile
> config.status: creating compiler/cpp/src/thrift/version.h
> config.status: creating lib/Makefile
> config.status: creating lib/cpp/Makefile
> mkdir: cannot create directory 'lib/cpp': File exists
> mkdir: cannot create directory 'lib/cpp': File exists
> mv: failed to access 'lib/cpp/Makefile': Not a directory



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-4094) run "config" error in docker

2017-02-16 Thread James E. King, III (JIRA)

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

James E. King, III commented on THRIFT-4094:


It sounds like you did not start the docker runtime from the correct directory.

See:

https://github.com/apache/thrift/tree/master/build/docker

{noformat}
Usage

>From the Apache Thrift code base root

Build

docker build -t thrift build/docker/ubuntu

or

docker build -t thrift build/docker/centos

Run

docker run -v $(pwd):/thrift/src -it thrift /bin/bash
{noformat}


You need to be in the top level directory of the git clone when you issue these 
commands.

> run "config" error in docker 
> -
>
> Key: THRIFT-4094
> URL: https://issues.apache.org/jira/browse/THRIFT-4094
> Project: Thrift
>  Issue Type: Bug
>Reporter: Weizhi Li
>
> I am trying to build the thrift in docker. However, I got the error below:
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating compiler/cpp/Makefile
> config.status: creating compiler/cpp/src/Makefile
> config.status: creating compiler/cpp/src/thrift/plugin/Makefile
> config.status: creating compiler/cpp/test/Makefile
> config.status: creating compiler/cpp/src/thrift/version.h
> config.status: creating lib/Makefile
> config.status: creating lib/cpp/Makefile
> mkdir: cannot create directory 'lib/cpp': File exists
> mkdir: cannot create directory 'lib/cpp': File exists
> mv: failed to access 'lib/cpp/Makefile': Not a directory



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (THRIFT-4094) run "config" error in docker

2017-02-16 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III updated THRIFT-4094:
---
Issue Type: Question  (was: Bug)

> run "config" error in docker 
> -
>
> Key: THRIFT-4094
> URL: https://issues.apache.org/jira/browse/THRIFT-4094
> Project: Thrift
>  Issue Type: Question
>Reporter: Weizhi Li
>
> I am trying to build the thrift in docker. However, I got the error below:
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating compiler/cpp/Makefile
> config.status: creating compiler/cpp/src/Makefile
> config.status: creating compiler/cpp/src/thrift/plugin/Makefile
> config.status: creating compiler/cpp/test/Makefile
> config.status: creating compiler/cpp/src/thrift/version.h
> config.status: creating lib/Makefile
> config.status: creating lib/cpp/Makefile
> mkdir: cannot create directory 'lib/cpp': File exists
> mkdir: cannot create directory 'lib/cpp': File exists
> mv: failed to access 'lib/cpp/Makefile': Not a directory



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (THRIFT-4094) run "config" error in docker

2017-02-16 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III reassigned THRIFT-4094:
--

Assignee: James E. King, III

> run "config" error in docker 
> -
>
> Key: THRIFT-4094
> URL: https://issues.apache.org/jira/browse/THRIFT-4094
> Project: Thrift
>  Issue Type: Question
>Reporter: Weizhi Li
>Assignee: James E. King, III
>
> I am trying to build the thrift in docker. However, I got the error below:
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating compiler/cpp/Makefile
> config.status: creating compiler/cpp/src/Makefile
> config.status: creating compiler/cpp/src/thrift/plugin/Makefile
> config.status: creating compiler/cpp/test/Makefile
> config.status: creating compiler/cpp/src/thrift/version.h
> config.status: creating lib/Makefile
> config.status: creating lib/cpp/Makefile
> mkdir: cannot create directory 'lib/cpp': File exists
> mkdir: cannot create directory 'lib/cpp': File exists
> mv: failed to access 'lib/cpp/Makefile': Not a directory



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Closed] (THRIFT-4094) run "config" error in docker

2017-02-16 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III closed THRIFT-4094.
--

If you have any more questions re-open and comment.  Thanks.

> run "config" error in docker 
> -
>
> Key: THRIFT-4094
> URL: https://issues.apache.org/jira/browse/THRIFT-4094
> Project: Thrift
>  Issue Type: Question
>Reporter: Weizhi Li
>Assignee: James E. King, III
>
> I am trying to build the thrift in docker. However, I got the error below:
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating compiler/cpp/Makefile
> config.status: creating compiler/cpp/src/Makefile
> config.status: creating compiler/cpp/src/thrift/plugin/Makefile
> config.status: creating compiler/cpp/test/Makefile
> config.status: creating compiler/cpp/src/thrift/version.h
> config.status: creating lib/Makefile
> config.status: creating lib/cpp/Makefile
> mkdir: cannot create directory 'lib/cpp': File exists
> mkdir: cannot create directory 'lib/cpp': File exists
> mv: failed to access 'lib/cpp/Makefile': Not a directory



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-4094) run "config" error in docker

2017-02-16 Thread Weizhi Li (JIRA)

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

Weizhi Li commented on THRIFT-4094:
---

Thank you for the reply. And, also, 

http://stackoverflow.com/questions/18643642/libtool-error-building-thrift-0-9-1-on-ubuntu-13-04
 

I have changed the version to 0.9.2

It works now. 

> run "config" error in docker 
> -
>
> Key: THRIFT-4094
> URL: https://issues.apache.org/jira/browse/THRIFT-4094
> Project: Thrift
>  Issue Type: Question
>Reporter: Weizhi Li
>Assignee: James E. King, III
>
> I am trying to build the thrift in docker. However, I got the error below:
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating compiler/cpp/Makefile
> config.status: creating compiler/cpp/src/Makefile
> config.status: creating compiler/cpp/src/thrift/plugin/Makefile
> config.status: creating compiler/cpp/test/Makefile
> config.status: creating compiler/cpp/src/thrift/version.h
> config.status: creating lib/Makefile
> config.status: creating lib/cpp/Makefile
> mkdir: cannot create directory 'lib/cpp': File exists
> mkdir: cannot create directory 'lib/cpp': File exists
> mv: failed to access 'lib/cpp/Makefile': Not a directory



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1194: THRIFT-3921 cpp library- optional operator ostrea...

2017-02-16 Thread viveksjain
Github user viveksjain commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1194#discussion_r101694140
  
--- Diff: compiler/cpp/src/thrift/generate/t_cpp_generator.cc ---
@@ -566,6 +567,47 @@ void t_cpp_generator::generate_enum(t_enum* tenum) {
 << tenum->get_name() << "Values"
 << ", _k" << tenum->get_name() << "Names), "
 << "::apache::thrift::TEnumIterator(-1, NULL, NULL));" << 
endl << endl;
+
+  generate_enum_ostream_operator(tenum);
+}
+
+void t_cpp_generator::generate_enum_ostream_operator(t_enum* tenum) {
+
+  // If we've been told the consuming application will provide an ostream
+  // operator definition then we only make a declaration:
+
+  if (!has_custom_ostream(tenum)) {
+f_types_ << "inline ";
+  }
+
+  f_types_ << "std::ostream& operator<<(std::ostream& out, const ";
+  if (gen_pure_enums_) {
+f_types_ << tenum->get_name();
+  } else {
+f_types_ << tenum->get_name() << "::type&";
+  }
+  f_types_ << " val)";
+  if (has_custom_ostream(tenum)) {
+f_types_ << ";";
+  } else {
+scope_up(f_types_);
+
+f_types_ << indent() << "std::map::const_iterator it 
= _"
+ << tenum->get_name() << "_VALUES_TO_NAMES.find(val);" << endl;
+f_types_ << indent() << "if (it != _" << tenum->get_name() << 
"_VALUES_TO_NAMES.end()) {" << endl;
+indent_up();
+f_types_ << indent() << "out << it->second;" << endl;
+indent_down();
+f_types_ << indent() << "} else {" << endl;
+indent_up();
+f_types_ << indent() << "out << val;" << endl;
--- End diff --

I realized later there's a bug in my implementation - this should be `out 
<< static_cast(val);` otherwise the code will infinite loop in this branch.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-3921) C++ code should print enums as strings

2017-02-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3921:


Github user viveksjain commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1194#discussion_r101694140
  
--- Diff: compiler/cpp/src/thrift/generate/t_cpp_generator.cc ---
@@ -566,6 +567,47 @@ void t_cpp_generator::generate_enum(t_enum* tenum) {
 << tenum->get_name() << "Values"
 << ", _k" << tenum->get_name() << "Names), "
 << "::apache::thrift::TEnumIterator(-1, NULL, NULL));" << 
endl << endl;
+
+  generate_enum_ostream_operator(tenum);
+}
+
+void t_cpp_generator::generate_enum_ostream_operator(t_enum* tenum) {
+
+  // If we've been told the consuming application will provide an ostream
+  // operator definition then we only make a declaration:
+
+  if (!has_custom_ostream(tenum)) {
+f_types_ << "inline ";
+  }
+
+  f_types_ << "std::ostream& operator<<(std::ostream& out, const ";
+  if (gen_pure_enums_) {
+f_types_ << tenum->get_name();
+  } else {
+f_types_ << tenum->get_name() << "::type&";
+  }
+  f_types_ << " val)";
+  if (has_custom_ostream(tenum)) {
+f_types_ << ";";
+  } else {
+scope_up(f_types_);
+
+f_types_ << indent() << "std::map::const_iterator it 
= _"
+ << tenum->get_name() << "_VALUES_TO_NAMES.find(val);" << endl;
+f_types_ << indent() << "if (it != _" << tenum->get_name() << 
"_VALUES_TO_NAMES.end()) {" << endl;
+indent_up();
+f_types_ << indent() << "out << it->second;" << endl;
+indent_down();
+f_types_ << indent() << "} else {" << endl;
+indent_up();
+f_types_ << indent() << "out << val;" << endl;
--- End diff --

I realized later there's a bug in my implementation - this should be `out 
<< static_cast(val);` otherwise the code will infinite loop in this branch.


> C++ code should print enums as strings
> --
>
> Key: THRIFT-3921
> URL: https://issues.apache.org/jira/browse/THRIFT-3921
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler
>Reporter: Vivek Jain
>Assignee: James E. King, III
>
> THRIFT-2067 added {{operator<<}} to the C++ generated code, which is great, 
> but enums are printed as numbers rather than their string representation. It 
> would be great if the generated code printed them as a string instead. There 
> might be some backwards-compatibility concerns (if users have already defined 
> their own versions, then thrift's version would cause compile errors), not 
> sure how important you guys think those are.
> Other thoughts/concerns? I am willing to work on a patch if no one else is 
> able to work on it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)