[jira] [Created] (THRIFT-3627) Missing basic code style consistency of JavaScript.

2016-02-13 Thread Kazuki Matsuda (JIRA)
Kazuki Matsuda created THRIFT-3627:
--

 Summary: Missing basic code style consistency of JavaScript.
 Key: THRIFT-3627
 URL: https://issues.apache.org/jira/browse/THRIFT-3627
 Project: Thrift
  Issue Type: Improvement
  Components: JavaScript - Library
Reporter: Kazuki Matsuda
Priority: Minor


E.g.)

* No white space in {code}function(args){// beteween `){`{code}
https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L1497

* "Double quoted" (not 'single quoted') string litteral
https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L133

Those errors can be easily fixed by fixjsstyle.



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


[jira] [Commented] (THRIFT-3627) Missing basic code style consistency of JavaScript.

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3627:


GitHub user kazuki-ma opened a pull request:

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

THRIFT-3627 fix missing basic code style consistency of JavaScript.



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

$ git pull https://github.com/kazuki-ma/thrift THRIFT-3627

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

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


commit 10098945c31fa0ef07b82af6afd1fdd00241c932
Author: Kazuki Matsuda 
Date:   2016-02-13T10:36:09Z

THRIFT-3627 fix missing basic code style consistency of JavaScript.




> Missing basic code style consistency of JavaScript.
> ---
>
> Key: THRIFT-3627
> URL: https://issues.apache.org/jira/browse/THRIFT-3627
> Project: Thrift
>  Issue Type: Improvement
>  Components: JavaScript - Library
>Reporter: Kazuki Matsuda
>Priority: Minor
>
> E.g.)
> * No white space in {code}function(args){// beteween `){`{code}
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L1497
> * "Double quoted" (not 'single quoted') string litteral
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L133
> Those errors can be easily fixed by fixjsstyle.



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


[GitHub] thrift pull request: THRIFT-3627 fix missing basic code style cons...

2016-02-13 Thread kazuki-ma
GitHub user kazuki-ma opened a pull request:

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

THRIFT-3627 fix missing basic code style consistency of JavaScript.



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

$ git pull https://github.com/kazuki-ma/thrift THRIFT-3627

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

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


commit 10098945c31fa0ef07b82af6afd1fdd00241c932
Author: Kazuki Matsuda 
Date:   2016-02-13T10:36:09Z

THRIFT-3627 fix missing basic code style consistency of JavaScript.




---
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-3627) Missing basic code style consistency of JavaScript.

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3627:


SUCCESS: Integrated in Thrift-precommit #118 (See 
[https://builds.apache.org/job/Thrift-precommit/118/])
THRIFT-3627 fix missing basic code style consistency of JavaScript. 
(kazuki.matsuda: 
[https://github.com/apache/thrift/commit/10098945c31fa0ef07b82af6afd1fdd00241c932])
* lib/js/test/test.js
* lib/js/test/test_handler.js
* lib/js/test/server_http.js
* lib/js/test/server_https.js
* lib/js/test/test-jq.js
* lib/js/test/test-nojq.js
* lib/js/test/phantomjs-qunit.js
* lib/js/test/test-async.js
* lib/js/test/deep-constructor.test.js
* lib/js/src/thrift.js
* lib/js/test/phantom-client.js


> Missing basic code style consistency of JavaScript.
> ---
>
> Key: THRIFT-3627
> URL: https://issues.apache.org/jira/browse/THRIFT-3627
> Project: Thrift
>  Issue Type: Improvement
>  Components: JavaScript - Library
>Reporter: Kazuki Matsuda
>Priority: Minor
>
> E.g.)
> * No white space in {code}function(args){// beteween `){`{code}
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L1497
> * "Double quoted" (not 'single quoted') string litteral
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L133
> Those errors can be easily fixed by fixjsstyle.



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


[jira] [Commented] (THRIFT-3627) Missing basic code style consistency of JavaScript.

2016-02-13 Thread Aki Sukegawa (JIRA)

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

Aki Sukegawa commented on THRIFT-3627:
--

+1 for white space changes, as git history pollution can be mostly worked 
around by "git blame -w".

Things that I'm not sure about:

* double quotes -> single quotes
* removing trailing commas after last elements of arrays/objects
* removing quotes from object keys

Are they that "strange" in the Node.js world ?

> Missing basic code style consistency of JavaScript.
> ---
>
> Key: THRIFT-3627
> URL: https://issues.apache.org/jira/browse/THRIFT-3627
> Project: Thrift
>  Issue Type: Improvement
>  Components: JavaScript - Library
>Reporter: Kazuki Matsuda
>Priority: Minor
>
> E.g.)
> * No white space in {code}function(args){// beteween `){`{code}
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L1497
> * "Double quoted" (not 'single quoted') string litteral
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L133
> Those errors can be easily fixed by fixjsstyle.



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


[GitHub] thrift pull request: THRIFT-3627 fix missing basic code style cons...

2016-02-13 Thread kazuki-ma
Github user kazuki-ma closed the pull request at:

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


---
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.
---


[GitHub] thrift pull request: THRIFT-3627 fix missing basic code style cons...

2016-02-13 Thread kazuki-ma
GitHub user kazuki-ma reopened a pull request:

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

THRIFT-3627 fix missing basic code style consistency of JavaScript.



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

$ git pull https://github.com/kazuki-ma/thrift THRIFT-3627

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

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


commit 7387528fd19bc13c3b5b35983ecf0dd55c4df4f5
Author: Kazuki Matsuda 
Date:   2016-02-13T10:36:09Z

THRIFT-3627 fix missing basic code style consistency of JavaScript.




---
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-3627) Missing basic code style consistency of JavaScript.

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3627:


Github user kazuki-ma closed the pull request at:

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


> Missing basic code style consistency of JavaScript.
> ---
>
> Key: THRIFT-3627
> URL: https://issues.apache.org/jira/browse/THRIFT-3627
> Project: Thrift
>  Issue Type: Improvement
>  Components: JavaScript - Library
>Reporter: Kazuki Matsuda
>Priority: Minor
>
> E.g.)
> * No white space in {code}function(args){// beteween `){`{code}
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L1497
> * "Double quoted" (not 'single quoted') string litteral
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L133
> Those errors can be easily fixed by fixjsstyle.



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


[jira] [Commented] (THRIFT-3627) Missing basic code style consistency of JavaScript.

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3627:


GitHub user kazuki-ma reopened a pull request:

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

THRIFT-3627 fix missing basic code style consistency of JavaScript.



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

$ git pull https://github.com/kazuki-ma/thrift THRIFT-3627

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

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


commit 7387528fd19bc13c3b5b35983ecf0dd55c4df4f5
Author: Kazuki Matsuda 
Date:   2016-02-13T10:36:09Z

THRIFT-3627 fix missing basic code style consistency of JavaScript.




> Missing basic code style consistency of JavaScript.
> ---
>
> Key: THRIFT-3627
> URL: https://issues.apache.org/jira/browse/THRIFT-3627
> Project: Thrift
>  Issue Type: Improvement
>  Components: JavaScript - Library
>Reporter: Kazuki Matsuda
>Priority: Minor
>
> E.g.)
> * No white space in {code}function(args){// beteween `){`{code}
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L1497
> * "Double quoted" (not 'single quoted') string litteral
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L133
> Those errors can be easily fixed by fixjsstyle.



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


[jira] [Commented] (THRIFT-3620) Cleanup and consolidate Thrift* jenkins jobs.

2016-02-13 Thread Jake Farrell (JIRA)

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

Jake Farrell commented on THRIFT-3620:
--

+1 to adding the exec script for jenkins to /build/jenkins/run_tests.sh or 
something so others can modify without needing jenkins perms

> Cleanup and consolidate Thrift* jenkins jobs.
> -
>
> Key: THRIFT-3620
> URL: https://issues.apache.org/jira/browse/THRIFT-3620
> Project: Thrift
>  Issue Type: Task
>  Components: Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> I spent some time resurrecting the 
> [Thrift-precommit|https://builds.apache.org/job/Thrift-precommit/] job which 
> vets pull-requests to use the pool of docker slaves using a dockerized CI 
> with guidance from [~jfarrell].  The remaining crop of Thrift* jobs should be 
> culled and converted as appropriate.
> Currently we have the jobs 
> [here|https://builds.apache.org/view/S-Z/view/Thrift/]:
> {noformat}
> $ curl --netrc -sS https://builds.apache.org/view/S-Z/view/Thrift/config.xml 
> | xmllint -xpath "//jobNames" - | grep "" | cut -d'>' -f2 | cut -d'<' 
> -f1
> Thrift
> Thrift-all
> Thrift-Compiler-Linux64
> Thrift-Compiler-Windows
> Thrift-env
> Thrift-env-Windows
> Thrift-Test
> Thrift-Windows
> {noformat}
> Of those, [Thrift-env|https://builds.apache.org/job/Thrift-env], 
> [Thrift-env-Windows|https://builds.apache.org/job/Thrift-env-Windows] and 
> [Thrift-Windows|https://builds.apache.org/job/Thrift-Windows] are all 
> disabled and [Thrift|https://builds.apache.org/job/Thrift] and 
> [Thrift-Compiler-Linux64|https://builds.apache.org/job/Thrift-Compiler-Linux64]
>  seem to be unused based on last run dates.  This leaves the following active 
> jobs fwict:
> * [|https://builds.apache.org/job/Thrift-all]
> * [|https://builds.apache.org/job/Thrift-Compiler-Windows]
> * [|https://builds.apache.org/job/Thrift-precommit]
> Of these {{Thrift-all}} is broken in a known-way, it really needs to be 
> converted to use a Dockerized build like {{Thrift-precommit}} to be insulated 
> from the vagaries of the underlying worker machines.
> I propose deltion of all disabled (3) and inactive (2) jobs listed above and 
> conversion of {{Thrift-all}} to a Dockerized CI job to guard master with.



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


[jira] [Commented] (THRIFT-3627) Missing basic code style consistency of JavaScript.

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3627:


SUCCESS: Integrated in Thrift-precommit #120 (See 
[https://builds.apache.org/job/Thrift-precommit/120/])
THRIFT-3627 fix missing basic code style consistency of JavaScript. 
(matsuda.kazuki: 
[https://github.com/apache/thrift/commit/7387528fd19bc13c3b5b35983ecf0dd55c4df4f5])
* lib/js/test/test.js
* lib/js/test/test-jq.js
* lib/js/test/server_http.js
* lib/js/test/deep-constructor.test.js
* lib/js/test/test-async.js
* lib/js/test/test_handler.js
* lib/js/test/phantom-client.js
* lib/js/src/thrift.js
* lib/js/test/phantomjs-qunit.js
* lib/js/test/test-nojq.js
* lib/js/test/server_https.js


> Missing basic code style consistency of JavaScript.
> ---
>
> Key: THRIFT-3627
> URL: https://issues.apache.org/jira/browse/THRIFT-3627
> Project: Thrift
>  Issue Type: Improvement
>  Components: JavaScript - Library
>Reporter: Kazuki Matsuda
>Priority: Minor
>
> E.g.)
> * No white space in {code}function(args){// beteween `){`{code}
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L1497
> * "Double quoted" (not 'single quoted') string litteral
> https://github.com/apache/thrift/blob/84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b/lib/js/src/thrift.js#L133
> Those errors can be easily fixed by fixjsstyle.



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


[GitHub] thrift pull request: THRIFT-3623 Fix cpp/lib/test/TSSLSocketInterr...

2016-02-13 Thread nsuke
Github user nsuke commented on a diff in the pull request:

https://github.com/apache/thrift/pull/854#discussion_r52828211
  
--- Diff: lib/cpp/test/TSSLSocketInterruptTest.cpp ---
@@ -91,8 +90,6 @@ BOOST_GLOBAL_FIXTURE(GlobalFixtureSSL);
 BOOST_GLOBAL_FIXTURE(GlobalFixtureSSL)
 #endif
 
-BOOST_FIXTURE_TEST_SUITE(TSSLSocketInterruptTest, TestPortFixture)
--- End diff --

Can you keep 3 of these as BOOST_**AUTO**_TEST_SUITE ?

This would remove a namespace and put everything into global namespace.
In this regard, it seems that this one should have been placed before the 
`keyDir` symbol already...



---
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-3623) Fix Fix cpp/lib/test/TSSLSocketInterruptTest.cpp to use ephemeral ports

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3623:


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

https://github.com/apache/thrift/pull/854#discussion_r52828211
  
--- Diff: lib/cpp/test/TSSLSocketInterruptTest.cpp ---
@@ -91,8 +90,6 @@ BOOST_GLOBAL_FIXTURE(GlobalFixtureSSL);
 BOOST_GLOBAL_FIXTURE(GlobalFixtureSSL)
 #endif
 
-BOOST_FIXTURE_TEST_SUITE(TSSLSocketInterruptTest, TestPortFixture)
--- End diff --

Can you keep 3 of these as BOOST_**AUTO**_TEST_SUITE ?

This would remove a namespace and put everything into global namespace.
In this regard, it seems that this one should have been placed before the 
`keyDir` symbol already...



> Fix Fix cpp/lib/test/TSSLSocketInterruptTest.cpp to use ephemeral ports
> ---
>
> Key: THRIFT-3623
> URL: https://issues.apache.org/jira/browse/THRIFT-3623
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TSSLSocketInterruptTest.cpp.



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


[GitHub] thrift pull request: THRIFT-3617 cmake: include `gv` and `xml` gen...

2016-02-13 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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.
---


[GitHub] thrift pull request: THRIFT-3621 Fix lib/cpp/test/SecurityTest.cpp...

2016-02-13 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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.
---


[GitHub] thrift pull request: THRIFT-3625 Kill unused #include "TestPortFix...

2016-02-13 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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.
---


[GitHub] thrift pull request: THRIFT-3612 Add Python C extension for compac...

2016-02-13 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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.
---


[GitHub] thrift pull request: THRIFT-3613 Port Python C extension to Python...

2016-02-13 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-3625) Kill unused #include "TestPortFixture.h" in lib/cpp/test/TServerTransportTest.cpp.

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3625:


Github user asfgit closed the pull request at:

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


> Kill unused #include "TestPortFixture.h" in 
> lib/cpp/test/TServerTransportTest.cpp.
> --
>
> Key: THRIFT-3625
> URL: https://issues.apache.org/jira/browse/THRIFT-3625
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TServerTransportTest.



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


[jira] [Commented] (THRIFT-3621) Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3621:


Github user asfgit closed the pull request at:

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


> Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports
> 
>
> Key: THRIFT-3621
> URL: https://issues.apache.org/jira/browse/THRIFT-3621
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> SecurityTest.



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


[jira] [Commented] (THRIFT-3613) Port Python C extension to Python 3

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3613:


Github user asfgit closed the pull request at:

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


> Port Python C extension to Python 3
> ---
>
> Key: THRIFT-3613
> URL: https://issues.apache.org/jira/browse/THRIFT-3613
> Project: Thrift
>  Issue Type: Improvement
>  Components: Python - Library
>Reporter: Aki Sukegawa
>Assignee: Aki Sukegawa
>
> Python 3 needs fastbinary and compact too.



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


[jira] [Commented] (THRIFT-3617) CMake does not build gv/xml generators

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3617:


Github user asfgit closed the pull request at:

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


> CMake does not build gv/xml generators
> --
>
> Key: THRIFT-3617
> URL: https://issues.apache.org/jira/browse/THRIFT-3617
> Project: Thrift
>  Issue Type: Bug
>  Components: Compiler (General)
>Affects Versions: 0.9.3
>Reporter: Stig Bakken
>Priority: Minor
>




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


[jira] [Commented] (THRIFT-3618) Python TSSLSocket deprecation message should print caller's location

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3618:


Github user asfgit closed the pull request at:

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


> Python TSSLSocket deprecation message should print caller's location
> 
>
> Key: THRIFT-3618
> URL: https://issues.apache.org/jira/browse/THRIFT-3618
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Library
>Reporter: Aki Sukegawa
>Assignee: Aki Sukegawa
>Priority: Minor
>
> deprecation message should print exactly where the method is called, but 
> currently it is printing out the location where the message is emitted.



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


[jira] [Updated] (THRIFT-3617) CMake does not build gv/xml generators

2016-02-13 Thread Aki Sukegawa (JIRA)

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

Aki Sukegawa updated THRIFT-3617:
-
Assignee: Stig Bakken

> CMake does not build gv/xml generators
> --
>
> Key: THRIFT-3617
> URL: https://issues.apache.org/jira/browse/THRIFT-3617
> Project: Thrift
>  Issue Type: Bug
>  Components: Compiler (General)
>Affects Versions: 0.9.3
>Reporter: Stig Bakken
>Assignee: Stig Bakken
>Priority: Minor
>




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


[jira] [Resolved] (THRIFT-3617) CMake does not build gv/xml generators

2016-02-13 Thread Aki Sukegawa (JIRA)

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

Aki Sukegawa resolved THRIFT-3617.
--
   Resolution: Fixed
Fix Version/s: 0.9.4

committed, thanks !

> CMake does not build gv/xml generators
> --
>
> Key: THRIFT-3617
> URL: https://issues.apache.org/jira/browse/THRIFT-3617
> Project: Thrift
>  Issue Type: Bug
>  Components: Compiler (General)
>Affects Versions: 0.9.3
>Reporter: Stig Bakken
>Assignee: Stig Bakken
>Priority: Minor
> Fix For: 0.9.4
>
>




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


[jira] [Resolved] (THRIFT-3621) Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports

2016-02-13 Thread Aki Sukegawa (JIRA)

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

Aki Sukegawa resolved THRIFT-3621.
--
   Resolution: Fixed
Fix Version/s: 0.9.4

committed, thanks !

> Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports
> 
>
> Key: THRIFT-3621
> URL: https://issues.apache.org/jira/browse/THRIFT-3621
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
> Fix For: 0.9.4
>
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> SecurityTest.



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


[jira] [Resolved] (THRIFT-3625) Kill unused #include "TestPortFixture.h" in lib/cpp/test/TServerTransportTest.cpp.

2016-02-13 Thread Aki Sukegawa (JIRA)

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

Aki Sukegawa resolved THRIFT-3625.
--
   Resolution: Fixed
Fix Version/s: 0.9.4

committed, thanks !

> Kill unused #include "TestPortFixture.h" in 
> lib/cpp/test/TServerTransportTest.cpp.
> --
>
> Key: THRIFT-3625
> URL: https://issues.apache.org/jira/browse/THRIFT-3625
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
> Fix For: 0.9.4
>
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TServerTransportTest.



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


[jira] [Commented] (THRIFT-1805) Thrift should not swallow ALL exceptions

2016-02-13 Thread Jens Geyer (JIRA)

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

Jens Geyer commented on THRIFT-1805:


I said very intentionally "*last* line of defense" and "catch *uncaught* 
errors". There is no need to handle things again that are already properly 
handled. Bottom line => +1

> Thrift should not swallow ALL exceptions
> 
>
> Key: THRIFT-1805
> URL: https://issues.apache.org/jira/browse/THRIFT-1805
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler, Java - Library
>Affects Versions: 0.9
>Reporter: Diwaker Gupta
>Assignee: Diwaker Gupta
> Attachments: THRIFT-1805.patch
>
>
> In Thrift 0.8.0, Thrift generated Java code did not swallow application 
> exceptions. As a result of THRIFT-1658, this behavior changed in 0.9.0 and 
> now the generated code swallows ALL application exceptions (via 
> ProcessFunction). Apparently this was the behavior in Thrift 0.6.0 and while 
> I see the rationale, it is breaking our applications.
> Our code relies on the fact that exceptions can propagate outside of Thrift 
> for certain things (e.g., to aggressively drop connections for clients that 
> send invalid/malformed requests). ProcessFunction makes it near impossible to 
> do this -- not only does it swallow the exception, it also loses all 
> information about the original exception and just writes out a generic 
> TApplicationException.
> IMO ProcessFunction should only catch TException. If the application code 
> wants to use other exceptions for some reason (in particular, Errors and 
> RuntimeExceptions), Thrift shouldn't prevent that.



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


Build failed in Jenkins: Thrift-precommit #121

2016-02-13 Thread Apache Jenkins Server
See 

Changes:

[roshan] THRIFT-2877 Generate hashCode using primitives and static utility

[roshan] THRIFT-2877 simplify hashcode generation

[roshan] THRIFT-2877 use original long hashCode

[roshan] TYPE_BYTE is now TYPE_I8

[roshan] Resolve comments

--
[...truncated 3966 lines...]
Unpacking python3-setuptools (3.3-1ubuntu2) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../python3-pip_1.5.4-1ubuntu3_all.deb ...
Unpacking python3-pip (1.5.4-1ubuntu3) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../python3-wheel_0.24.0-1~ubuntu1_all.deb ...
Unpacking python3-wheel (0.24.0-1~ubuntu1) ...
Selecting previously unselected package libpython-dbg:amd64.
Preparing to unpack .../libpython-dbg_2.7.5-5ubuntu3_amd64.deb ...
Unpacking libpython-dbg:amd64 (2.7.5-5ubuntu3) ...
Selecting previously unselected package libpython-all-dbg:amd64.
Preparing to unpack .../libpython-all-dbg_2.7.5-5ubuntu3_amd64.deb ...
Unpacking libpython-all-dbg:amd64 (2.7.5-5ubuntu3) ...
Selecting previously unselected package python2.7-dbg.
Preparing to unpack .../python2.7-dbg_2.7.6-8ubuntu0.2_amd64.deb ...
Unpacking python2.7-dbg (2.7.6-8ubuntu0.2) ...
Selecting previously unselected package python-dbg.
Preparing to unpack .../python-dbg_2.7.5-5ubuntu3_amd64.deb ...
Unpacking python-dbg (2.7.5-5ubuntu3) ...
Selecting previously unselected package python-all-dbg.
Preparing to unpack .../python-all-dbg_2.7.5-5ubuntu3_amd64.deb ...
Unpacking python-all-dbg (2.7.5-5ubuntu3) ...
Selecting previously unselected package python-twisted-conch.
Preparing to unpack .../python-twisted-conch_1%3a13.2.0-1ubuntu1_all.deb ...
Unpacking python-twisted-conch (1:13.2.0-1ubuntu1) ...
Selecting previously unselected package python-twisted.
Preparing to unpack .../python-twisted_13.2.0-1ubuntu1_all.deb ...
Unpacking python-twisted (13.2.0-1ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libpython2.7:amd64 (2.7.6-8ubuntu0.2) ...
Setting up libexpat1-dev:amd64 (2.1.0-4ubuntu1.1) ...
Setting up libpython2.7-dev:amd64 (2.7.6-8ubuntu0.2) ...
Setting up libpython3.4:amd64 (3.4.3-1ubuntu1~14.04.3) ...
Setting up libpython3.4-dev:amd64 (3.4.3-1ubuntu1~14.04.3) ...
Setting up libpython2.7-dbg:amd64 (2.7.6-8ubuntu0.2) ...
Setting up libpython-dev:amd64 (2.7.5-5ubuntu3) ...
Setting up libpython-all-dev:amd64 (2.7.5-5ubuntu3) ...
Setting up libpython3-dev:amd64 (3.4.0-0ubuntu2) ...
Setting up python-all (2.7.5-5ubuntu3) ...
Setting up python2.7-dev (2.7.6-8ubuntu0.2) ...
Setting up python-dev (2.7.5-5ubuntu3) ...
Setting up python-all-dev (2.7.5-5ubuntu3) ...
Setting up python-chardet (2.0.1-2build2) ...
Setting up python3-pkg-resources (3.3-1ubuntu2) ...
Setting up python-chardet-whl (2.2.1-2~ubuntu1) ...
Setting up python-colorama (0.2.5-0.1ubuntu2) ...
Setting up python-colorama-whl (0.2.5-0.1ubuntu2) ...
Setting up python-crypto (2.6.1-4build1) ...
Setting up python-distlib (0.1.8-1ubuntu1) ...
Setting up python-distlib-whl (0.1.8-1ubuntu1) ...
Setting up python-six (1.5.2-1ubuntu1) ...
Setting up python-html5lib (0.999-3~ubuntu1) ...
Setting up python-html5lib-whl (0.999-3~ubuntu1) ...
Setting up python-openssl (0.13-2ubuntu6) ...
Setting up python-pam (0.4.2-13.1ubuntu3) ...
Setting up python-six-whl (1.5.2-1ubuntu1) ...
Setting up python-urllib3-whl (1.7.1-1ubuntu4) ...
Setting up python-requests-whl (2.2.1-1ubuntu0.3) ...
Setting up python-setuptools-whl (3.3-1ubuntu2) ...
Setting up python-pip-whl (1.5.4-1ubuntu3) ...
Setting up python-pkg-resources (3.3-1ubuntu2) ...
Setting up python-urllib3 (1.7.1-1ubuntu4) ...
Setting up python-requests (2.2.1-1ubuntu0.3) ...
Setting up python-setuptools (3.3-1ubuntu2) ...
Setting up python-pip (1.5.4-1ubuntu3) ...
Setting up python-pyasn1 (0.1.7-1ubuntu2) ...
Setting up python-serial (2.6-1build1) ...
Setting up python-support (1.0.15) ...
Setting up python-twisted-bin (13.2.0-1ubuntu1) ...
Setting up python-zope.interface (4.0.5-1ubuntu4) ...
Setting up python-twisted-core (13.2.0-1ubuntu1) ...
Setting up python-twisted-web (13.2.0-1ubuntu1) ...
Setting up python-twisted-lore (13.2.0-1ubuntu1) ...
Setting up python-twisted-mail (13.2.0-1ubuntu1) ...
Setting up python-twisted-names (13.2.0-1ubuntu1) ...
Setting up python-twisted-news (13.2.0-1ubuntu1) ...
Setting up python-twisted-runner (13.2.0-1ubuntu1) ...
Setting up python-twisted-words (13.2.0-1ubuntu1) ...
Setting up python-wheel (0.24.0-1~ubuntu1) ...
Setting up python3-chardet (2.2.1-2~ubuntu1) ...
Setting up python3-colorama (0.2.5-0.1ubuntu2) ...
Setting up python3.4-dev (3.4.3-1ubuntu1~14.04.3) ...
Setting up python3-dev (3.4.0-0ubuntu2) ...
Setting up python3-distlib (0.1.8-1ubuntu1) ...
Setting up python3-six (1.5.2-1ubuntu1) ...
Setting up python3-html5lib (0.999-3~ubuntu1) ...
Setting up python3-urllib3 (1.7.1-1ubuntu4) ...
Setting up python3-requests 

[jira] [Commented] (THRIFT-2877) Optimize generated hashCode

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-2877:


FAILURE: Integrated in Thrift-precommit #121 (See 
[https://builds.apache.org/job/Thrift-precommit/121/])
THRIFT-2877 Generate hashCode using primitives and static utility (roshan: 
[https://github.com/apache/thrift/commit/79416da5f40fdfcbd5cacfba3a457037af7413e7])
* lib/java/src/org/apache/thrift/TBaseHelper.java
* compiler/cpp/src/generate/t_java_generator.cc
THRIFT-2877 simplify hashcode generation (roshan: 
[https://github.com/apache/thrift/commit/517438d7eb813d382fb75852077c260859e789bf])
* compiler/cpp/src/generate/t_java_generator.cc
THRIFT-2877 use original long hashCode (roshan: 
[https://github.com/apache/thrift/commit/8873b2e7436d5e17e189cdb5e1d82b41121a15bf])
* lib/java/src/org/apache/thrift/TBaseHelper.java


> Optimize generated hashCode
> ---
>
> Key: THRIFT-2877
> URL: https://issues.apache.org/jira/browse/THRIFT-2877
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Compiler
>Affects Versions: 0.9.3
>Reporter: Mike Rettig
>Priority: Critical
>
> The generated java hashCode method allocates an ArrayList then appends the 
> fields to the list.  Primitive fields will be boxed when added to the list. 
> The generated code shouldn't allocate a list or box primitives.  The hashCode 
> can be calculated by using a primitive int and some static utility methods 
> which can return the hashCode for each type.
>  out << indent() << "@Override" << endl << indent() << "public int hashCode() 
> {" << endl;
> 1839   indent_up();
> 1840   indent(out) << "List list = new ArrayList();" << endl;
> 1841 
> 1842   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
> 1843 out << endl;
> 1844 
> 1845 t_type* t = get_true_type((*m_iter)->get_type());
> 1846 bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
> 1847 bool can_be_null = type_can_be_null(t);
> 1848 string name = (*m_iter)->get_name();
> 1849 
> 1850 string present = "true";
> 1851 
> 1852 if (is_optional || can_be_null) {
> 1853   present += " && (" + generate_isset_check(*m_iter) + ")";
> 1854 }
> 1855 
> 1856 indent(out) << "boolean present_" << name << " = " << present << ";" 
> << endl;
> 1857 indent(out) << "list.add(present_" << name << ");" << endl;
> 1858 indent(out) << "if (present_" << name << ")" << endl;
> 1859 if (t->is_enum()) {
> 1860   indent(out) << "  list.add(" << name << ".getValue());" << endl;
> 1861 } else {
> 1862   indent(out) << "  list.add(" << name << ");" << endl;
> 1863 }
> 1864   }
> 1865 
> 1866   out << endl;
> 1867   indent(out) << "return list.hashCode();" << endl;
> 1868   indent_down();
> 1869   indent(out) << "}" << endl << endl;
> 1870 }



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


[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...

2016-02-13 Thread roshan
Github user roshan commented on the pull request:

https://github.com/apache/thrift/pull/448#issuecomment-183718878
  
Thanks for the comments, @nsuke . I will squash after builds pass.


---
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-2877) Optimize generated hashCode

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2877:


Github user roshan commented on the pull request:

https://github.com/apache/thrift/pull/448#issuecomment-183718878
  
Thanks for the comments, @nsuke . I will squash after builds pass.


> Optimize generated hashCode
> ---
>
> Key: THRIFT-2877
> URL: https://issues.apache.org/jira/browse/THRIFT-2877
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Compiler
>Affects Versions: 0.9.3
>Reporter: Mike Rettig
>Priority: Critical
>
> The generated java hashCode method allocates an ArrayList then appends the 
> fields to the list.  Primitive fields will be boxed when added to the list. 
> The generated code shouldn't allocate a list or box primitives.  The hashCode 
> can be calculated by using a primitive int and some static utility methods 
> which can return the hashCode for each type.
>  out << indent() << "@Override" << endl << indent() << "public int hashCode() 
> {" << endl;
> 1839   indent_up();
> 1840   indent(out) << "List list = new ArrayList();" << endl;
> 1841 
> 1842   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
> 1843 out << endl;
> 1844 
> 1845 t_type* t = get_true_type((*m_iter)->get_type());
> 1846 bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
> 1847 bool can_be_null = type_can_be_null(t);
> 1848 string name = (*m_iter)->get_name();
> 1849 
> 1850 string present = "true";
> 1851 
> 1852 if (is_optional || can_be_null) {
> 1853   present += " && (" + generate_isset_check(*m_iter) + ")";
> 1854 }
> 1855 
> 1856 indent(out) << "boolean present_" << name << " = " << present << ";" 
> << endl;
> 1857 indent(out) << "list.add(present_" << name << ");" << endl;
> 1858 indent(out) << "if (present_" << name << ")" << endl;
> 1859 if (t->is_enum()) {
> 1860   indent(out) << "  list.add(" << name << ".getValue());" << endl;
> 1861 } else {
> 1862   indent(out) << "  list.add(" << name << ");" << endl;
> 1863 }
> 1864   }
> 1865 
> 1866   out << endl;
> 1867   indent(out) << "return list.hashCode();" << endl;
> 1868   indent_down();
> 1869   indent(out) << "}" << endl << endl;
> 1870 }



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


Build failed in Jenkins: thrift #604

2016-02-13 Thread gmcdonald
See 

Changes:

[nsuke] THRIFT-3617 cmake: include `gv` and `xml` generators in build Client:

[nsuke] THRIFT-3612 Add Python C extension for compact protocol Client: Python

[nsuke] THRIFT-3613 Port Python C extension to Python 3 Client: Python Patch:

[nsuke] THRIFT-3618 Python TSSLSocket deprecation message should print caller's

[nsuke] THRIFT-3621 Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports

[nsuke] THRIFT-3625 Kill unused #include "TestPortFixture.h" in

--
[...truncated 1675 lines...]
[WARNING::369]
 No field key specified for field10, resulting protocol may have conflicts or 
not be backwards compatible!

[WARNING::370]
 No field key specified for field11, resulting protocol may have conflicts or 
not be backwards compatible!

[WARNING::371]
 No field key specified for field12, resulting protocol may have conflicts or 
not be backwards compatible!

[WARNING::42]
 64-bit constant "100" may not work in all languages.

[WARNING::48]
 Consider using the more efficient "binary" type instead of "list".
[WARNING::120]
 Consider using the more efficient "binary" type instead of "list".
[WARNING::160]
 Consider using the more efficient "binary" type instead of "list".
[WARNING::166]
 Consider using the more efficient "binary" type instead of "list".
[WARNING::178]
 64-bit constant "1099511627775" may not work in all languages.

[WARNING::188]
 64-bit constant "4294967295" may not work in all languages.

[WARNING::188]
 64-bit constant "1099511627775" may not work in all languages.

[WARNING::188]
 64-bit constant "281474976710655" may not work in all languages.

[WARNING::188]
 64-bit constant "72057594037927935" may not work in all languages.

[WARNING::188]
 64-bit constant "9223372036854775807" may not work in all languages.

[WARNING::197]
 64-bit constant "4294967295" may not work in all languages.

[WARNING::197]
 64-bit constant "1099511627775" may not work in all languages.

[WARNING::197]
 64-bit constant "281474976710655" may not work in all languages.

[WARNING::197]
 64-bit constant "72057594037927935" may not work in all languages.

[WARNING::197]
 64-bit constant "9223372036854775807" may not work in all languages.

[WARNING::206]
 64-bit constant "9223372036854775807" may not work in all languages.

[WARNING::213]
 64-bit constant "9223372036854775807" may not work in all languages.

[WARNING::360]
 No field key specified for field1, resulting protocol may have conflicts or 
not be backwards compatible!

[WARNING::361]
 No field key specified for field2, resulting protocol may have conflicts or 
not be backwards compatible!

[WARNING::362]
 No field key specified for field3, resulting protocol may have conflicts or 
not be backwards compatible!

[WARNING::363]
 No field key specified for field4, resulting protocol may have conflicts or 
not be backwards compatible!

[WARNING::364]
 No 

[jira] [Commented] (THRIFT-3621) Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3621:


SUCCESS: Integrated in Thrift-precommit #122 (See 
[https://builds.apache.org/job/Thrift-precommit/122/])
THRIFT-3621 Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports (nsuke: 
[https://github.com/apache/thrift/commit/9f0d9619d20632e7f29d7a2edf802e79739fe110])
* lib/cpp/test/SecurityTest.cpp


> Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports
> 
>
> Key: THRIFT-3621
> URL: https://issues.apache.org/jira/browse/THRIFT-3621
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
> Fix For: 0.9.4
>
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> SecurityTest.



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


[jira] [Commented] (THRIFT-3612) Add Python C extension for compact protocol

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3612:


SUCCESS: Integrated in Thrift-precommit #122 (See 
[https://builds.apache.org/job/Thrift-precommit/122/])
THRIFT-3612 Add Python C extension for compact protocol Client: Python (nsuke: 
[https://github.com/apache/thrift/commit/6525f6ae8786a2bcb596e471efb1d76ae74aabee])
* lib/py/src/protocol/fastbinary.c
* lib/py/src/ext/binary.h
* lib/py/src/protocol/TProtocol.py
* lib/py/src/ext/types.h
* compiler/cpp/src/generate/t_py_generator.cc
* lib/py/src/protocol/TBinaryProtocol.py
* test/py/TestServer.py
* lib/py/src/ext/protocol.tcc
* lib/py/src/ext/protocol.h
* test/py/TestClient.py
* test/py/TestEof.py
* test/py/RunClientServer.py
* lib/py/src/ext/compact.cpp
* lib/py/src/protocol/TCompactProtocol.py
* lib/py/src/protocol/TBase.py
* lib/py/src/ext/compact.h
* test/py/TestFrozen.py
* lib/py/src/ext/types.cpp
* test/known_failures_Linux.json
* lib/py/src/ext/endian.h
* lib/py/src/ext/binary.cpp
* test/py/CMakeLists.txt
* test/tests.json
* lib/py/src/ext/module.cpp
* lib/py/setup.py
* test/py/FastbinaryTest.py
* test/py/Makefile.am
* test/py/SerializationTest.py


> Add Python C extension for compact protocol
> ---
>
> Key: THRIFT-3612
> URL: https://issues.apache.org/jira/browse/THRIFT-3612
> Project: Thrift
>  Issue Type: Improvement
>Reporter: Aki Sukegawa
>Assignee: Aki Sukegawa
> Fix For: 0.9.4
>
>
> I've extracted fastbinary.c TBinary implementation to a C++ class and added 
> TCompact counter part.
> It can be used in the same way as TBinaryProtocolAccelerated.
> Note that it now requires C++ compiler but I don't think it affects anyone 
> compiling Thrift Python module.
> Here's a quick benchmark:
> {code}
> $ PYTHONPATH=lib/py/build/lib.linux-x86_64-2.7:test/py/gen-py \
> test/py/FastbinaryTest.py 
> Testing TBinaryAccelerated
> Starting Benchmarks
> HolyMoley Standard = 0.599830
> HolyMoley Acceler. = 0.028437
> FastStruct Standard = 0.151254
> FastStruct Acceler. = 0.01
> Testing TCompactAccelerated
> Starting Benchmarks
> HolyMoley Standard = 1.200082
> HolyMoley Acceler. = 0.029162
> FastStruct Standard = 0.420377
> FastStruct Acceler. = 0.012183
> {code}
> It's ~40x faster than pure python implementation, partly because pure-python 
> TCompact is much slower than TBinary for some reason.



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


[jira] [Commented] (THRIFT-3613) Port Python C extension to Python 3

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3613:


SUCCESS: Integrated in Thrift-precommit #122 (See 
[https://builds.apache.org/job/Thrift-precommit/122/])
THRIFT-3613 Port Python C extension to Python 3 Client: Python Patch: (nsuke: 
[https://github.com/apache/thrift/commit/7af189a2366383538bb9aae394fd5f735976f1d5])
* lib/py/src/ext/types.h
* test/py/TestClient.py
* lib/py/setup.py
* test/py/TestEof.py
* lib/py/src/ext/types.cpp
* lib/py/src/compat.py
* lib/py/test/_import_local_thrift.py
* test/py/RunClientServer.py
* test/py/TestFrozen.py
* lib/py/src/ext/module.cpp
* test/py/SerializationTest.py
* lib/py/src/ext/protocol.tcc
* test/py/TestServer.py
* test/py/FastbinaryTest.py
* test/py/util.py
* test/tests.json
* test/features/local_thrift/__init__.py
* test/known_failures_Linux.json


> Port Python C extension to Python 3
> ---
>
> Key: THRIFT-3613
> URL: https://issues.apache.org/jira/browse/THRIFT-3613
> Project: Thrift
>  Issue Type: Improvement
>  Components: Python - Library
>Reporter: Aki Sukegawa
>Assignee: Aki Sukegawa
> Fix For: 0.9.4
>
>
> Python 3 needs fastbinary and compact too.



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


[jira] [Commented] (THRIFT-3618) Python TSSLSocket deprecation message should print caller's location

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3618:


SUCCESS: Integrated in Thrift-precommit #122 (See 
[https://builds.apache.org/job/Thrift-precommit/122/])
THRIFT-3618 Python TSSLSocket deprecation message should print caller's (nsuke: 
[https://github.com/apache/thrift/commit/6a0ca7ff2750d45346d6d7faaf931de2b6254321])
* lib/py/src/transport/TSSLSocket.py
* lib/py/test/test_sslsocket.py


> Python TSSLSocket deprecation message should print caller's location
> 
>
> Key: THRIFT-3618
> URL: https://issues.apache.org/jira/browse/THRIFT-3618
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Library
>Reporter: Aki Sukegawa
>Assignee: Aki Sukegawa
>Priority: Minor
> Fix For: 0.9.4
>
>
> deprecation message should print exactly where the method is called, but 
> currently it is printing out the location where the message is emitted.



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


[jira] [Commented] (THRIFT-3617) CMake does not build gv/xml generators

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3617:


SUCCESS: Integrated in Thrift-precommit #122 (See 
[https://builds.apache.org/job/Thrift-precommit/122/])
THRIFT-3617 cmake: include `gv` and `xml` generators in build Client: (nsuke: 
[https://github.com/apache/thrift/commit/41e8cbf6866bf9b8ec6d5bbc157a1fb970d8c3cc])
* compiler/cpp/CMakeLists.txt


> CMake does not build gv/xml generators
> --
>
> Key: THRIFT-3617
> URL: https://issues.apache.org/jira/browse/THRIFT-3617
> Project: Thrift
>  Issue Type: Bug
>  Components: Compiler (General)
>Affects Versions: 0.9.3
>Reporter: Stig Bakken
>Assignee: Stig Bakken
>Priority: Minor
> Fix For: 0.9.4
>
>




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


[GitHub] thrift pull request: THRIFT-3623 Fix cpp/lib/test/TSSLSocketInterr...

2016-02-13 Thread jsirois
Github user jsirois commented on a diff in the pull request:

https://github.com/apache/thrift/pull/854#discussion_r52832288
  
--- Diff: lib/cpp/test/TSSLSocketInterruptTest.cpp ---
@@ -91,8 +90,6 @@ BOOST_GLOBAL_FIXTURE(GlobalFixtureSSL);
 BOOST_GLOBAL_FIXTURE(GlobalFixtureSSL)
 #endif
 
-BOOST_FIXTURE_TEST_SUITE(TSSLSocketInterruptTest, TestPortFixture)
--- End diff --

Thanks @nsuke - all fixed up here and in #855 and #857 



---
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] [Created] (THRIFT-3628) Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral ports

2016-02-13 Thread John Sirois (JIRA)
John Sirois created THRIFT-3628:
---

 Summary: Fix lib/cpp/test/TServerIntegrationTest.cpp to use 
ephemeral ports
 Key: THRIFT-3628
 URL: https://issues.apache.org/jira/browse/THRIFT-3628
 Project: Thrift
  Issue Type: Sub-task
  Components: C++ - Library, Test Suite
Reporter: John Sirois
Assignee: John Sirois


As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
TServerIntegrationTest.cpp.



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


[GitHub] thrift pull request: THRIFT-3628 Fix lib/cpp/test/TServerIntegrati...

2016-02-13 Thread jsirois
GitHub user jsirois opened a pull request:

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

THRIFT-3628 Fix lib/cpp/test/TServerIntegrationTest.cpp to use epheme…

…ral ports.

This was already the case for most of the suite, which, besides the one
fixed constructor, retrieved the port to dynamically already.

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

$ git pull https://github.com/jsirois/thrift THRIFT-3628

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

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


commit cb78d569f2d03e202209e6c8c6f517e026c27bff
Author: John Sirois 
Date:   2016-02-13T19:35:58Z

THRIFT-3628 Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral 
ports.

This was already the case for most of the suite, which, besides the one
fixed constructor, retrieved the port to dynamically already.




---
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-3628) Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral ports

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3628:


GitHub user jsirois opened a pull request:

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

THRIFT-3628 Fix lib/cpp/test/TServerIntegrationTest.cpp to use epheme…

…ral ports.

This was already the case for most of the suite, which, besides the one
fixed constructor, retrieved the port to dynamically already.

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

$ git pull https://github.com/jsirois/thrift THRIFT-3628

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

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


commit cb78d569f2d03e202209e6c8c6f517e026c27bff
Author: John Sirois 
Date:   2016-02-13T19:35:58Z

THRIFT-3628 Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral 
ports.

This was already the case for most of the suite, which, besides the one
fixed constructor, retrieved the port to dynamically already.




> Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral ports
> --
>
> Key: THRIFT-3628
> URL: https://issues.apache.org/jira/browse/THRIFT-3628
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TServerIntegrationTest.cpp.



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


[jira] [Commented] (THRIFT-3626) Fix lib/cpp/test/TSocketInterruptTest.cpp to use ephemeral ports.

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3626:


SUCCESS: Integrated in Thrift-precommit #123 (See 
[https://builds.apache.org/job/Thrift-precommit/123/])
THRIFT-3626 Fix lib/cpp/test/TSocketInterruptTest.cpp to use ephemeral 
(jsirois: 
[https://github.com/apache/thrift/commit/7f11b801e59482de1ee5b0e584cdfc4853950410])
* lib/cpp/test/TSocketInterruptTest.cpp


> Fix lib/cpp/test/TSocketInterruptTest.cpp to use ephemeral ports.
> -
>
> Key: THRIFT-3626
> URL: https://issues.apache.org/jira/browse/THRIFT-3626
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TSocketInterruptTest.cpp.



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


[jira] [Commented] (THRIFT-3624) Fix lib/cpp/test/TServerSocketTest.cpp to use ephemeral ports

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3624:


SUCCESS: Integrated in Thrift-precommit #124 (See 
[https://builds.apache.org/job/Thrift-precommit/124/])
THRIFT-3624 Fix lib/cpp/test/TServerSocketTest.cpp to use ephemeral (jsirois: 
[https://github.com/apache/thrift/commit/6bc1a917b6c2210d5fc57e876b535e9cfbebb421])
* lib/cpp/test/TServerSocketTest.cpp


> Fix lib/cpp/test/TServerSocketTest.cpp to use ephemeral ports
> -
>
> Key: THRIFT-3624
> URL: https://issues.apache.org/jira/browse/THRIFT-3624
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TServerSocketTest.



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


[jira] [Commented] (THRIFT-3624) Fix lib/cpp/test/TServerSocketTest.cpp to use ephemeral ports

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3624:


SUCCESS: Integrated in Thrift-precommit #126 (See 
[https://builds.apache.org/job/Thrift-precommit/126/])
THRIFT-3624 Fix lib/cpp/test/TServerSocketTest.cpp to use ephemeral (jsirois: 
[https://github.com/apache/thrift/commit/6bc1a917b6c2210d5fc57e876b535e9cfbebb421])
* lib/cpp/test/TServerSocketTest.cpp


> Fix lib/cpp/test/TServerSocketTest.cpp to use ephemeral ports
> -
>
> Key: THRIFT-3624
> URL: https://issues.apache.org/jira/browse/THRIFT-3624
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TServerSocketTest.



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


[jira] [Commented] (THRIFT-3621) Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3621:


SUCCESS: Integrated in Thrift-precommit #125 (See 
[https://builds.apache.org/job/Thrift-precommit/125/])
THRIFT-3621 Fix cpp/lib/test/TSSLSocketInterruptTest.cpp to use (jsirois: 
[https://github.com/apache/thrift/commit/05957a681915cc484094c2aea3b719e18ebd6750])
* lib/cpp/test/TSSLSocketInterruptTest.cpp


> Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports
> 
>
> Key: THRIFT-3621
> URL: https://issues.apache.org/jira/browse/THRIFT-3621
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
> Fix For: 0.9.4
>
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> SecurityTest.



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


[jira] [Commented] (THRIFT-3623) Fix Fix cpp/lib/test/TSSLSocketInterruptTest.cpp to use ephemeral ports

2016-02-13 Thread John Sirois (JIRA)

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

John Sirois commented on THRIFT-3623:
-

CI went green here: https://builds.apache.org/job/Thrift-precommit/125/

> Fix Fix cpp/lib/test/TSSLSocketInterruptTest.cpp to use ephemeral ports
> ---
>
> Key: THRIFT-3623
> URL: https://issues.apache.org/jira/browse/THRIFT-3623
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TSSLSocketInterruptTest.cpp.



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


Build failed in Jenkins: Thrift-precommit #127

2016-02-13 Thread Apache Jenkins Server
See 

Changes:

[jsirois] THRIFT-3628 Fix lib/cpp/test/TServerIntegrationTest.cpp to use 
ephemeral

--
[...truncated 44337 lines...]
/bin/bash ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../.. -I../../../lib/cpp/src/thrift -I../../../lib/c_glib/src/thrift  
-I../../cpp/src -I/usr/include -I./gen-cpp  -g -Wall -Wextra -pedantic 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include-g -O2 
-std=c++11 -MT gen-cpp/libtestgencpp_la-ThriftTest_types.lo -MD -MP -MF 
gen-cpp/.deps/libtestgencpp_la-ThriftTest_types.Tpo -c -o 
gen-cpp/libtestgencpp_la-ThriftTest_types.lo `test -f 
'gen-cpp/ThriftTest_types.cpp' || echo './'`gen-cpp/ThriftTest_types.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. 
-I../../../lib/cpp/src/thrift -I../../../lib/c_glib/src/thrift -I../../cpp/src 
-I/usr/include -I./gen-cpp -g -Wall -Wextra -pedantic -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -std=c++11 -MT 
gen-cpp/libtestgencpp_la-ThriftTest_types.lo -MD -MP -MF 
gen-cpp/.deps/libtestgencpp_la-ThriftTest_types.Tpo -c 
gen-cpp/ThriftTest_types.cpp  -fPIC -DPIC -o 
gen-cpp/.libs/libtestgencpp_la-ThriftTest_types.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. 
-I../../../lib/cpp/src/thrift -I../../../lib/c_glib/src/thrift -I../../cpp/src 
-I/usr/include -I./gen-cpp -g -Wall -Wextra -pedantic -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -std=c++11 -MT 
gen-cpp/libtestgencpp_la-ThriftTest_types.lo -MD -MP -MF 
gen-cpp/.deps/libtestgencpp_la-ThriftTest_types.Tpo -c 
gen-cpp/ThriftTest_types.cpp -o gen-cpp/libtestgencpp_la-ThriftTest_types.o 
>/dev/null 2>&1
mv -f gen-cpp/.deps/libtestgencpp_la-ThriftTest_types.Tpo 
gen-cpp/.deps/libtestgencpp_la-ThriftTest_types.Plo
/bin/bash ../../../libtool  --tag=CXX   --mode=link g++ -g -Wall -Wextra 
-pedantic -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  
 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include-g -O2 
-std=c++11 -lglib-2.0   -lgobject-2.0 -lglib-2.0 -o libtestgencpp.la  
gen-cpp/libtestgencpp_la-ThriftTest.lo 
gen-cpp/libtestgencpp_la-ThriftTest_constants.lo 
gen-cpp/libtestgencpp_la-ThriftTest_types.lo  -lrt -lpthread 
libtool: link: ar cru .libs/libtestgencpp.a 
gen-cpp/.libs/libtestgencpp_la-ThriftTest.o 
gen-cpp/.libs/libtestgencpp_la-ThriftTest_constants.o 
gen-cpp/.libs/libtestgencpp_la-ThriftTest_types.o 
libtool: link: ranlib .libs/libtestgencpp.a
libtool: link: ( cd ".libs" && rm -f "libtestgencpp.la" && ln -s 
"../libtestgencpp.la" "libtestgencpp.la" )
depbase=`echo testserialization.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift 
-I../../../lib/c_glib/src/thrift  -I../src -I./gen-c_glib  -g -Wall -Wextra 
-pedantic -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  
 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include-g -O2 
-MT testserialization.o -MD -MP -MF $depbase.Tpo -c -o testserialization.o 
testserialization.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/bash ../../../libtool  --tag=CC   --mode=link gcc -g -Wall -Wextra 
-pedantic -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  
 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include-g -O2 
-lglib-2.0   -lgobject-2.0 -lglib-2.0 -o testserialization 
testserialization.o 
../../../lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o
 
../../../lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
 libtestgenc.la -lrt -lpthread 
libtool: link: gcc -g -Wall -Wextra -pedantic -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -o .libs/testserialization 
testserialization.o 
../../../lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o
 
../../../lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
  ./.libs/libtestgenc.a -lgobject-2.0 -lglib-2.0 
/thrift/lib/c_glib/.libs/libthrift_c_glib.so -lrt -lpthread
depbase=`echo testapplicationexception.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift 
-I../../../lib/c_glib/src/thrift  -I../src -I./gen-c_glib  -g -Wall -Wextra 
-pedantic -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  
 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include-g -O2 
-MT testapplicationexception.o -MD -MP -MF $depbase.Tpo -c -o 
testapplicationexception.o 

[jira] [Commented] (THRIFT-3628) Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral ports

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3628:


FAILURE: Integrated in Thrift-precommit #127 (See 
[https://builds.apache.org/job/Thrift-precommit/127/])
THRIFT-3628 Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral 
(jsirois: 
[https://github.com/apache/thrift/commit/cb78d569f2d03e202209e6c8c6f517e026c27bff])
* lib/cpp/test/TServerIntegrationTest.cpp


> Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral ports
> --
>
> Key: THRIFT-3628
> URL: https://issues.apache.org/jira/browse/THRIFT-3628
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C++ - Library, Test Suite
>Reporter: John Sirois
>Assignee: John Sirois
>
> As part of work on THRIFT-3609, eliminate use of TestPortFixture.h from 
> TServerIntegrationTest.cpp.



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


[jira] [Assigned] (THRIFT-3622) Fix deprecated uses of std::auto_ptr

2016-02-13 Thread John Sirois (JIRA)

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

John Sirois reassigned THRIFT-3622:
---

Assignee: John Sirois

> Fix deprecated uses of std::auto_ptr
> 
>
> Key: THRIFT-3622
> URL: https://issues.apache.org/jira/browse/THRIFT-3622
> Project: Thrift
>  Issue Type: Task
>  Components: C++ - Library
>Reporter: John Sirois
>Assignee: John Sirois
>
> We have some in lib/cpp, like so:
> {noformat}
> JSONProtoTest.cpp:35:13: warning: ‘template class std::auto_ptr’ is 
> deprecated [-Wdeprecated-declarations]
>  static std::auto_ptr ooe;
>  ^
> In file included from /usr/include/c++/5.3.0/bits/locale_conv.h:41:0,
>  from /usr/include/c++/5.3.0/locale:43,
>  from /usr/include/c++/5.3.0/iomanip:43,
>  from JSONProtoTest.cpp:22:
> {noformat}



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


[GitHub] thrift pull request: THRIFT-3622 Fix deprecated uses of std::auto_...

2016-02-13 Thread jsirois
GitHub user jsirois opened a pull request:

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

THRIFT-3622 Fix deprecated uses of std::auto_ptr



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

$ git pull https://github.com/jsirois/thrift THRIFT-3622

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

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


commit 95a5eefbce34a7c5766c5015fe0fa8b35d647f28
Author: John Sirois 
Date:   2016-02-13T20:27:03Z

Replace deprecated auto_ptr uses with unique_ptr.




---
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-3622) Fix deprecated uses of std::auto_ptr

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3622:


GitHub user jsirois opened a pull request:

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

THRIFT-3622 Fix deprecated uses of std::auto_ptr



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

$ git pull https://github.com/jsirois/thrift THRIFT-3622

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

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


commit 95a5eefbce34a7c5766c5015fe0fa8b35d647f28
Author: John Sirois 
Date:   2016-02-13T20:27:03Z

Replace deprecated auto_ptr uses with unique_ptr.




> Fix deprecated uses of std::auto_ptr
> 
>
> Key: THRIFT-3622
> URL: https://issues.apache.org/jira/browse/THRIFT-3622
> Project: Thrift
>  Issue Type: Task
>  Components: C++ - Library
>Reporter: John Sirois
>Assignee: John Sirois
>
> We have some in lib/cpp, like so:
> {noformat}
> JSONProtoTest.cpp:35:13: warning: ‘template class std::auto_ptr’ is 
> deprecated [-Wdeprecated-declarations]
>  static std::auto_ptr ooe;
>  ^
> In file included from /usr/include/c++/5.3.0/bits/locale_conv.h:41:0,
>  from /usr/include/c++/5.3.0/locale:43,
>  from /usr/include/c++/5.3.0/iomanip:43,
>  from JSONProtoTest.cpp:22:
> {noformat}



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


[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...

2016-02-13 Thread nsuke
Github user nsuke commented on a diff in the pull request:

https://github.com/apache/thrift/pull/448#discussion_r52825710
  
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -1886,24 +1889,57 @@ void 
t_java_generator::generate_java_struct_equality(ofstream& out, t_struct* ts
 bool can_be_null = type_can_be_null(t);
 string name = (*m_iter)->get_name();
 
-string present = "true";
+if (is_optional || can_be_null) {
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
generate_isset_check(*m_iter)
+  << ") ? " << B_YES << " : " << B_NO << ");" << endl;
+}
 
 if (is_optional || can_be_null) {
-  present += " && (" + generate_isset_check(*m_iter) + ")";
+  indent(out) << "if (" + generate_isset_check(*m_iter) + ")" << endl;
+  indent_up();
 }
 
-indent(out) << "boolean present_" << name << " = " << present << ";" 
<< endl;
-indent(out) << "list.add(present_" << name << ");" << endl;
-indent(out) << "if (present_" << name << ")" << endl;
 if (t->is_enum()) {
-  indent(out) << "  list.add(" << name << ".getValue());" << endl;
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name << 
".getValue();" << endl;
+} else if (t->is_base_type()) {
+  switch(((t_base_type*)t)->get_base()) {
+case t_base_type::TYPE_VOID:
+  break;
+case t_base_type::TYPE_STRING:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ".hashCode();" << endl;
+  break;
+case t_base_type::TYPE_BOOL:
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
name << ") ? "
+  << B_YES << " : " << B_NO << ");" << endl;
+  break;
+case t_base_type::TYPE_I8:
+  indent(out) << "hashCode = hashCode * " << MUL << " + (int) (" 
<< name << ");" << endl;
+  break;
+case t_base_type::TYPE_I16:
+case t_base_type::TYPE_I32:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ";" << endl;
+  break;
+case t_base_type::TYPE_I64:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
+case t_base_type::TYPE_DOUBLE:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
+default:
+  throw "compiler error: the following base type has no hashcode 
generator: " +
+ t_base_type::t_base_name(((t_base_type*)t)->get_base());
--- End diff --

Just a style nit, could you indent switch in the same way as the other part 
of this file (less indentation) ?


---
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.
---


[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...

2016-02-13 Thread nsuke
Github user nsuke commented on a diff in the pull request:

https://github.com/apache/thrift/pull/448#discussion_r52825719
  
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -1886,24 +1889,57 @@ void 
t_java_generator::generate_java_struct_equality(ofstream& out, t_struct* ts
 bool can_be_null = type_can_be_null(t);
 string name = (*m_iter)->get_name();
 
-string present = "true";
+if (is_optional || can_be_null) {
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
generate_isset_check(*m_iter)
+  << ") ? " << B_YES << " : " << B_NO << ");" << endl;
+}
 
 if (is_optional || can_be_null) {
-  present += " && (" + generate_isset_check(*m_iter) + ")";
+  indent(out) << "if (" + generate_isset_check(*m_iter) + ")" << endl;
+  indent_up();
 }
 
-indent(out) << "boolean present_" << name << " = " << present << ";" 
<< endl;
-indent(out) << "list.add(present_" << name << ");" << endl;
-indent(out) << "if (present_" << name << ")" << endl;
 if (t->is_enum()) {
-  indent(out) << "  list.add(" << name << ".getValue());" << endl;
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name << 
".getValue();" << endl;
+} else if (t->is_base_type()) {
+  switch(((t_base_type*)t)->get_base()) {
+case t_base_type::TYPE_VOID:
+  break;
+case t_base_type::TYPE_STRING:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ".hashCode();" << endl;
+  break;
+case t_base_type::TYPE_BOOL:
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
name << ") ? "
+  << B_YES << " : " << B_NO << ");" << endl;
+  break;
+case t_base_type::TYPE_I8:
+  indent(out) << "hashCode = hashCode * " << MUL << " + (int) (" 
<< name << ");" << endl;
+  break;
+case t_base_type::TYPE_I16:
+case t_base_type::TYPE_I32:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ";" << endl;
+  break;
+case t_base_type::TYPE_I64:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
--- End diff --

It seems it can be merged to `TYPE_DOUBLE:` below.


---
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-2877) Optimize generated hashCode

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2877:


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

https://github.com/apache/thrift/pull/448#discussion_r52825719
  
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -1886,24 +1889,57 @@ void 
t_java_generator::generate_java_struct_equality(ofstream& out, t_struct* ts
 bool can_be_null = type_can_be_null(t);
 string name = (*m_iter)->get_name();
 
-string present = "true";
+if (is_optional || can_be_null) {
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
generate_isset_check(*m_iter)
+  << ") ? " << B_YES << " : " << B_NO << ");" << endl;
+}
 
 if (is_optional || can_be_null) {
-  present += " && (" + generate_isset_check(*m_iter) + ")";
+  indent(out) << "if (" + generate_isset_check(*m_iter) + ")" << endl;
+  indent_up();
 }
 
-indent(out) << "boolean present_" << name << " = " << present << ";" 
<< endl;
-indent(out) << "list.add(present_" << name << ");" << endl;
-indent(out) << "if (present_" << name << ")" << endl;
 if (t->is_enum()) {
-  indent(out) << "  list.add(" << name << ".getValue());" << endl;
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name << 
".getValue();" << endl;
+} else if (t->is_base_type()) {
+  switch(((t_base_type*)t)->get_base()) {
+case t_base_type::TYPE_VOID:
+  break;
+case t_base_type::TYPE_STRING:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ".hashCode();" << endl;
+  break;
+case t_base_type::TYPE_BOOL:
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
name << ") ? "
+  << B_YES << " : " << B_NO << ");" << endl;
+  break;
+case t_base_type::TYPE_I8:
+  indent(out) << "hashCode = hashCode * " << MUL << " + (int) (" 
<< name << ");" << endl;
+  break;
+case t_base_type::TYPE_I16:
+case t_base_type::TYPE_I32:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ";" << endl;
+  break;
+case t_base_type::TYPE_I64:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
--- End diff --

It seems it can be merged to `TYPE_DOUBLE:` below.


> Optimize generated hashCode
> ---
>
> Key: THRIFT-2877
> URL: https://issues.apache.org/jira/browse/THRIFT-2877
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Compiler
>Affects Versions: 0.9.3
>Reporter: Mike Rettig
>Priority: Critical
>
> The generated java hashCode method allocates an ArrayList then appends the 
> fields to the list.  Primitive fields will be boxed when added to the list. 
> The generated code shouldn't allocate a list or box primitives.  The hashCode 
> can be calculated by using a primitive int and some static utility methods 
> which can return the hashCode for each type.
>  out << indent() << "@Override" << endl << indent() << "public int hashCode() 
> {" << endl;
> 1839   indent_up();
> 1840   indent(out) << "List list = new ArrayList();" << endl;
> 1841 
> 1842   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
> 1843 out << endl;
> 1844 
> 1845 t_type* t = get_true_type((*m_iter)->get_type());
> 1846 bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
> 1847 bool can_be_null = type_can_be_null(t);
> 1848 string name = (*m_iter)->get_name();
> 1849 
> 1850 string present = "true";
> 1851 
> 1852 if (is_optional || can_be_null) {
> 1853   present += " && (" + generate_isset_check(*m_iter) + ")";
> 1854 }
> 1855 
> 1856 indent(out) << "boolean present_" << name << " = " << present << ";" 
> << endl;
> 1857 indent(out) << "list.add(present_" << name << ");" << endl;
> 1858 indent(out) << "if (present_" << name << ")" << endl;
> 1859 if (t->is_enum()) {
> 1860   indent(out) << "  list.add(" << name << ".getValue());" << endl;
> 1861 } else {
> 1862   indent(out) << "  list.add(" << name << ");" << endl;
> 1863 }
> 1864   }
> 1865 
> 1866   out << endl;
> 1867   indent(out) << "return list.hashCode();" << endl;
> 1868   indent_down();
> 1869   indent(out) << "}" << endl << endl;
> 1870 }



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


[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...

2016-02-13 Thread nsuke
Github user nsuke commented on the pull request:

https://github.com/apache/thrift/pull/448#issuecomment-183632632
  
@roshan I've added comments on minor points. Other than that I think we're 
good to proceed :+1: 


---
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-2877) Optimize generated hashCode

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2877:


Github user nsuke commented on the pull request:

https://github.com/apache/thrift/pull/448#issuecomment-183632632
  
@roshan I've added comments on minor points. Other than that I think we're 
good to proceed :+1: 


> Optimize generated hashCode
> ---
>
> Key: THRIFT-2877
> URL: https://issues.apache.org/jira/browse/THRIFT-2877
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Compiler
>Affects Versions: 0.9.3
>Reporter: Mike Rettig
>Priority: Critical
>
> The generated java hashCode method allocates an ArrayList then appends the 
> fields to the list.  Primitive fields will be boxed when added to the list. 
> The generated code shouldn't allocate a list or box primitives.  The hashCode 
> can be calculated by using a primitive int and some static utility methods 
> which can return the hashCode for each type.
>  out << indent() << "@Override" << endl << indent() << "public int hashCode() 
> {" << endl;
> 1839   indent_up();
> 1840   indent(out) << "List list = new ArrayList();" << endl;
> 1841 
> 1842   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
> 1843 out << endl;
> 1844 
> 1845 t_type* t = get_true_type((*m_iter)->get_type());
> 1846 bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
> 1847 bool can_be_null = type_can_be_null(t);
> 1848 string name = (*m_iter)->get_name();
> 1849 
> 1850 string present = "true";
> 1851 
> 1852 if (is_optional || can_be_null) {
> 1853   present += " && (" + generate_isset_check(*m_iter) + ")";
> 1854 }
> 1855 
> 1856 indent(out) << "boolean present_" << name << " = " << present << ";" 
> << endl;
> 1857 indent(out) << "list.add(present_" << name << ");" << endl;
> 1858 indent(out) << "if (present_" << name << ")" << endl;
> 1859 if (t->is_enum()) {
> 1860   indent(out) << "  list.add(" << name << ".getValue());" << endl;
> 1861 } else {
> 1862   indent(out) << "  list.add(" << name << ");" << endl;
> 1863 }
> 1864   }
> 1865 
> 1866   out << endl;
> 1867   indent(out) << "return list.hashCode();" << endl;
> 1868   indent_down();
> 1869   indent(out) << "}" << endl << endl;
> 1870 }



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


[jira] [Commented] (THRIFT-2877) Optimize generated hashCode

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2877:


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

https://github.com/apache/thrift/pull/448#discussion_r52825674
  
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -1886,24 +1889,57 @@ void 
t_java_generator::generate_java_struct_equality(ofstream& out, t_struct* ts
 bool can_be_null = type_can_be_null(t);
 string name = (*m_iter)->get_name();
 
-string present = "true";
+if (is_optional || can_be_null) {
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
generate_isset_check(*m_iter)
+  << ") ? " << B_YES << " : " << B_NO << ");" << endl;
+}
 
 if (is_optional || can_be_null) {
-  present += " && (" + generate_isset_check(*m_iter) + ")";
+  indent(out) << "if (" + generate_isset_check(*m_iter) + ")" << endl;
+  indent_up();
 }
 
-indent(out) << "boolean present_" << name << " = " << present << ";" 
<< endl;
-indent(out) << "list.add(present_" << name << ");" << endl;
-indent(out) << "if (present_" << name << ")" << endl;
 if (t->is_enum()) {
-  indent(out) << "  list.add(" << name << ".getValue());" << endl;
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name << 
".getValue();" << endl;
+} else if (t->is_base_type()) {
+  switch(((t_base_type*)t)->get_base()) {
+case t_base_type::TYPE_VOID:
+  break;
+case t_base_type::TYPE_STRING:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ".hashCode();" << endl;
+  break;
+case t_base_type::TYPE_BOOL:
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
name << ") ? "
+  << B_YES << " : " << B_NO << ");" << endl;
+  break;
+case t_base_type::TYPE_I8:
+  indent(out) << "hashCode = hashCode * " << MUL << " + (int) (" 
<< name << ");" << endl;
+  break;
+case t_base_type::TYPE_I16:
+case t_base_type::TYPE_I32:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ";" << endl;
+  break;
+case t_base_type::TYPE_I64:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
+case t_base_type::TYPE_DOUBLE:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
+default:
+  throw "compiler error: the following base type has no hashcode 
generator: " +
+ t_base_type::t_base_name(((t_base_type*)t)->get_base());
--- End diff --

We can take this opportunity to stop throwing string here.
As I believe it should never happen (right ?), std::logic_error would be 
appropriate.


> Optimize generated hashCode
> ---
>
> Key: THRIFT-2877
> URL: https://issues.apache.org/jira/browse/THRIFT-2877
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Compiler
>Affects Versions: 0.9.3
>Reporter: Mike Rettig
>Priority: Critical
>
> The generated java hashCode method allocates an ArrayList then appends the 
> fields to the list.  Primitive fields will be boxed when added to the list. 
> The generated code shouldn't allocate a list or box primitives.  The hashCode 
> can be calculated by using a primitive int and some static utility methods 
> which can return the hashCode for each type.
>  out << indent() << "@Override" << endl << indent() << "public int hashCode() 
> {" << endl;
> 1839   indent_up();
> 1840   indent(out) << "List list = new ArrayList();" << endl;
> 1841 
> 1842   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
> 1843 out << endl;
> 1844 
> 1845 t_type* t = get_true_type((*m_iter)->get_type());
> 1846 bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
> 1847 bool can_be_null = type_can_be_null(t);
> 1848 string name = (*m_iter)->get_name();
> 1849 
> 1850 string present = "true";
> 1851 
> 1852 if (is_optional || can_be_null) {
> 1853   present += " && (" + generate_isset_check(*m_iter) + ")";
> 1854 }
> 1855 
> 1856 indent(out) << "boolean present_" << name << " = " << present << ";" 
> << endl;
> 1857 indent(out) << "list.add(present_" << name << ");" << endl;
> 1858 indent(out) << "if (present_" << name << ")" << endl;
> 1859 if (t->is_enum()) {
> 

[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...

2016-02-13 Thread nsuke
Github user nsuke commented on a diff in the pull request:

https://github.com/apache/thrift/pull/448#discussion_r52825674
  
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -1886,24 +1889,57 @@ void 
t_java_generator::generate_java_struct_equality(ofstream& out, t_struct* ts
 bool can_be_null = type_can_be_null(t);
 string name = (*m_iter)->get_name();
 
-string present = "true";
+if (is_optional || can_be_null) {
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
generate_isset_check(*m_iter)
+  << ") ? " << B_YES << " : " << B_NO << ");" << endl;
+}
 
 if (is_optional || can_be_null) {
-  present += " && (" + generate_isset_check(*m_iter) + ")";
+  indent(out) << "if (" + generate_isset_check(*m_iter) + ")" << endl;
+  indent_up();
 }
 
-indent(out) << "boolean present_" << name << " = " << present << ";" 
<< endl;
-indent(out) << "list.add(present_" << name << ");" << endl;
-indent(out) << "if (present_" << name << ")" << endl;
 if (t->is_enum()) {
-  indent(out) << "  list.add(" << name << ".getValue());" << endl;
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name << 
".getValue();" << endl;
+} else if (t->is_base_type()) {
+  switch(((t_base_type*)t)->get_base()) {
+case t_base_type::TYPE_VOID:
+  break;
+case t_base_type::TYPE_STRING:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ".hashCode();" << endl;
+  break;
+case t_base_type::TYPE_BOOL:
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
name << ") ? "
+  << B_YES << " : " << B_NO << ");" << endl;
+  break;
+case t_base_type::TYPE_I8:
+  indent(out) << "hashCode = hashCode * " << MUL << " + (int) (" 
<< name << ");" << endl;
+  break;
+case t_base_type::TYPE_I16:
+case t_base_type::TYPE_I32:
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name 
<< ";" << endl;
+  break;
+case t_base_type::TYPE_I64:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
+case t_base_type::TYPE_DOUBLE:
+  indent(out) << "hashCode = hashCode * " << MUL << " + 
org.apache.thrift.TBaseHelper.hashCode(" << name << ");" << endl;
+  break;
+default:
+  throw "compiler error: the following base type has no hashcode 
generator: " +
+ t_base_type::t_base_name(((t_base_type*)t)->get_base());
--- End diff --

We can take this opportunity to stop throwing string here.
As I believe it should never happen (right ?), std::logic_error would be 
appropriate.


---
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.
---


[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...

2016-02-13 Thread nsuke
Github user nsuke commented on a diff in the pull request:

https://github.com/apache/thrift/pull/448#discussion_r52825698
  
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -1886,24 +1889,57 @@ void 
t_java_generator::generate_java_struct_equality(ofstream& out, t_struct* ts
 bool can_be_null = type_can_be_null(t);
 string name = (*m_iter)->get_name();
 
-string present = "true";
+if (is_optional || can_be_null) {
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
generate_isset_check(*m_iter)
+  << ") ? " << B_YES << " : " << B_NO << ");" << endl;
+}
 
 if (is_optional || can_be_null) {
-  present += " && (" + generate_isset_check(*m_iter) + ")";
+  indent(out) << "if (" + generate_isset_check(*m_iter) + ")" << endl;
+  indent_up();
 }
 
-indent(out) << "boolean present_" << name << " = " << present << ";" 
<< endl;
-indent(out) << "list.add(present_" << name << ");" << endl;
-indent(out) << "if (present_" << name << ")" << endl;
 if (t->is_enum()) {
-  indent(out) << "  list.add(" << name << ".getValue());" << endl;
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name << 
".getValue();" << endl;
+} else if (t->is_base_type()) {
+  switch(((t_base_type*)t)->get_base()) {
+case t_base_type::TYPE_VOID:
+  break;
--- End diff --

As this is a struct field, there should never be void ?
I you agree, let's put similar exception to the one for `default:` below.


---
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-2877) Optimize generated hashCode

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2877:


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

https://github.com/apache/thrift/pull/448#discussion_r52825698
  
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -1886,24 +1889,57 @@ void 
t_java_generator::generate_java_struct_equality(ofstream& out, t_struct* ts
 bool can_be_null = type_can_be_null(t);
 string name = (*m_iter)->get_name();
 
-string present = "true";
+if (is_optional || can_be_null) {
+  indent(out) << "hashCode = hashCode * " << MUL << " + ((" << 
generate_isset_check(*m_iter)
+  << ") ? " << B_YES << " : " << B_NO << ");" << endl;
+}
 
 if (is_optional || can_be_null) {
-  present += " && (" + generate_isset_check(*m_iter) + ")";
+  indent(out) << "if (" + generate_isset_check(*m_iter) + ")" << endl;
+  indent_up();
 }
 
-indent(out) << "boolean present_" << name << " = " << present << ";" 
<< endl;
-indent(out) << "list.add(present_" << name << ");" << endl;
-indent(out) << "if (present_" << name << ")" << endl;
 if (t->is_enum()) {
-  indent(out) << "  list.add(" << name << ".getValue());" << endl;
+  indent(out) << "hashCode = hashCode * " << MUL << " + " << name << 
".getValue();" << endl;
+} else if (t->is_base_type()) {
+  switch(((t_base_type*)t)->get_base()) {
+case t_base_type::TYPE_VOID:
+  break;
--- End diff --

As this is a struct field, there should never be void ?
I you agree, let's put similar exception to the one for `default:` below.


> Optimize generated hashCode
> ---
>
> Key: THRIFT-2877
> URL: https://issues.apache.org/jira/browse/THRIFT-2877
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Compiler
>Affects Versions: 0.9.3
>Reporter: Mike Rettig
>Priority: Critical
>
> The generated java hashCode method allocates an ArrayList then appends the 
> fields to the list.  Primitive fields will be boxed when added to the list. 
> The generated code shouldn't allocate a list or box primitives.  The hashCode 
> can be calculated by using a primitive int and some static utility methods 
> which can return the hashCode for each type.
>  out << indent() << "@Override" << endl << indent() << "public int hashCode() 
> {" << endl;
> 1839   indent_up();
> 1840   indent(out) << "List list = new ArrayList();" << endl;
> 1841 
> 1842   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
> 1843 out << endl;
> 1844 
> 1845 t_type* t = get_true_type((*m_iter)->get_type());
> 1846 bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
> 1847 bool can_be_null = type_can_be_null(t);
> 1848 string name = (*m_iter)->get_name();
> 1849 
> 1850 string present = "true";
> 1851 
> 1852 if (is_optional || can_be_null) {
> 1853   present += " && (" + generate_isset_check(*m_iter) + ")";
> 1854 }
> 1855 
> 1856 indent(out) << "boolean present_" << name << " = " << present << ";" 
> << endl;
> 1857 indent(out) << "list.add(present_" << name << ");" << endl;
> 1858 indent(out) << "if (present_" << name << ")" << endl;
> 1859 if (t->is_enum()) {
> 1860   indent(out) << "  list.add(" << name << ".getValue());" << endl;
> 1861 } else {
> 1862   indent(out) << "  list.add(" << name << ");" << endl;
> 1863 }
> 1864   }
> 1865 
> 1866   out << endl;
> 1867   indent(out) << "return list.hashCode();" << endl;
> 1868   indent_down();
> 1869   indent(out) << "}" << endl << endl;
> 1870 }



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


Jenkins build is back to normal : Thrift-precommit #128

2016-02-13 Thread Apache Jenkins Server
See 



[jira] [Commented] (THRIFT-3622) Fix deprecated uses of std::auto_ptr

2016-02-13 Thread John Sirois (JIRA)

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

John Sirois commented on THRIFT-3622:
-

CI went green here: https://builds.apache.org/job/Thrift-precommit/129/

> Fix deprecated uses of std::auto_ptr
> 
>
> Key: THRIFT-3622
> URL: https://issues.apache.org/jira/browse/THRIFT-3622
> Project: Thrift
>  Issue Type: Task
>  Components: C++ - Library
>Reporter: John Sirois
>Assignee: John Sirois
>
> We have some in lib/cpp, like so:
> {noformat}
> JSONProtoTest.cpp:35:13: warning: ‘template class std::auto_ptr’ is 
> deprecated [-Wdeprecated-declarations]
>  static std::auto_ptr ooe;
>  ^
> In file included from /usr/include/c++/5.3.0/bits/locale_conv.h:41:0,
>  from /usr/include/c++/5.3.0/locale:43,
>  from /usr/include/c++/5.3.0/iomanip:43,
>  from JSONProtoTest.cpp:22:
> {noformat}



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


[jira] [Created] (THRIFT-3629) Parser sets exitcode on errors, but generator does not

2016-02-13 Thread Jens Geyer (JIRA)
Jens Geyer created THRIFT-3629:
--

 Summary: Parser sets exitcode on errors, but generator does not
 Key: THRIFT-3629
 URL: https://issues.apache.org/jira/browse/THRIFT-3629
 Project: Thrift
  Issue Type: Bug
  Components: Compiler (General)
Reporter: Jens Geyer
Assignee: Jens Geyer


In {{main.cc}}, the {{parse()}} function and the {{generate()}} function do 
behave inconsistently w/regard to exceptions being thrown. 

Both functions catch the exception, but ...
 * {{parse()}} exits with code 1 and prints the error to {{stderr}}
 * {{generate()}} only prints the error to {{stdout}} and finally exits with 
code 0

Proposal is to change {{generate()}} similar to the behaviour of {{parse()}}. 
Patch is ready, follows.



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


[jira] [Reopened] (THRIFT-3362) make check fails for C++ at the SecurityTest

2016-02-13 Thread Jens Geyer (JIRA)

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

Jens Geyer reopened THRIFT-3362:

  Assignee: John Sirois  (was: James E. King, III)

> make check fails for C++ at the SecurityTest
> 
>
> Key: THRIFT-3362
> URL: https://issues.apache.org/jira/browse/THRIFT-3362
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library, Test Suite
> Environment: openSUSE
>Reporter: Jens Geyer
>Assignee: John Sirois
>
> When I run "make check" inside {{lib/cpp}} I get this error:
> {code}
> FAIL: SecurityTest
> {code}
> No more information besides that, and all other tests succeed. When I run 
> the SecurityTest test alone, it succeeds - it fails only with make check. I 
> have no idea why, and I can't get the test routine to print more log info to 
> the console with make check. I already tried adding --log_level 
> and --report_level to no avail, again this works well when run standalone.
> I'm a bit stuck here. Maybe the problem lies in my setup, but I have no idea 
> what to look for. Any helpful advice would be really great.



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


[jira] [Closed] (THRIFT-3362) make check fails for C++ at the SecurityTest

2016-02-13 Thread Jens Geyer (JIRA)

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

Jens Geyer closed THRIFT-3362.
--

Works for me.

> make check fails for C++ at the SecurityTest
> 
>
> Key: THRIFT-3362
> URL: https://issues.apache.org/jira/browse/THRIFT-3362
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library, Test Suite
> Environment: openSUSE
>Reporter: Jens Geyer
>Assignee: James E. King, III
>
> When I run "make check" inside {{lib/cpp}} I get this error:
> {code}
> FAIL: SecurityTest
> {code}
> No more information besides that, and all other tests succeed. When I run 
> the SecurityTest test alone, it succeeds - it fails only with make check. I 
> have no idea why, and I can't get the test routine to print more log info to 
> the console with make check. I already tried adding --log_level 
> and --report_level to no avail, again this works well when run standalone.
> I'm a bit stuck here. Maybe the problem lies in my setup, but I have no idea 
> what to look for. Any helpful advice would be really great.



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


[jira] [Closed] (THRIFT-3362) make check fails for C++ at the SecurityTest

2016-02-13 Thread Jens Geyer (JIRA)

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

Jens Geyer closed THRIFT-3362.
--
   Resolution: Fixed
Fix Version/s: 1.0

> make check fails for C++ at the SecurityTest
> 
>
> Key: THRIFT-3362
> URL: https://issues.apache.org/jira/browse/THRIFT-3362
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library, Test Suite
> Environment: openSUSE
>Reporter: Jens Geyer
>Assignee: John Sirois
> Fix For: 1.0
>
>
> When I run "make check" inside {{lib/cpp}} I get this error:
> {code}
> FAIL: SecurityTest
> {code}
> No more information besides that, and all other tests succeed. When I run 
> the SecurityTest test alone, it succeeds - it fails only with make check. I 
> have no idea why, and I can't get the test routine to print more log info to 
> the console with make check. I already tried adding --log_level 
> and --report_level to no avail, again this works well when run standalone.
> I'm a bit stuck here. Maybe the problem lies in my setup, but I have no idea 
> what to look for. Any helpful advice would be really great.



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


[jira] [Commented] (THRIFT-3605) Have the compiler complain about invalid arguments and options

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3605:


GitHub user Jens-G opened a pull request:

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

THRIFT-3605 Have the compiler complain about invalid arguments and op…

…tions

Client: Compiler (general)
Patch: Jens Geyer

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

$ git pull https://github.com/Jens-G/thrift THRIFT-3605

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

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


commit f00354550ced066f9358521ff299b4fc07bc0353
Author: Jens Geyer 
Date:   2016-02-13T22:48:20Z

THRIFT-3605 Have the compiler complain about invalid arguments and options
Client: Compiler (general)
Patch: Jens Geyer




> Have the compiler complain about invalid arguments and options
> --
>
> Key: THRIFT-3605
> URL: https://issues.apache.org/jira/browse/THRIFT-3605
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Jens Geyer
>Assignee: Jens Geyer
>
> As kind of a follow-up to THRIFT-3603, the goal is to have the compiler 
> validate not only the arguments , but also any argument options passed to it. 
> If an unknown option is found, a short error message should be printed 
> similar to what we already have with invalid args:
> {code}
> $ thrift -gen csharp:whoa
> Unrecognized option: whoa
> Usage: thrift [options] file
> Use thrift -help for a list of options
> {code}



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


[jira] [Commented] (THRIFT-3629) Parser sets exitcode on errors, but generator does not

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3629:


GitHub user Jens-G opened a pull request:

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

THRIFT-3629 Parser sets exitcode on errors, but generator does not

Client: Compiler (general)
Patch: Jens Geyer

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

$ git pull https://github.com/Jens-G/thrift THRIFT-3629

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

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


commit ad5732fd5f9d2423e31ed06dc736ef3264a2c34f
Author: Jens Geyer 
Date:   2016-02-13T22:25:11Z

THRIFT-3629 Parser sets exitcode on errors, but generator does not
Client: Compiler (general)
Patch: Jens Geyer




> Parser sets exitcode on errors, but generator does not
> --
>
> Key: THRIFT-3629
> URL: https://issues.apache.org/jira/browse/THRIFT-3629
> Project: Thrift
>  Issue Type: Bug
>  Components: Compiler (General)
>Reporter: Jens Geyer
>Assignee: Jens Geyer
>
> In {{main.cc}}, the {{parse()}} function and the {{generate()}} function do 
> behave inconsistently w/regard to exceptions being thrown. 
> Both functions catch the exception, but ...
>  * {{parse()}} exits with code 1 and prints the error to {{stderr}}
>  * {{generate()}} only prints the error to {{stdout}} and finally exits with 
> code 0
> Proposal is to change {{generate()}} similar to the behaviour of {{parse()}}. 
> Patch is ready, follows.



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


[GitHub] thrift pull request: THRIFT-3629 Parser sets exitcode on errors, b...

2016-02-13 Thread Jens-G
GitHub user Jens-G opened a pull request:

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

THRIFT-3629 Parser sets exitcode on errors, but generator does not

Client: Compiler (general)
Patch: Jens Geyer

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

$ git pull https://github.com/Jens-G/thrift THRIFT-3629

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

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


commit ad5732fd5f9d2423e31ed06dc736ef3264a2c34f
Author: Jens Geyer 
Date:   2016-02-13T22:25:11Z

THRIFT-3629 Parser sets exitcode on errors, but generator does not
Client: Compiler (general)
Patch: Jens Geyer




---
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-3605) Have the compiler complain about invalid arguments and options

2016-02-13 Thread Jens Geyer (JIRA)

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

Jens Geyer commented on THRIFT-3605:


A few comments:

- A few generators did not document all switches, some did not dcoument any 
switches at all. I fixed what I found.

- The Python generator stood out form the crowd by being the least maintainable 
one. I tried hard to no break anything and to mimic the existing behaviour to 
the best of my knowledge, but it was a hard task. If, despite of my efforts, I 
still managed to overlooked some obscure edge case combination, please bear 
with me.


> Have the compiler complain about invalid arguments and options
> --
>
> Key: THRIFT-3605
> URL: https://issues.apache.org/jira/browse/THRIFT-3605
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Jens Geyer
>Assignee: Jens Geyer
>
> As kind of a follow-up to THRIFT-3603, the goal is to have the compiler 
> validate not only the arguments , but also any argument options passed to it. 
> If an unknown option is found, a short error message should be printed 
> similar to what we already have with invalid args:
> {code}
> $ thrift -gen csharp:whoa
> Unrecognized option: whoa
> Usage: thrift [options] file
> Use thrift -help for a list of options
> {code}



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


Build failed in Jenkins: Thrift-precommit #131

2016-02-13 Thread Apache Jenkins Server
See 

Changes:

[jensg] THRIFT-3605 Have the compiler complain about invalid arguments and

--
[...truncated 3463 lines...]
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:217: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac]   struct.setField_ = null;
[javac] ^
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:226: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac] struct.setField_ = struct.enumForId(field.id);
[javac]   ^
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:243: warning: 
[unchecked] unchecked call to getFieldDesc(F) as a member of the raw type TUnion
[javac]   oprot.writeFieldBegin(struct.getFieldDesc(struct.setField_));
[javac]^
[javac]   where F is a type-variable:
[javac] F extends TFieldIdEnum declared in class TUnion
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:252: warning: 
[unchecked] getScheme() in TUnionTupleSchemeFactory implements getScheme() 
in SchemeFactory
[javac] public TUnionTupleScheme getScheme() {
[javac]  ^
[javac]   return type requires unchecked conversion from TUnionTupleScheme 
to S
[javac]   where S is a type-variable:
[javac] S extends IScheme declared in method getScheme()
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:261: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac]   struct.setField_ = null;
[javac] ^
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:266: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac] struct.setField_ = struct.enumForId(fieldID);
[javac]   ^
[javac] 
/thrift/lib/java/src/org/apache/thrift/async/TAsyncMethodCall.java:229: 
warning: [unchecked] unchecked cast
[javac] callback.onComplete((T)this);
[javac]^
[javac]   required: T
[javac]   found:TAsyncMethodCall
[javac]   where T is a type-variable:
[javac] T extends Object declared in class TAsyncMethodCall
[javac] Note: 
/thrift/lib/java/src/org/apache/thrift/transport/THttpClient.java uses or 
overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 45 warnings

dist:
[mkdir] Created dir: /thrift/lib/java/build/META-INF
 [copy] Copying 1 file to /thrift/lib/java/build/META-INF
 [copy] Copying 1 file to /thrift/lib/java/build/META-INF
  [jar] Building jar: /thrift/lib/java/build/libthrift-1.0.0.jar

BUILD SUCCESSFUL
Total time: 9 seconds
make  check-local
make[3]: Entering directory `/thrift/lib/java'
/usr/bin/ant 
Buildfile: /thrift/lib/java/build.xml

setup.init:

mvn.ant.tasks.check:

proxy:

mvn.ant.tasks.download:
  [get] Getting: 
http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
  [get] To: /thrift/lib/java/build/tools/maven-ant-tasks-2.1.3.jar
  [get] Not modified - so not downloaded

mvn.init:
[artifact:dependencies] [WARNING] Overriding profile: 
'maven-ant-tasks-repo-profile' (source: pom) with new instance from source: pom

init:

compile:

dist:

BUILD SUCCESSFUL
Total time: 3 seconds
/usr/bin/ant  test
Buildfile: /thrift/lib/java/build.xml

optional-generate:

generate:
 [exec] [WARNING:/thrift/test/ThriftTest.thrift:83] The "byte" type is a 
compatibility alias for "i8". Use "i8" to emphasize the signedness of this type.
 [exec] 
 [exec] [WARNING:/thrift/test/ThriftTest.thrift:44] No generator named 
'noexist' could be found!
 [exec] [WARNING:/thrift/test/ThriftTest.thrift:46] cpp generator does not 
accept 'noexist' as sub-namespace!
 [exec] Error: unknown option java:hashcode
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:39] The "byte" type is 
a compatibility alias for "i8". Use "i8" to emphasize the signedness of this 
type.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:42] 64-bit constant 
"100" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:178] 64-bit constant 
"1099511627775" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:188] 64-bit constant 
"4294967295" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:188] 64-bit constant 
"1099511627775" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:188] 64-bit constant 
"281474976710655" may not work in all languages.
 [exec] 
 [exec] 

[jira] [Commented] (THRIFT-3629) Parser sets exitcode on errors, but generator does not

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3629:


FAILURE: Integrated in Thrift-precommit #130 (See 
[https://builds.apache.org/job/Thrift-precommit/130/])
THRIFT-3629 Parser sets exitcode on errors, but generator does not (jensg: 
[https://github.com/apache/thrift/commit/ad5732fd5f9d2423e31ed06dc736ef3264a2c34f])
* compiler/cpp/src/main.cc


> Parser sets exitcode on errors, but generator does not
> --
>
> Key: THRIFT-3629
> URL: https://issues.apache.org/jira/browse/THRIFT-3629
> Project: Thrift
>  Issue Type: Bug
>  Components: Compiler (General)
>Reporter: Jens Geyer
>Assignee: Jens Geyer
>
> In {{main.cc}}, the {{parse()}} function and the {{generate()}} function do 
> behave inconsistently w/regard to exceptions being thrown. 
> Both functions catch the exception, but ...
>  * {{parse()}} exits with code 1 and prints the error to {{stderr}}
>  * {{generate()}} only prints the error to {{stdout}} and finally exits with 
> code 0
> Proposal is to change {{generate()}} similar to the behaviour of {{parse()}}. 
> Patch is ready, follows.



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


[jira] [Commented] (THRIFT-3605) Have the compiler complain about invalid arguments and options

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3605:


FAILURE: Integrated in Thrift-precommit #131 (See 
[https://builds.apache.org/job/Thrift-precommit/131/])
THRIFT-3605 Have the compiler complain about invalid arguments and (jensg: 
[https://github.com/apache/thrift/commit/f00354550ced066f9358521ff299b4fc07bc0353])
* compiler/cpp/src/generate/t_go_generator.cc
* compiler/cpp/src/generate/t_delphi_generator.cc
* compiler/cpp/src/generate/t_hs_generator.cc
* compiler/cpp/src/generate/t_perl_generator.cc
* compiler/cpp/src/generate/t_xsd_generator.cc
* compiler/cpp/src/generate/t_st_generator.cc
* compiler/cpp/src/generate/t_gv_generator.cc
* compiler/cpp/src/generate/t_json_generator.cc
* compiler/cpp/src/generate/t_php_generator.cc
* compiler/cpp/src/generate/t_d_generator.cc
* compiler/cpp/src/generate/t_rb_generator.cc
* compiler/cpp/src/generate/t_lua_generator.cc
* compiler/cpp/src/generate/t_xml_generator.cc
* compiler/cpp/src/generate/t_haxe_generator.cc
* compiler/cpp/src/generate/t_html_generator.cc
* compiler/cpp/src/generate/t_dart_generator.cc
* compiler/cpp/src/generate/t_swift_generator.cc
* compiler/cpp/src/generate/t_ocaml_generator.cc
* compiler/cpp/src/generate/t_erl_generator.cc
* compiler/cpp/src/generate/t_as3_generator.cc
* compiler/cpp/src/generate/t_js_generator.cc
* compiler/cpp/src/generate/t_cpp_generator.cc
* compiler/cpp/src/generate/t_java_generator.cc
* compiler/cpp/src/generate/t_csharp_generator.cc
* compiler/cpp/src/generate/t_c_glib_generator.cc
* compiler/cpp/src/generate/t_py_generator.cc
* compiler/cpp/src/generate/t_javame_generator.cc
* compiler/cpp/src/generate/t_cocoa_generator.cc


> Have the compiler complain about invalid arguments and options
> --
>
> Key: THRIFT-3605
> URL: https://issues.apache.org/jira/browse/THRIFT-3605
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Jens Geyer
>Assignee: Jens Geyer
>
> As kind of a follow-up to THRIFT-3603, the goal is to have the compiler 
> validate not only the arguments , but also any argument options passed to it. 
> If an unknown option is found, a short error message should be printed 
> similar to what we already have with invalid args:
> {code}
> $ thrift -gen csharp:whoa
> Unrecognized option: whoa
> Usage: thrift [options] file
> Use thrift -help for a list of options
> {code}



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


Build failed in Jenkins: Thrift-precommit #135

2016-02-13 Thread Apache Jenkins Server
See 

--
GitHub pull request #863 to apache/thrift
GitHub pull request #863 to apache/thrift
[EnvInject] - Loading node environment variables.
Building remotely on H10 (docker Ubuntu ubuntu yahoo-not-h2) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/apache/thrift.git # 
 > timeout=10
Fetching upstream changes from https://github.com/apache/thrift.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://github.com/apache/thrift.git +refs/heads/*:refs/remotes/origin/*
 > git config core.sparsecheckout # timeout=10
 > git checkout -f origin/master # timeout=10
 > git branch -a # timeout=10
 > git rev-parse master^{commit} # timeout=10
 > git rev-parse remotes/origin/0.1.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.2.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.3.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.4.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.5.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.6.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.7.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.8.x^{commit} # timeout=10
 > git rev-parse remotes/origin/0.9.1^{commit} # timeout=10
 > git rev-parse remotes/origin/0.9.2^{commit} # timeout=10
 > git rev-parse remotes/origin/0.9.3^{commit} # timeout=10
 > git rev-parse remotes/origin/0.9.x^{commit} # timeout=10
 > git rev-parse remotes/origin/master^{commit} # timeout=10
 > git rev-parse remotes/origin/py-compiler^{commit} # timeout=10
 > git branch -D master # timeout=10
 > git checkout -b master origin/master
  Opening connection
Done: 0
  Counting objects
Done: 38
  Finding sources
Done: 38
  Getting sizes
Done: 32
  Compressing objects
Done: 0
  Writing objects
Done: 38
  remote: Resolving deltas
  remote: Updating references
Merging refs/tags/changes/135
 > git rev-parse refs/tags/changes/135^{commit} # timeout=10
 > git merge 880e559e185d24005893d412f65e0199656e89a2 # timeout=10
FATAL: Could not merge AnyObjectId[880e559e185d24005893d412f65e0199656e89a2]
hudson.plugins.git.GitException: Could not merge 
AnyObjectId[880e559e185d24005893d412f65e0199656e89a2]
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$3.execute(CliGitAPIImpl.java:589)
at 
org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.merge(AbstractGitAPIImpl.java:87)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.merge(CliGitAPIImpl.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:326)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ..remote call to H10(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:778)
at 
hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:250)
at com.sun.proxy.$Proxy73.merge(Unknown Source)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl.merge(RemoteGitImpl.java:438)
at 
com.cloudbees.jenkins.plugins.git.vmerge.BuildChooserImpl.getCandidateRevisions(BuildChooserImpl.java:107)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:951)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1054)
at hudson.scm.SCM.checkout(SCM.java:484)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1274)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at 

Build failed in Jenkins: Thrift-precommit #133

2016-02-13 Thread Apache Jenkins Server
See 

Changes:

[jensg] THRIFT-3605 Have the compiler complain about invalid arguments and

--
[...truncated 3462 lines...]
[javac] S extends IScheme declared in method getScheme()
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:217: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac]   struct.setField_ = null;
[javac] ^
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:226: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac] struct.setField_ = struct.enumForId(field.id);
[javac]   ^
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:243: warning: 
[unchecked] unchecked call to getFieldDesc(F) as a member of the raw type TUnion
[javac]   oprot.writeFieldBegin(struct.getFieldDesc(struct.setField_));
[javac]^
[javac]   where F is a type-variable:
[javac] F extends TFieldIdEnum declared in class TUnion
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:252: warning: 
[unchecked] getScheme() in TUnionTupleSchemeFactory implements getScheme() 
in SchemeFactory
[javac] public TUnionTupleScheme getScheme() {
[javac]  ^
[javac]   return type requires unchecked conversion from TUnionTupleScheme 
to S
[javac]   where S is a type-variable:
[javac] S extends IScheme declared in method getScheme()
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:261: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac]   struct.setField_ = null;
[javac] ^
[javac] /thrift/lib/java/src/org/apache/thrift/TUnion.java:266: warning: 
[unchecked] unchecked assignment to variable setField_ as member of raw type 
TUnion
[javac] struct.setField_ = struct.enumForId(fieldID);
[javac]   ^
[javac] 
/thrift/lib/java/src/org/apache/thrift/async/TAsyncMethodCall.java:229: 
warning: [unchecked] unchecked cast
[javac] callback.onComplete((T)this);
[javac]^
[javac]   required: T
[javac]   found:TAsyncMethodCall
[javac]   where T is a type-variable:
[javac] T extends Object declared in class TAsyncMethodCall
[javac] Note: 
/thrift/lib/java/src/org/apache/thrift/transport/THttpClient.java uses or 
overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 45 warnings

dist:
[mkdir] Created dir: /thrift/lib/java/build/META-INF
 [copy] Copying 1 file to /thrift/lib/java/build/META-INF
 [copy] Copying 1 file to /thrift/lib/java/build/META-INF
  [jar] Building jar: /thrift/lib/java/build/libthrift-1.0.0.jar

BUILD SUCCESSFUL
Total time: 7 seconds
make  check-local
make[3]: Entering directory `/thrift/lib/java'
/usr/bin/ant 
Buildfile: /thrift/lib/java/build.xml

setup.init:

mvn.ant.tasks.check:

proxy:

mvn.ant.tasks.download:
  [get] Getting: 
http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
  [get] To: /thrift/lib/java/build/tools/maven-ant-tasks-2.1.3.jar
  [get] Not modified - so not downloaded

mvn.init:
[artifact:dependencies] [WARNING] Overriding profile: 
'maven-ant-tasks-repo-profile' (source: pom) with new instance from source: pom

init:

compile:

dist:

BUILD SUCCESSFUL
Total time: 2 seconds
/usr/bin/ant  test
Buildfile: /thrift/lib/java/build.xml

optional-generate:

generate:
 [exec] [WARNING:/thrift/test/ThriftTest.thrift:83] The "byte" type is a 
compatibility alias for "i8". Use "i8" to emphasize the signedness of this type.
 [exec] 
 [exec] [WARNING:/thrift/test/ThriftTest.thrift:44] No generator named 
'noexist' could be found!
 [exec] [WARNING:/thrift/test/ThriftTest.thrift:46] cpp generator does not 
accept 'noexist' as sub-namespace!
 [exec] Error: unknown option java:hashcode
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:39] The "byte" type is 
a compatibility alias for "i8". Use "i8" to emphasize the signedness of this 
type.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:42] 64-bit constant 
"100" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:178] 64-bit constant 
"1099511627775" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:188] 64-bit constant 
"4294967295" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:188] 64-bit constant 
"1099511627775" may not work in all languages.
 [exec] 
 [exec] [WARNING:/thrift/test/DebugProtoTest.thrift:188] 64-bit constant 

Jenkins build is back to normal : Thrift-precommit #132

2016-02-13 Thread Apache Jenkins Server
See 



[jira] [Updated] (THRIFT-3630) Debian/Ubuntu install docs need an update

2016-02-13 Thread Randy Abernethy (JIRA)

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

Randy Abernethy updated THRIFT-3630:

Attachment: 0001-THRIFT-3630-Debian-and-Ubuntu-install-docs-update.patch

patch

> Debian/Ubuntu install docs need an update
> -
>
> Key: THRIFT-3630
> URL: https://issues.apache.org/jira/browse/THRIFT-3630
> Project: Thrift
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 0.9.3
>Reporter: Randy Abernethy
>Assignee: Randy Abernethy
>Priority: Minor
> Fix For: 0.9.4
>
> Attachments: 
> 0001-THRIFT-3630-Debian-and-Ubuntu-install-docs-update.patch
>
>
> Need to add some missing packages to the list (make/boost thread dev), also 
> need to add boost version update for Ubuntu12/Debian7. 
> Should move Java instructions into the language list.



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


[jira] [Commented] (THRIFT-3605) Have the compiler complain about invalid arguments and options

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3605:


FAILURE: Integrated in Thrift-precommit #133 (See 
[https://builds.apache.org/job/Thrift-precommit/133/])
THRIFT-3605 Have the compiler complain about invalid arguments and (jensg: 
[https://github.com/apache/thrift/commit/4f2aaa09eebb8de7e1bb26d9c9e093b3cc8b144a])
* compiler/cpp/src/generate/t_gv_generator.cc
* compiler/cpp/src/generate/t_erl_generator.cc
* compiler/cpp/src/generate/t_xsd_generator.cc
* compiler/cpp/src/generate/t_go_generator.cc
* compiler/cpp/src/generate/t_ocaml_generator.cc
* compiler/cpp/src/generate/t_dart_generator.cc
* compiler/cpp/src/generate/t_hs_generator.cc
* compiler/cpp/src/generate/t_java_generator.cc
* compiler/cpp/src/generate/t_c_glib_generator.cc
* compiler/cpp/src/generate/t_d_generator.cc
* compiler/cpp/src/generate/t_as3_generator.cc
* compiler/cpp/src/generate/t_json_generator.cc
* compiler/cpp/src/generate/t_perl_generator.cc
* compiler/cpp/src/generate/t_html_generator.cc
* compiler/cpp/src/generate/t_py_generator.cc
* compiler/cpp/src/generate/t_swift_generator.cc
* compiler/cpp/src/generate/t_javame_generator.cc
* compiler/cpp/src/generate/t_cocoa_generator.cc
* compiler/cpp/src/generate/t_csharp_generator.cc
* compiler/cpp/src/generate/t_haxe_generator.cc
* compiler/cpp/src/generate/t_rb_generator.cc
* compiler/cpp/src/generate/t_cpp_generator.cc
* compiler/cpp/src/generate/t_st_generator.cc
* compiler/cpp/src/generate/t_js_generator.cc
* compiler/cpp/src/generate/t_delphi_generator.cc
* compiler/cpp/src/generate/t_php_generator.cc
* compiler/cpp/src/generate/t_xml_generator.cc
* compiler/cpp/src/generate/t_lua_generator.cc


> Have the compiler complain about invalid arguments and options
> --
>
> Key: THRIFT-3605
> URL: https://issues.apache.org/jira/browse/THRIFT-3605
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Jens Geyer
>Assignee: Jens Geyer
>
> As kind of a follow-up to THRIFT-3603, the goal is to have the compiler 
> validate not only the arguments , but also any argument options passed to it. 
> If an unknown option is found, a short error message should be printed 
> similar to what we already have with invalid args:
> {code}
> $ thrift -gen csharp:whoa
> Unrecognized option: whoa
> Usage: thrift [options] file
> Use thrift -help for a list of options
> {code}



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


[jira] [Commented] (THRIFT-3631) JSON protocol implementation for Lua

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3631:


GitHub user mygityf reopened a pull request:

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

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.

TJsonProtocol.lua is new source of lua for thrift JSON protocol.
Test result is expected of test_basic_server.lua, test_basic_client.lua.
Test cases:
client<-->server
json_protocol_client.lua json_server.go (golang thrift 
server)
json_client.go (golang thrift client) json_protocol_server.lua
json_protocol_client.lua json_protocol_server.lua
test_basic_server.luatest_basic_client.lua

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

$ git pull https://github.com/gityf/thrift master

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

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


commit 0d0cf5aa589389d40a2bd71a9e09e790634aff36
Author: unknown 
Date:   2016-01-28T11:08:05Z

To check element of self whether nil or not,avoid the value(false) of BOOL 
is lost.

eg.
Before:
  if self.argBool then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

After:
  if self.argBool ~= nil then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

Why:
  the value(false) for paramater self.argBool will be lost when condition 
is 'if self.argBool then' as before.

commit 8e61f5ae5cd82ede21d2fad0c67e9328a57a9bc5
Author: unknown 
Date:   2016-01-28T11:29:54Z

This is compact protocol lua implement for thrift.
Here are some description for each source code file.

luabpack.c
 To add bits operation function for thrift compact protocol.
 new functions:
 
l_i64ToZigza,l_i32ToZigzag,l_zigzagToI32,l_zigzagToI64,l_toVarint32,l_toVarint64,l_packMesgType.

TCompactProtocol.lua
 new source of lua for thrift compact protocol.

compact_protocol_client.lua
 test client source code for thrift compact protocol.

compact_protocol_server.lua
 test server source code for thrift compact protocol.

rpc.thrift
 test thrift IDL file for test 
case(compact_protocol_client.lua,compact_protocol_server.lua).

pcap offset hex of rpc test service.txt
 This is dump file create by tcpdump for test case.

Test cases:
 client  <-->   server
 compact_protocol_client.luacompact_server.go (golang 
thrift server)
 compact_client.go (golang thrift client)   compact_protocol_server.lua
 compact_protocol_client.luacompact_protocol_server.lua

Test console log:
log for compact_protocol_client.lua:
1   return 1 by FunCall.
2   return 2 by FunCall.

log for compact_protocol_server.lua:
53  54  12  43  11.22   str value
53  54  12  34  11.22   login
namenamess
passvpass
10  val10
20  val20
ele1
ele3
ele2
l1.
l2.

commit df693bf78aaf9fd37eff5d972ed6225cd5e88e38
Author: WangYaofu 
Date:   2016-02-04T07:29:36Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift.

To fix bug:
Examples of problematic valus were negative i8 values (-128 ~ -1), some i32 
values (0x4000, -1 ...), i64 values.

commit 982c519b855a6fcdb1b8b49951cd6f8d39c8c8bb
Author: Wang Yaofu 
Date:   2016-02-04T07:40:37Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift. 

#ifdef against Lua version macro added.
lua_objlen for version macro _LUA51_ for lua5.1.
lua_rawlen for lua5.2+.

commit 880e559e185d24005893d412f65e0199656e89a2
Author: WangYaofu 
Date:   2016-02-14T03:26:36Z

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.
TJsonProtocol.lua is new source of lua for thrift JSON protocol.




> JSON protocol implementation for Lua
> 
>
> Key: THRIFT-3631
> URL: https://issues.apache.org/jira/browse/THRIFT-3631
> Project: Thrift
>  Issue Type: Improvement
>  Components: Lua - Library
>Affects Versions: 0.9.3
> Environment: Linux Mac Windows
>

[GitHub] thrift pull request: THRIFT-3631 Lua-This is JSON protocol impleme...

2016-02-13 Thread mygityf
GitHub user mygityf reopened a pull request:

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

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.

TJsonProtocol.lua is new source of lua for thrift JSON protocol.
Test result is expected of test_basic_server.lua, test_basic_client.lua.
Test cases:
client<-->server
json_protocol_client.lua json_server.go (golang thrift 
server)
json_client.go (golang thrift client) json_protocol_server.lua
json_protocol_client.lua json_protocol_server.lua
test_basic_server.luatest_basic_client.lua

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

$ git pull https://github.com/gityf/thrift master

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

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


commit 0d0cf5aa589389d40a2bd71a9e09e790634aff36
Author: unknown 
Date:   2016-01-28T11:08:05Z

To check element of self whether nil or not,avoid the value(false) of BOOL 
is lost.

eg.
Before:
  if self.argBool then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

After:
  if self.argBool ~= nil then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

Why:
  the value(false) for paramater self.argBool will be lost when condition 
is 'if self.argBool then' as before.

commit 8e61f5ae5cd82ede21d2fad0c67e9328a57a9bc5
Author: unknown 
Date:   2016-01-28T11:29:54Z

This is compact protocol lua implement for thrift.
Here are some description for each source code file.

luabpack.c
 To add bits operation function for thrift compact protocol.
 new functions:
 
l_i64ToZigza,l_i32ToZigzag,l_zigzagToI32,l_zigzagToI64,l_toVarint32,l_toVarint64,l_packMesgType.

TCompactProtocol.lua
 new source of lua for thrift compact protocol.

compact_protocol_client.lua
 test client source code for thrift compact protocol.

compact_protocol_server.lua
 test server source code for thrift compact protocol.

rpc.thrift
 test thrift IDL file for test 
case(compact_protocol_client.lua,compact_protocol_server.lua).

pcap offset hex of rpc test service.txt
 This is dump file create by tcpdump for test case.

Test cases:
 client  <-->   server
 compact_protocol_client.luacompact_server.go (golang 
thrift server)
 compact_client.go (golang thrift client)   compact_protocol_server.lua
 compact_protocol_client.luacompact_protocol_server.lua

Test console log:
log for compact_protocol_client.lua:
1   return 1 by FunCall.
2   return 2 by FunCall.

log for compact_protocol_server.lua:
53  54  12  43  11.22   str value
53  54  12  34  11.22   login
namenamess
passvpass
10  val10
20  val20
ele1
ele3
ele2
l1.
l2.

commit df693bf78aaf9fd37eff5d972ed6225cd5e88e38
Author: WangYaofu 
Date:   2016-02-04T07:29:36Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift.

To fix bug:
Examples of problematic valus were negative i8 values (-128 ~ -1), some i32 
values (0x4000, -1 ...), i64 values.

commit 982c519b855a6fcdb1b8b49951cd6f8d39c8c8bb
Author: Wang Yaofu 
Date:   2016-02-04T07:40:37Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift. 

#ifdef against Lua version macro added.
lua_objlen for version macro _LUA51_ for lua5.1.
lua_rawlen for lua5.2+.

commit 880e559e185d24005893d412f65e0199656e89a2
Author: WangYaofu 
Date:   2016-02-14T03:26:36Z

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.
TJsonProtocol.lua is new source of lua for thrift JSON protocol.




---
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.
---


[GitHub] thrift pull request: THRIFT-3631 Lua-This is JSON protocol impleme...

2016-02-13 Thread mygityf
Github user mygityf closed the pull request at:

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


---
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-3631) JSON protocol implementation for Lua

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3631:


Github user mygityf closed the pull request at:

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


> JSON protocol implementation for Lua
> 
>
> Key: THRIFT-3631
> URL: https://issues.apache.org/jira/browse/THRIFT-3631
> Project: Thrift
>  Issue Type: Improvement
>  Components: Lua - Library
>Affects Versions: 0.9.3
> Environment: Linux Mac Windows
>Reporter: WangYaofu
>Assignee: WangYaofu
> Fix For: 0.9.4
>
>
> This is JSON protocol implement for thrift-lua library.
> TJsonProtocol.lua is new source of lua for thrift JSON protocol.



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


[jira] [Resolved] (THRIFT-3630) Debian/Ubuntu install docs need an update

2016-02-13 Thread Randy Abernethy (JIRA)

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

Randy Abernethy resolved THRIFT-3630.
-
Resolution: Fixed

committed

> Debian/Ubuntu install docs need an update
> -
>
> Key: THRIFT-3630
> URL: https://issues.apache.org/jira/browse/THRIFT-3630
> Project: Thrift
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 0.9.3
>Reporter: Randy Abernethy
>Assignee: Randy Abernethy
>Priority: Minor
> Fix For: 0.9.4
>
> Attachments: 
> 0001-THRIFT-3630-Debian-and-Ubuntu-install-docs-update.patch
>
>
> Need to add some missing packages to the list (make/boost thread dev), also 
> need to add boost version update for Ubuntu12/Debian7. 
> Should move Java instructions into the language list.



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


[jira] [Commented] (THRIFT-3605) Have the compiler complain about invalid arguments and options

2016-02-13 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3605:


SUCCESS: Integrated in Thrift-precommit #134 (See 
[https://builds.apache.org/job/Thrift-precommit/134/])
THRIFT-3605 Have the compiler complain about invalid arguments and (jensg: 
[https://github.com/apache/thrift/commit/90803a353677aa605497ebe1970c7e92239d])
* compiler/cpp/src/generate/t_perl_generator.cc
* compiler/cpp/src/generate/t_hs_generator.cc
* compiler/cpp/src/generate/t_rb_generator.cc
* compiler/cpp/src/generate/t_java_generator.cc
* 
contrib/thrift-maven-plugin/src/test/java/org/apache/thrift/maven/TestThrift.java
* compiler/cpp/src/generate/t_cocoa_generator.cc
* 
contrib/thrift-maven-plugin/src/main/java/org/apache/thrift/maven/AbstractThriftMojo.java
* compiler/cpp/src/generate/t_html_generator.cc
* compiler/cpp/src/generate/t_xsd_generator.cc
* compiler/cpp/src/generate/t_php_generator.cc
* compiler/cpp/src/generate/t_st_generator.cc
* compiler/cpp/src/generate/t_c_glib_generator.cc
* compiler/cpp/src/generate/t_erl_generator.cc
* compiler/cpp/src/generate/t_cpp_generator.cc
* compiler/cpp/src/generate/t_json_generator.cc
* compiler/cpp/src/generate/t_dart_generator.cc
* compiler/cpp/src/generate/t_ocaml_generator.cc
* compiler/cpp/src/generate/t_xml_generator.cc
* compiler/cpp/src/generate/t_delphi_generator.cc
* compiler/cpp/src/generate/t_javame_generator.cc
* compiler/cpp/src/generate/t_d_generator.cc
* compiler/cpp/src/generate/t_gv_generator.cc
* compiler/cpp/src/generate/t_haxe_generator.cc
* compiler/cpp/src/generate/t_py_generator.cc
* compiler/cpp/src/generate/t_lua_generator.cc
* compiler/cpp/src/generate/t_js_generator.cc
* compiler/cpp/src/generate/t_go_generator.cc
* compiler/cpp/src/generate/t_csharp_generator.cc
* compiler/cpp/src/generate/t_as3_generator.cc
* lib/java/build.xml
* compiler/cpp/src/generate/t_swift_generator.cc


> Have the compiler complain about invalid arguments and options
> --
>
> Key: THRIFT-3605
> URL: https://issues.apache.org/jira/browse/THRIFT-3605
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Jens Geyer
>Assignee: Jens Geyer
>
> As kind of a follow-up to THRIFT-3603, the goal is to have the compiler 
> validate not only the arguments , but also any argument options passed to it. 
> If an unknown option is found, a short error message should be printed 
> similar to what we already have with invalid args:
> {code}
> $ thrift -gen csharp:whoa
> Unrecognized option: whoa
> Usage: thrift [options] file
> Use thrift -help for a list of options
> {code}



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


[jira] [Commented] (THRIFT-3631) JSON protocol implementation for Lua

2016-02-13 Thread WangYaofu (JIRA)

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

WangYaofu commented on THRIFT-3631:
---

pull request:
https://github.com/apache/thrift/commit/880e559e185d24005893d412f65e0199656e89a2

> JSON protocol implementation for Lua
> 
>
> Key: THRIFT-3631
> URL: https://issues.apache.org/jira/browse/THRIFT-3631
> Project: Thrift
>  Issue Type: Improvement
>  Components: Lua - Library
>Affects Versions: 0.9.3
> Environment: Linux Mac Windows
>Reporter: WangYaofu
>Assignee: WangYaofu
> Fix For: 0.9.4
>
>
> This is JSON protocol implement for thrift-lua library.
> TJsonProtocol.lua is new source of lua for thrift JSON protocol.



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


[jira] [Created] (THRIFT-3630) Debian/Ubuntu install docs need an update

2016-02-13 Thread Randy Abernethy (JIRA)
Randy Abernethy created THRIFT-3630:
---

 Summary: Debian/Ubuntu install docs need an update
 Key: THRIFT-3630
 URL: https://issues.apache.org/jira/browse/THRIFT-3630
 Project: Thrift
  Issue Type: Bug
  Components: Documentation
Affects Versions: 0.9.3
Reporter: Randy Abernethy
Assignee: Randy Abernethy
Priority: Minor
 Fix For: 0.9.4


Need to add some missing packages to the list (make/boost thread dev), also 
need to add boost version update for Ubuntu12/Debian7. 

Should move Java instructions into the language list.



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


Build failed in Jenkins: Thrift-Compiler-Windows #1946

2016-02-13 Thread Apache Jenkins Server
See 

Changes:

[ra] THRIFT-3630:Debian and Ubuntu install docs update Client: Docs Patch:

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu3 (Ubuntu ubuntu legacy-ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/thrift.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/thrift.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/thrift.git 
 > +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/0.1.x
Seen branch in repository origin/0.2.x
Seen branch in repository origin/0.3.x
Seen branch in repository origin/0.4.x
Seen branch in repository origin/0.5.x
Seen branch in repository origin/0.6.x
Seen branch in repository origin/0.7.x
Seen branch in repository origin/0.8.x
Seen branch in repository origin/0.9.1
Seen branch in repository origin/0.9.2
Seen branch in repository origin/0.9.3
Seen branch in repository origin/0.9.x
Seen branch in repository origin/master
Seen branch in repository origin/py-compiler
Seen 14 remote branches
Checking out Revision 833236fc52294b4f4a9cf6a75118da3ae71ac006 (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 833236fc52294b4f4a9cf6a75118da3ae71ac006
 > git rev-list 8d289472c01d042383232bec8b4415b7e36ec15b # timeout=10
[Thrift-Compiler-Windows] $ /bin/bash -xe /tmp/hudson5230334075049164876.sh
+ rm -rf cmake-mingw32
+ mkdir -p cmake-mingw32
+ cd cmake-mingw32
+ cmake -DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake 
-DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF 
-DBUILD_EXAMPLES=OFF ..
CMake Error at CMakeLists.txt:20 (cmake_minimum_required):
  CMake 2.8.12 or higher is required.  You are running version 2.8.7


-- Configuring incomplete, errors occurred!
+ sh bootstrap.sh
sh: 0: Can't open bootstrap.sh
Build step 'Execute shell' marked build as failure
[WARNINGS] Skipping publisher since build result is FAILURE
Archiving artifacts


[GitHub] thrift pull request: THRIFT-3631 Lua-This is JSON protocol impleme...

2016-02-13 Thread mygityf
GitHub user mygityf opened a pull request:

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

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.

TJsonProtocol.lua is new source of lua for thrift JSON protocol.
Test result is expected of test_basic_server.lua, test_basic_client.lua.
Test cases:
client<-->server
json_protocol_client.lua json_server.go (golang thrift 
server)
json_client.go (golang thrift client) json_protocol_server.lua
json_protocol_client.lua json_protocol_server.lua
test_basic_server.luatest_basic_client.lua

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

$ git pull https://github.com/gityf/thrift master

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

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


commit 0d0cf5aa589389d40a2bd71a9e09e790634aff36
Author: unknown 
Date:   2016-01-28T11:08:05Z

To check element of self whether nil or not,avoid the value(false) of BOOL 
is lost.

eg.
Before:
  if self.argBool then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

After:
  if self.argBool ~= nil then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

Why:
  the value(false) for paramater self.argBool will be lost when condition 
is 'if self.argBool then' as before.

commit 8e61f5ae5cd82ede21d2fad0c67e9328a57a9bc5
Author: unknown 
Date:   2016-01-28T11:29:54Z

This is compact protocol lua implement for thrift.
Here are some description for each source code file.

luabpack.c
 To add bits operation function for thrift compact protocol.
 new functions:
 
l_i64ToZigza,l_i32ToZigzag,l_zigzagToI32,l_zigzagToI64,l_toVarint32,l_toVarint64,l_packMesgType.

TCompactProtocol.lua
 new source of lua for thrift compact protocol.

compact_protocol_client.lua
 test client source code for thrift compact protocol.

compact_protocol_server.lua
 test server source code for thrift compact protocol.

rpc.thrift
 test thrift IDL file for test 
case(compact_protocol_client.lua,compact_protocol_server.lua).

pcap offset hex of rpc test service.txt
 This is dump file create by tcpdump for test case.

Test cases:
 client  <-->   server
 compact_protocol_client.luacompact_server.go (golang 
thrift server)
 compact_client.go (golang thrift client)   compact_protocol_server.lua
 compact_protocol_client.luacompact_protocol_server.lua

Test console log:
log for compact_protocol_client.lua:
1   return 1 by FunCall.
2   return 2 by FunCall.

log for compact_protocol_server.lua:
53  54  12  43  11.22   str value
53  54  12  34  11.22   login
namenamess
passvpass
10  val10
20  val20
ele1
ele3
ele2
l1.
l2.

commit df693bf78aaf9fd37eff5d972ed6225cd5e88e38
Author: WangYaofu 
Date:   2016-02-04T07:29:36Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift.

To fix bug:
Examples of problematic valus were negative i8 values (-128 ~ -1), some i32 
values (0x4000, -1 ...), i64 values.

commit 982c519b855a6fcdb1b8b49951cd6f8d39c8c8bb
Author: Wang Yaofu 
Date:   2016-02-04T07:40:37Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift. 

#ifdef against Lua version macro added.
lua_objlen for version macro _LUA51_ for lua5.1.
lua_rawlen for lua5.2+.

commit 880e559e185d24005893d412f65e0199656e89a2
Author: WangYaofu 
Date:   2016-02-14T03:26:36Z

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.
TJsonProtocol.lua is new source of lua for thrift JSON protocol.




---
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-3631) JSON protocol implementation for Lua

2016-02-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3631:


GitHub user mygityf opened a pull request:

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

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.

TJsonProtocol.lua is new source of lua for thrift JSON protocol.
Test result is expected of test_basic_server.lua, test_basic_client.lua.
Test cases:
client<-->server
json_protocol_client.lua json_server.go (golang thrift 
server)
json_client.go (golang thrift client) json_protocol_server.lua
json_protocol_client.lua json_protocol_server.lua
test_basic_server.luatest_basic_client.lua

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

$ git pull https://github.com/gityf/thrift master

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

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


commit 0d0cf5aa589389d40a2bd71a9e09e790634aff36
Author: unknown 
Date:   2016-01-28T11:08:05Z

To check element of self whether nil or not,avoid the value(false) of BOOL 
is lost.

eg.
Before:
  if self.argBool then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

After:
  if self.argBool ~= nil then
oprot:writeFieldBegin('argBool', TType.BOOL, 13)
oprot:writeBool(self.argBool)
oprot:writeFieldEnd()
  end

Why:
  the value(false) for paramater self.argBool will be lost when condition 
is 'if self.argBool then' as before.

commit 8e61f5ae5cd82ede21d2fad0c67e9328a57a9bc5
Author: unknown 
Date:   2016-01-28T11:29:54Z

This is compact protocol lua implement for thrift.
Here are some description for each source code file.

luabpack.c
 To add bits operation function for thrift compact protocol.
 new functions:
 
l_i64ToZigza,l_i32ToZigzag,l_zigzagToI32,l_zigzagToI64,l_toVarint32,l_toVarint64,l_packMesgType.

TCompactProtocol.lua
 new source of lua for thrift compact protocol.

compact_protocol_client.lua
 test client source code for thrift compact protocol.

compact_protocol_server.lua
 test server source code for thrift compact protocol.

rpc.thrift
 test thrift IDL file for test 
case(compact_protocol_client.lua,compact_protocol_server.lua).

pcap offset hex of rpc test service.txt
 This is dump file create by tcpdump for test case.

Test cases:
 client  <-->   server
 compact_protocol_client.luacompact_server.go (golang 
thrift server)
 compact_client.go (golang thrift client)   compact_protocol_server.lua
 compact_protocol_client.luacompact_protocol_server.lua

Test console log:
log for compact_protocol_client.lua:
1   return 1 by FunCall.
2   return 2 by FunCall.

log for compact_protocol_server.lua:
53  54  12  43  11.22   str value
53  54  12  34  11.22   login
namenamess
passvpass
10  val10
20  val20
ele1
ele3
ele2
l1.
l2.

commit df693bf78aaf9fd37eff5d972ed6225cd5e88e38
Author: WangYaofu 
Date:   2016-02-04T07:29:36Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift.

To fix bug:
Examples of problematic valus were negative i8 values (-128 ~ -1), some i32 
values (0x4000, -1 ...), i64 values.

commit 982c519b855a6fcdb1b8b49951cd6f8d39c8c8bb
Author: Wang Yaofu 
Date:   2016-02-04T07:40:37Z

THRIFT-3585 Lua: compact protocol implement of lua for thrift. 

#ifdef against Lua version macro added.
lua_objlen for version macro _LUA51_ for lua5.1.
lua_rawlen for lua5.2+.

commit 880e559e185d24005893d412f65e0199656e89a2
Author: WangYaofu 
Date:   2016-02-14T03:26:36Z

THRIFT-3631 Lua-This is JSON protocol implement for thrift-lua library.
TJsonProtocol.lua is new source of lua for thrift JSON protocol.




> JSON protocol implementation for Lua
> 
>
> Key: THRIFT-3631
> URL: https://issues.apache.org/jira/browse/THRIFT-3631
> Project: Thrift
>  Issue Type: Improvement
>  Components: Lua - Library
>Affects Versions: 0.9.3
> Environment: Linux Mac Windows
>  

Jenkins build is back to normal : Thrift-precommit #134

2016-02-13 Thread Apache Jenkins Server
See