[jira] [Updated] (THRIFT-4730) remove pthread code

2019-01-07 Thread yuanyuan chen (JIRA)


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

yuanyuan chen updated THRIFT-4730:
--
External issue URL: https://github.com/apache/thrift/pull/1683
   Description: Using C++11 std::thread and std::mutex instead of 
pthread to enhance portability across different platforms (especially Windows). 
 (was: Using C++11 std::thread and std::mutex instead of  pthread to enhance 
portability across different platforms (especially Windows).)

> remove pthread code
> ---
>
> Key: THRIFT-4730
> URL: https://issues.apache.org/jira/browse/THRIFT-4730
> Project: Thrift
>  Issue Type: Improvement
>Reporter: yuanyuan chen
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Using C++11 std::thread and std::mutex instead of pthread to enhance 
> portability across different platforms (especially Windows).



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


[jira] [Created] (THRIFT-4730) remove pthread code

2019-01-07 Thread yuanyuan chen (JIRA)
yuanyuan chen created THRIFT-4730:
-

 Summary: remove pthread code
 Key: THRIFT-4730
 URL: https://issues.apache.org/jira/browse/THRIFT-4730
 Project: Thrift
  Issue Type: Improvement
Reporter: yuanyuan chen


Using C++11 std::thread and std::mutex instead of  pthread to enhance 
portability across different platforms (especially Windows).



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


[jira] [Created] (THRIFT-4729) Crash: ForceClose expired task with Exception uncaught

2019-01-07 Thread KG.Xu (JIRA)
KG.Xu created THRIFT-4729:
-

 Summary: Crash: ForceClose expired task with Exception uncaught
 Key: THRIFT-4729
 URL: https://issues.apache.org/jira/browse/THRIFT-4729
 Project: Thrift
  Issue Type: Bug
  Components: C++ - Library
Affects Versions: 0.8
Reporter: KG.Xu


Context is: I've employed NonblockingServer & ThreadManager, with 
setTaskExpireTime() used in my app. Under heavy load, it crashed. Crash point 
is *forceClose()::throw TException* (to be specific, send(NotificationSocketFD) 
failed).
 I went through the code, noted that during *removeExpiredTasks*() there is no 
try-catch involved. On the contrary, Task::run() is enclosed by try-catch.

Is it by design, or just a bug ? Thanks.



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


[jira] [Resolved] (THRIFT-3351) Publishing Dart Bindings for Thrift to Pub (pub.dartlang.org)

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-3351.
---
   Resolution: Fixed
 Assignee: James E. King III  (was: Jake Farrell)
Fix Version/s: 0.12.0

I uploaded 0.12.0.

> Publishing Dart Bindings for Thrift to Pub (pub.dartlang.org)
> -
>
> Key: THRIFT-3351
> URL: https://issues.apache.org/jira/browse/THRIFT-3351
> Project: Thrift
>  Issue Type: Story
>  Components: Dart - Library
>Reporter: Evan Weible
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>
> The thrift library for Dart has been released in 0.10.0
> In order for developers to actually make use of the library, the Dart package 
> needs to be published to https://pub.dartlang.org. The current workaround is 
> to create a new GitHub repo with a copy of the Dart thrift library, and 
> reference that in consuming Dart code via a Git reference, which is not ideal.
> This may become a little better with Dart 1.25.0 (not released yet), which 
> [adds the 
> ability|https://github.com/dart-lang/sdk/blob/1.25.0-dev.16.3/CHANGELOG.md#tool-changes]
>  to reference a library in a subdirectory via git. But it would still be 
> better to explicitly publish releases for Dart to pub.dartlang.org.
> More information here: 
> - https://www.dartlang.org/tools/pub/publishing
> - https://www.dartlang.org/tools/pub/cmd/pub-lish.html
> Since we're creating the Dart bindings for Thrift, we are also more than 
> willing to publish them to Pub - but we wanted to give the apache thrift team 
> the opportunity to handle this process. Ownership of the publishing process 
> can be shared by adding multiple email addresses to the uploader list, and 
> the uploader list can be updated at any time. It does require a Google email 
> address (gmail or Google Apps) to perform the upload.



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


[jira] [Updated] (THRIFT-4037) [CMake] Use a single build system for thrift to make development easier

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4037:
--
Issue Type: Wish  (was: Epic)

> [CMake] Use a single build system for thrift to make development easier
> ---
>
> Key: THRIFT-4037
> URL: https://issues.apache.org/jira/browse/THRIFT-4037
> Project: Thrift
>  Issue Type: Wish
>  Components: Build Process
>Affects Versions: 0.10.0
> Environment: All
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Critical
>  Labels: cmake
>
> h1. Background
> The thrift project currently carries two build systems.  The original build 
> system is based on autoconf and is used to build a complete deliverable 
> including extensive cross-language testing.
> The other build system was introduced a few years ago, with roots tracing 
> back to THRIFT-797.  CMake allows thrift to build natively on multiple 
> platforms - unix and windows.  Autoconf is no longer under active development 
> with the last release in 2012, and it does not allow for native windows 
> builds using native tools that are used by a majority of consumers.
> Maintaining two build systems for a project incurs a lot of overhead.  Every 
> change that touches the build system needs to be done twice, in two 
> completely different ways.  We need twice as many CI jobs to verify that all 
> of the builds are working, whereas with a single cmake build environment we 
> could likely use a single CI build job per platform that does everything 
> using the docker image on linux and appveyor on windows.
> h1. Proposal
> We should officially deprecate autoconf in favor of cmake, and continue (more 
> aggressively) the effort to make the cmake build environment as functional as 
> the autoconf build environment.  During this transition, folks will be 
> required to make changes to both build systems (which are proven out mostly 
> through the Travis CI build jobs; only CMake is used on AppVeyor).
> h1. Acceptance Criteria
> # All existing platforms, targets, and tests are converted to use cmake
> ## Including cross-compilation
> # All CI builds are converted to use cmake
> # autoconf build environment is removed



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


[jira] [Updated] (THRIFT-4687) Add thrift 0.12.0 to pypi and/or enable more maintainers

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4687:
--
Component/s: (was: Build Process)
 Python - Library

> Add thrift 0.12.0 to pypi and/or enable more maintainers
> 
>
> Key: THRIFT-4687
> URL: https://issues.apache.org/jira/browse/THRIFT-4687
> Project: Thrift
>  Issue Type: Request
>  Components: Python - Library
>Affects Versions: 0.12.0
> Environment: pypi
>Reporter: James E. King III
>Assignee: Jake Farrell
>Priority: Critical
>
> [~jfarrell] please either update pypi for the latest thrift 0.12.0 release or 
> find a way for the committer team to join an organizatio on pypi so any of us 
> making a release can do it.



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


[jira] [Updated] (THRIFT-878) Document "core" vs "extra" features

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-878:
-
Priority: Minor  (was: Major)

> Document "core" vs "extra" features
> ---
>
> Key: THRIFT-878
> URL: https://issues.apache.org/jira/browse/THRIFT-878
> Project: Thrift
>  Issue Type: Task
>  Components: Documentation, Website
>Reporter: Todd Lipcon
>Assignee: Jake Farrell
>Priority: Minor
> Attachments: ApacheThriftProfiles.md
>
>
> As discussed in THRIFT-876, we are seeing some divergence between different 
> language implementations as to which features they implement. We need to 
> define which are the "core" Thrift features that users should expect in every 
> language implementation, and then also the "extra" features that some 
> languages implement.



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


[jira] [Updated] (THRIFT-4688) Add thrift 0.12.0 to npmjs and/or add committers to apache org account

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4688:
--
Component/s: (was: Build Process)
 Node.js - Library

> Add thrift 0.12.0 to npmjs and/or add committers to apache org account
> --
>
> Key: THRIFT-4688
> URL: https://issues.apache.org/jira/browse/THRIFT-4688
> Project: Thrift
>  Issue Type: Request
>  Components: Node.js - Library
>Affects Versions: 0.12.0
>Reporter: James E. King III
>Assignee: Jake Farrell
>Priority: Critical
>
> Please add v0.12.0 to npmjs and/or enable the committers as members of the 
> apache organization on npmjs so we can do this for future releases.



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


[jira] [Assigned] (THRIFT-1439) debian packaging: do not download dependencies during build

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reassigned THRIFT-1439:
-

Assignee: (was: Jake Farrell)

> debian packaging: do not download dependencies during build
> ---
>
> Key: THRIFT-1439
> URL: https://issues.apache.org/jira/browse/THRIFT-1439
> Project: Thrift
>  Issue Type: Bug
>  Components: Deployment
> Environment: any Debian-based OS
>Reporter: paul cannon
>Priority: Major
>  Labels: debian
>
> It is very much against Debian procedure and policy for a package build 
> process to download dependencies from the internet. There are a lot of 
> reasons for this; among them, guaranteed build repeatability, security 
> auditability, non-reliance on websites remaining available, and license 
> auditability.
> The thrift Debian packaging (in contrib/) should use Maven in offline mode, 
> if Maven is actually required for the Java build phase. Build-dependencies 
> should be expressed as a list of Debian packages under "{{Build-Depends:}}" 
> in debian/control.



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


[jira] [Updated] (THRIFT-4687) Add thrift 0.12.0 to pypi and/or enable more maintainers

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4687:
--
Summary: Add thrift 0.12.0 to pypi and/or enable more maintainers  (was: 
Add thrift 0.12.0 to pypi)

> Add thrift 0.12.0 to pypi and/or enable more maintainers
> 
>
> Key: THRIFT-4687
> URL: https://issues.apache.org/jira/browse/THRIFT-4687
> Project: Thrift
>  Issue Type: Request
>  Components: Build Process
>Affects Versions: 0.12.0
> Environment: pypi
>Reporter: James E. King III
>Assignee: Jake Farrell
>Priority: Critical
>
> [~jfarrell] please either update pypi for the latest thrift 0.12.0 release or 
> find a way for the committer team to join an organizatio on pypi so any of us 
> making a release can do it.



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


[jira] [Updated] (THRIFT-1439) debian packaging: do not download dependencies during build

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-1439:
--
Priority: Minor  (was: Major)

> debian packaging: do not download dependencies during build
> ---
>
> Key: THRIFT-1439
> URL: https://issues.apache.org/jira/browse/THRIFT-1439
> Project: Thrift
>  Issue Type: Bug
>  Components: Deployment
> Environment: any Debian-based OS
>Reporter: paul cannon
>Priority: Minor
>  Labels: debian
>
> It is very much against Debian procedure and policy for a package build 
> process to download dependencies from the internet. There are a lot of 
> reasons for this; among them, guaranteed build repeatability, security 
> auditability, non-reliance on websites remaining available, and license 
> auditability.
> The thrift Debian packaging (in contrib/) should use Maven in offline mode, 
> if Maven is actually required for the Java build phase. Build-dependencies 
> should be expressed as a list of Debian packages under "{{Build-Depends:}}" 
> in debian/control.



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


[jira] [Closed] (THRIFT-3351) Publishing Dart Bindings for Thrift to Pub (pub.dartlang.org)

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-3351.
-

> Publishing Dart Bindings for Thrift to Pub (pub.dartlang.org)
> -
>
> Key: THRIFT-3351
> URL: https://issues.apache.org/jira/browse/THRIFT-3351
> Project: Thrift
>  Issue Type: Story
>  Components: Dart - Library
>Reporter: Evan Weible
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>
> The thrift library for Dart has been released in 0.10.0
> In order for developers to actually make use of the library, the Dart package 
> needs to be published to https://pub.dartlang.org. The current workaround is 
> to create a new GitHub repo with a copy of the Dart thrift library, and 
> reference that in consuming Dart code via a Git reference, which is not ideal.
> This may become a little better with Dart 1.25.0 (not released yet), which 
> [adds the 
> ability|https://github.com/dart-lang/sdk/blob/1.25.0-dev.16.3/CHANGELOG.md#tool-changes]
>  to reference a library in a subdirectory via git. But it would still be 
> better to explicitly publish releases for Dart to pub.dartlang.org.
> More information here: 
> - https://www.dartlang.org/tools/pub/publishing
> - https://www.dartlang.org/tools/pub/cmd/pub-lish.html
> Since we're creating the Dart bindings for Thrift, we are also more than 
> willing to publish them to Pub - but we wanted to give the apache thrift team 
> the opportunity to handle this process. Ownership of the publishing process 
> can be shared by adding multiple email addresses to the uploader list, and 
> the uploader list can be updated at any time. It does require a Google email 
> address (gmail or Google Apps) to perform the upload.



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


[jira] [Closed] (THRIFT-771) Publish JMX metrics from Thrift servers

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-771.

Resolution: Incomplete
  Assignee: James E. King III  (was: Jake Farrell)

Linked to THRIFT-2927, if something happens in this area the link will help 
people decide what to do.

> Publish JMX metrics from Thrift servers
> ---
>
> Key: THRIFT-771
> URL: https://issues.apache.org/jira/browse/THRIFT-771
> Project: Thrift
>  Issue Type: New Feature
>  Components: Java - Library
>Reporter: Bryan Duxbury
>Assignee: James E. King III
>Priority: Major
>
> It'd be great if we tracked metrics about the operation of our Thrift servers 
> and published them via JMX. This would allow standard monitoring tools to 
> track Thrift servers.



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


[jira] [Closed] (THRIFT-1605) Cocoa framework

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-1605.
-
Resolution: Won't Fix
  Assignee: James E. King III  (was: Jake Farrell)

Cocoa language support has been deprecated as of 0.12.0.  Expectation is folks 
switch to Swift or stay on 0.12.0 if they still need cocoa.

> Cocoa framework
> ---
>
> Key: THRIFT-1605
> URL: https://issues.apache.org/jira/browse/THRIFT-1605
> Project: Thrift
>  Issue Type: Improvement
>  Components: Cocoa - Library
>Affects Versions: 0.8, 0.9
>Reporter: Jake Farrell
>Assignee: James E. King III
>Priority: Major
>
> Create a cocoa framework for the lib



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


[jira] [Commented] (THRIFT-878) Document "core" vs "extra" features

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-878:
--

I'll see if I can add this to the [language 
matrix|https://github.com/apache/thrift/blob/master/LANGUAGES.md] in some form 
of color coded way (not sure that's possible).  

> Document "core" vs "extra" features
> ---
>
> Key: THRIFT-878
> URL: https://issues.apache.org/jira/browse/THRIFT-878
> Project: Thrift
>  Issue Type: Task
>  Components: Documentation, Website
>Reporter: Todd Lipcon
>Assignee: Jake Farrell
>Priority: Major
> Attachments: ApacheThriftProfiles.md
>
>
> As discussed in THRIFT-876, we are seeing some divergence between different 
> language implementations as to which features they implement. We need to 
> define which are the "core" Thrift features that users should expect in every 
> language implementation, and then also the "extra" features that some 
> languages implement.



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


[jira] [Assigned] (THRIFT-878) Document "core" vs "extra" features

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reassigned THRIFT-878:


Assignee: James E. King III  (was: Jake Farrell)

> Document "core" vs "extra" features
> ---
>
> Key: THRIFT-878
> URL: https://issues.apache.org/jira/browse/THRIFT-878
> Project: Thrift
>  Issue Type: Documentation
>  Components: Documentation, Website
>Reporter: Todd Lipcon
>Assignee: James E. King III
>Priority: Minor
> Attachments: ApacheThriftProfiles.md
>
>
> As discussed in THRIFT-876, we are seeing some divergence between different 
> language implementations as to which features they implement. We need to 
> define which are the "core" Thrift features that users should expect in every 
> language implementation, and then also the "extra" features that some 
> languages implement.



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


[jira] [Updated] (THRIFT-878) Document "core" vs "extra" features

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-878:
-
Issue Type: Documentation  (was: Task)

> Document "core" vs "extra" features
> ---
>
> Key: THRIFT-878
> URL: https://issues.apache.org/jira/browse/THRIFT-878
> Project: Thrift
>  Issue Type: Documentation
>  Components: Documentation, Website
>Reporter: Todd Lipcon
>Assignee: Jake Farrell
>Priority: Minor
> Attachments: ApacheThriftProfiles.md
>
>
> As discussed in THRIFT-876, we are seeing some divergence between different 
> language implementations as to which features they implement. We need to 
> define which are the "core" Thrift features that users should expect in every 
> language implementation, and then also the "extra" features that some 
> languages implement.



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


[jira] [Closed] (THRIFT-1250) RPC enhancements: multiple-outstanding, retries, error code etc

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-1250.
-
Resolution: Not A Problem
  Assignee: James E. King III  (was: Jake Farrell)

I suspect most of these issues are resolved now.  If a transport error occurs, 
you get a TTransportException.  If the remote method is not found you get a 
TProtocolException.  If a handler exception occurs you get a 
TApplicationException.  You can retry any call that fails.

Some languages support multiple outstanding requests.  Those that do must send 
a unique sequence ID with each request (unique for that connection).  Some 
language servers support returning the sequence id that was sent in the request 
- I can't guarantee that all of the do at this time since there's no cross test 
for it.  There's a backlog item for that.

> RPC enhancements: multiple-outstanding, retries, error code etc
> ---
>
> Key: THRIFT-1250
> URL: https://issues.apache.org/jira/browse/THRIFT-1250
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Diwaker Gupta
>Assignee: James E. King III
>Priority: Major
>
> The current RPC model of Thrift sends the RPC requests and responses as-is, 
> leaving all the smartness to the Processor implementation. While this model 
> has the benefit of simplicity, it does have some limitations. In particular:
> * There's no easy way for applications to retry a failed RPC. In fact, 
> there's no easy way for the RPC layer to even communicate problems to the 
> application (was there a transport error? did the invoked method not exist on 
> the remote end? some other application-specific error? time out?).
> * Supporting multiple-outstanding RPCs is challenging, because the RPC layer 
> doesn't uniquely identify outgoing RPC requests. So when a response comes 
> back, there's no way to associate it with one of the outstanding RPCs.
> A fairly straight-forward approach to address these issues would be to 
> encapsulate the RPC request/response in a wrapper with some additional 
> metadata. In fact, this metadata can itself be specified as a Thrift message. 
> Concretely, something like this:
> {code}
> struct RpcRequest {
> // metadata
> 1: required i64 id;
> // optional -- may be used to sanity check
> 2: i32 requestSize; // including payload
> 3: i32 payloadSize; // just the payload
> // actual request, serialized
> 2: required binary payload;
> }
> {code}
> IMO this would simplify the implementation of features like duplicate 
> detection, RPC retries, multiple-outstanding RPCs etc.



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


[jira] [Assigned] (THRIFT-3055) Apache Thrift Logo

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reassigned THRIFT-3055:
-

Assignee: James E. King III  (was: Jake Farrell)

> Apache Thrift Logo
> --
>
> Key: THRIFT-3055
> URL: https://issues.apache.org/jira/browse/THRIFT-3055
> Project: Thrift
>  Issue Type: Brainstorming
>  Components: Wish List
>Reporter: Jake Farrell
>Assignee: James E. King III
>Priority: Major
> Attachments: ApacheThriftLogoWip3.pptx, ThriftLogo-UMLConnection.JPG, 
> ThriftLogoUmlIdeas.JPG, screenshot-1.png, screenshot-2.png
>
>




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


[jira] [Commented] (THRIFT-1550) Contributing "Thrift: The Missing Guide"

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-1550:
---

We're moving the web site into GitHub.  It will take a while.  Do we have your 
permission to pull the HTML in once we're there?

> Contributing "Thrift: The Missing Guide"
> 
>
> Key: THRIFT-1550
> URL: https://issues.apache.org/jira/browse/THRIFT-1550
> Project: Thrift
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Diwaker Gupta
>Assignee: James E. King III
>Priority: Minor
> Attachments: diwakergupta-thrift-missing-guide-3976f06.tar.gz
>
>
> I'm contributing the guide available at 
> http://diwakergupta.github.com/thrift-missing-guide/ for use by the Thrift 
> project on it's website. The original guide will remain online but I will 
> include a pointer in BIG BOLD letters to the updated Thrift website when it 
> is up.



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


[jira] [Assigned] (THRIFT-1550) Contributing "Thrift: The Missing Guide"

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reassigned THRIFT-1550:
-

Assignee: James E. King III  (was: Jake Farrell)

> Contributing "Thrift: The Missing Guide"
> 
>
> Key: THRIFT-1550
> URL: https://issues.apache.org/jira/browse/THRIFT-1550
> Project: Thrift
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Diwaker Gupta
>Assignee: James E. King III
>Priority: Minor
> Attachments: diwakergupta-thrift-missing-guide-3976f06.tar.gz
>
>
> I'm contributing the guide available at 
> http://diwakergupta.github.com/thrift-missing-guide/ for use by the Thrift 
> project on it's website. The original guide will remain online but I will 
> include a pointer in BIG BOLD letters to the updated Thrift website when it 
> is up.



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


[jira] [Updated] (THRIFT-2947) Using Apache code signing service to sign the Thrift NuGet project

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-2947:
--
Component/s: netcore - Library
 C# - Library

> Using Apache code signing service to sign the Thrift NuGet project
> --
>
> Key: THRIFT-2947
> URL: https://issues.apache.org/jira/browse/THRIFT-2947
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process, C# - Library, netcore - Library
>Affects Versions: 0.9.2
>Reporter: Duc Anh Le
>Assignee: Jake Farrell
>Priority: Major
>
> Please use the Apache code signing service to sign the Thrift project, which 
> makes it easier to deploy the binaries.
> https://blogs.apache.org/infra/entry/code_signing_service_now_available
> A sample request for code signing can be found here
> https://issues.apache.org/jira/browse/INFRA-9002



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


[jira] [Assigned] (THRIFT-2947) Using Apache code signing service to sign the Thrift NuGet project

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reassigned THRIFT-2947:
-

Assignee: James E. King III  (was: Jake Farrell)

> Using Apache code signing service to sign the Thrift NuGet project
> --
>
> Key: THRIFT-2947
> URL: https://issues.apache.org/jira/browse/THRIFT-2947
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process, C# - Library, netcore - Library
>Affects Versions: 0.9.2
>Reporter: Duc Anh Le
>Assignee: James E. King III
>Priority: Major
>
> Please use the Apache code signing service to sign the Thrift project, which 
> makes it easier to deploy the binaries.
> https://blogs.apache.org/infra/entry/code_signing_service_now_available
> A sample request for code signing can be found here
> https://issues.apache.org/jira/browse/INFRA-9002



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


[jira] [Updated] (THRIFT-2947) Using Apache code signing service to sign the Thrift NuGet project

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-2947:
--
Summary: Using Apache code signing service to sign the Thrift NuGet project 
 (was: Using Apache code signing service to sign the Thrift project)

> Using Apache code signing service to sign the Thrift NuGet project
> --
>
> Key: THRIFT-2947
> URL: https://issues.apache.org/jira/browse/THRIFT-2947
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.9.2
>Reporter: Duc Anh Le
>Assignee: Jake Farrell
>Priority: Major
>
> Please use the Apache code signing service to sign the Thrift project, which 
> makes it easier to deploy the binaries.
> https://blogs.apache.org/infra/entry/code_signing_service_now_available
> A sample request for code signing can be found here
> https://issues.apache.org/jira/browse/INFRA-9002



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


[jira] [Updated] (THRIFT-2947) Using Apache code signing service to sign the Thrift project

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-2947:
--
Issue Type: Improvement  (was: Task)

> Using Apache code signing service to sign the Thrift project
> 
>
> Key: THRIFT-2947
> URL: https://issues.apache.org/jira/browse/THRIFT-2947
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.9.2
>Reporter: Duc Anh Le
>Assignee: Jake Farrell
>Priority: Major
>
> Please use the Apache code signing service to sign the Thrift project, which 
> makes it easier to deploy the binaries.
> https://blogs.apache.org/infra/entry/code_signing_service_now_available
> A sample request for code signing can be found here
> https://issues.apache.org/jira/browse/INFRA-9002



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


[jira] [Closed] (THRIFT-3475) prefix tags with v as defined by semver

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-3475.
-

> prefix tags with v as defined by semver
> ---
>
> Key: THRIFT-3475
> URL: https://issues.apache.org/jira/browse/THRIFT-3475
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Reporter: Roger Meier
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>
> We need to prefix our tags with **v** to follow the semver model, e.g. 
> **v0.9.3**
> non prefix causes issues such as tag and branch conflicts.
> I had to do this when pushing to the release branch on my fork
> {noformat}
> git push bufferoverflow heads/0.9.3
> {noformat}
> see also THRIFT-6



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


[jira] [Resolved] (THRIFT-3475) prefix tags with v as defined by semver

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-3475.
---
   Resolution: Fixed
 Assignee: James E. King III  (was: Jake Farrell)
Fix Version/s: 0.12.0

The 0.12.0 release branch is named "0.12.0" and the tag is "v0.12.0".  The 
dlang dub package manager required the "v" and I'm told the golang package 
manager is moving in that direction.

> prefix tags with v as defined by semver
> ---
>
> Key: THRIFT-3475
> URL: https://issues.apache.org/jira/browse/THRIFT-3475
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Reporter: Roger Meier
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>
> We need to prefix our tags with **v** to follow the semver model, e.g. 
> **v0.9.3**
> non prefix causes issues such as tag and branch conflicts.
> I had to do this when pushing to the release branch on my fork
> {noformat}
> git push bufferoverflow heads/0.9.3
> {noformat}
> see also THRIFT-6



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


[jira] [Updated] (THRIFT-1580) thrift type i64 java to php serialize/deserealize not working

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-1580:
--
Priority: Major  (was: Critical)

> thrift type i64 java to php serialize/deserealize not working
> -
>
> Key: THRIFT-1580
> URL: https://issues.apache.org/jira/browse/THRIFT-1580
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.8
> Environment: "Ubuntu Server Cloud Guest 11.10 (Oneiric Ocelot)" - 
> this for AWS
> Nginx + PHP5-FPM
>Reporter: Sergei Labutin
>Priority: Major
>
> I create struct
> struct Request \{
> 1: optional i64 uid,
> 2: optional string name
> \}
> on java client make serealize. On PHP without extention deserealize and have 
> uid as null.
> Any other types work normally:
> struct Request \{
> 1: optional i32 uid,
> 2: optional string name
> \}
> struct Request \{
> 1: optional string uid,
> 2: optional string name
> \}



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


[jira] [Commented] (THRIFT-1580) thrift type i64 java to php serialize/deserealize not working

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-1580:
---

Might be a duplicate of THRIFT-1538?

> thrift type i64 java to php serialize/deserealize not working
> -
>
> Key: THRIFT-1580
> URL: https://issues.apache.org/jira/browse/THRIFT-1580
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.8
> Environment: "Ubuntu Server Cloud Guest 11.10 (Oneiric Ocelot)" - 
> this for AWS
> Nginx + PHP5-FPM
>Reporter: Sergei Labutin
>Priority: Critical
>
> I create struct
> struct Request \{
> 1: optional i64 uid,
> 2: optional string name
> \}
> on java client make serealize. On PHP without extention deserealize and have 
> uid as null.
> Any other types work normally:
> struct Request \{
> 1: optional i32 uid,
> 2: optional string name
> \}
> struct Request \{
> 1: optional string uid,
> 2: optional string name
> \}



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


[jira] [Updated] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-1538:
--
Priority: Major  (was: Critical)

> Error during deserialization int64 on 32-bit architecture
> -
>
> Key: THRIFT-1538
> URL: https://issues.apache.org/jira/browse/THRIFT-1538
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.2, 0.8
> Environment: Ubuntu 10.04
>Reporter: Dmitry Zolotarev
>Priority: Major
>  Labels: bug, php, serialization
> Attachments: hello.php, thrift_test1.tar.bz2
>
>
> Value 5718813258875302619 deserialized as 5718813261021839359



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


[jira] [Closed] (THRIFT-4442) release 0.11.0 to https://bintray.com/apache/thrift (RHEL)

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-4442.
-
Resolution: Incomplete
  Assignee: James E. King III

THRIFT-4097 covers RHEL issues.  We've released version 0.12.0.  Resolving 
incomplete due to the rhel stuff covered elsewhere.

> release 0.11.0 to https://bintray.com/apache/thrift (RHEL)
> --
>
> Key: THRIFT-4442
> URL: https://issues.apache.org/jira/browse/THRIFT-4442
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Affects Versions: 0.10.0, 0.11.0, 0.12.0
>Reporter: RobberPhex
>Assignee: James E. King III
>Priority: Major
>
> [https://www.apache.org/dist/thrift/debian/] redirects to 
> [http://dl.bintray.com/apache/thrift/debian/], and 
> [https://www.apache.org/dist/thrift/rpm/] redirects to 
> [http://dl.bintray.com/apache/thrift/rpm/]. Actually, they are generated by 
> [https://bintray.com/apache/thrift/repo].
> But there is only 0.9.3 version. Cloud you put 0.11.0 version to 
> [https://bintray.com/apache/thrift/repo] ? It will be convenient for ubuntu 
> trusty users and centos 7 users (and centos 6.9 users, if centos6 supported)



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


[jira] [Commented] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-1538:
---

It would be nice if you could share the fix back to the project.

> Error during deserialization int64 on 32-bit architecture
> -
>
> Key: THRIFT-1538
> URL: https://issues.apache.org/jira/browse/THRIFT-1538
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.2, 0.8
> Environment: Ubuntu 10.04
>Reporter: Dmitry Zolotarev
>Priority: Critical
>  Labels: bug, php, serialization
> Attachments: hello.php, thrift_test1.tar.bz2
>
>
> Value 5718813258875302619 deserialized as 5718813261021839359



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


[jira] [Closed] (THRIFT-1310) Generate PHP client code not check sequence ID in messages

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-1310.
-
Resolution: Invalid
  Assignee: James E. King III

Thrift isn't a message bus - you have to remain connected to get the reply to 
your request. 
 Resolving as invalid.  When a disconnect occurs, all outstanding requests 
should be considered incomplete.  There's no way to get the reply if you 
disconnect.  

> Generate PHP client code not check sequence ID in messages
> --
>
> Key: THRIFT-1310
> URL: https://issues.apache.org/jira/browse/THRIFT-1310
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.7
>Reporter: Jian Fang
>Assignee: James E. King III
>Priority: Critical
>  Labels: security-issue
> Attachments: t_php_generator.patch
>
>
> The PHP client code not check sequence ID in messages, when client connect 
> timeout, the return of results are out of sequence. I try to fix this by 
> throwing a exception when sequence ID not equal. Patch file is listed below.



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


[jira] [Updated] (THRIFT-4442) release 0.11.0 to https://bintray.com/apache/thrift (RHEL)

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4442:
--
Summary: release 0.11.0 to https://bintray.com/apache/thrift (RHEL)  (was: 
release 0.11.0 to https://bintray.com/apache/thrift)

> release 0.11.0 to https://bintray.com/apache/thrift (RHEL)
> --
>
> Key: THRIFT-4442
> URL: https://issues.apache.org/jira/browse/THRIFT-4442
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Affects Versions: 0.10.0, 0.11.0, 0.12.0
>Reporter: RobberPhex
>Priority: Major
>
> [https://www.apache.org/dist/thrift/debian/] redirects to 
> [http://dl.bintray.com/apache/thrift/debian/], and 
> [https://www.apache.org/dist/thrift/rpm/] redirects to 
> [http://dl.bintray.com/apache/thrift/rpm/]. Actually, they are generated by 
> [https://bintray.com/apache/thrift/repo].
> But there is only 0.9.3 version. Cloud you put 0.11.0 version to 
> [https://bintray.com/apache/thrift/repo] ? It will be convenient for ubuntu 
> trusty users and centos 7 users (and centos 6.9 users, if centos6 supported)



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


[jira] [Updated] (THRIFT-4442) release 0.11.0 to https://bintray.com/apache/thrift

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4442:
--
Issue Type: Improvement  (was: Bug)

> release 0.11.0 to https://bintray.com/apache/thrift
> ---
>
> Key: THRIFT-4442
> URL: https://issues.apache.org/jira/browse/THRIFT-4442
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Affects Versions: 0.10.0, 0.11.0, 0.12.0
>Reporter: RobberPhex
>Priority: Major
>
> [https://www.apache.org/dist/thrift/debian/] redirects to 
> [http://dl.bintray.com/apache/thrift/debian/], and 
> [https://www.apache.org/dist/thrift/rpm/] redirects to 
> [http://dl.bintray.com/apache/thrift/rpm/]. Actually, they are generated by 
> [https://bintray.com/apache/thrift/repo].
> But there is only 0.9.3 version. Cloud you put 0.11.0 version to 
> [https://bintray.com/apache/thrift/repo] ? It will be convenient for ubuntu 
> trusty users and centos 7 users (and centos 6.9 users, if centos6 supported)



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


[jira] [Updated] (THRIFT-4442) release 0.11.0 to https://bintray.com/apache/thrift

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4442:
--
Priority: Major  (was: Critical)

> release 0.11.0 to https://bintray.com/apache/thrift
> ---
>
> Key: THRIFT-4442
> URL: https://issues.apache.org/jira/browse/THRIFT-4442
> Project: Thrift
>  Issue Type: Bug
>  Components: Compiler (General)
>Affects Versions: 0.10.0, 0.11.0, 0.12.0
>Reporter: RobberPhex
>Priority: Major
>
> [https://www.apache.org/dist/thrift/debian/] redirects to 
> [http://dl.bintray.com/apache/thrift/debian/], and 
> [https://www.apache.org/dist/thrift/rpm/] redirects to 
> [http://dl.bintray.com/apache/thrift/rpm/]. Actually, they are generated by 
> [https://bintray.com/apache/thrift/repo].
> But there is only 0.9.3 version. Cloud you put 0.11.0 version to 
> [https://bintray.com/apache/thrift/repo] ? It will be convenient for ubuntu 
> trusty users and centos 7 users (and centos 6.9 users, if centos6 supported)



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


[jira] [Commented] (THRIFT-2242) Generate C++11 code

2019-01-07 Thread Randy Abernethy (JIRA)


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

Randy Abernethy commented on THRIFT-2242:
-

I just want to shout this loudly, Thrift Sets [at the IDL level] are unordered. 
You can implement them in a server or client with ordered sets or unordered 
sets (in C++ using the hack James mentions or with annotations in Java). 
However on the wire, you must not expect a set or map to be ordered, only a 
list.

> Generate C++11 code
> ---
>
> Key: THRIFT-2242
> URL: https://issues.apache.org/jira/browse/THRIFT-2242
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.9.1
>Reporter: Vitali Lovich
>Priority: Major
>
> unordered_map instead of map, unordered_set instead of set, noexcept instead 
> of throw() (unless the exact semantics of throw() are needed which seems 
> unlikely).
> It should use the shared_ptr implementation that the library is configured 
> with.



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


[jira] [Commented] (THRIFT-4156) Using boost spirit instead of lex and yacc

2019-01-07 Thread Randy Abernethy (JIRA)


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

Randy Abernethy commented on THRIFT-4156:
-

While it strikes me as a cool project, to [~jking3] 's point, it is the kind of 
thing that is not going to add a ton of value to end users and it will create a 
knowledge gap for existing committers. This means we spend less time actually 
adding value for the end users in the community. If Thrift IDL was in dynamic 
development the hit might amortize well, however, if that were the case I might 
vote for a move to Python. As it is I am a -1 on this ticket.

> Using boost spirit instead of lex and yacc
> --
>
> Key: THRIFT-4156
> URL: https://issues.apache.org/jira/browse/THRIFT-4156
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Mike Gresens
>Priority: Major
> Attachments: MyService.hpp, MyService.thrift, ast.hpp, 
> doxygen_enum.png, doxygen_service.png, doxygen_struct.png, parser.cpp
>
>
> As a developer I want to use boost spirit to get rid of lex and yacc.
> This kicks dependency to lex, flex, yacc, bison or what ever.
> This makes building easier, because only c++ code must be compiled.
> All grammar is inside the code - all c++. No need to learn ll and yy.



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


[jira] [Closed] (THRIFT-4512) Apache Thrift NuGET package needs to be updated

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-4512.
-
Resolution: Done

> Apache Thrift NuGET package needs to be updated
> ---
>
> Key: THRIFT-4512
> URL: https://issues.apache.org/jira/browse/THRIFT-4512
> Project: Thrift
>  Issue Type: Improvement
>  Components: .NETCore - Library, Deployment
>Affects Versions: 0.9.2, 0.9.3, 0.10.0, 0.11.0
> Environment: .NET Core 2.0
>Reporter: Benjamin Kraemer
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>
> The official NuGET package has not been updated since 2014 now. There exist 
> some community ones, but the latest one there is 0.10.0 and we need 0.11.0 to 
> work with .NET Core. So please update the offical one, since using Thrift 
> with .NET Core is a hussle since you need to use ILRepack or ILMerge to 
> include the library but avoid collisions with other DLLs.



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


[jira] [Updated] (THRIFT-2906) library not found for -l:libboost_unit_test_framework.a

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-2906:
--
Fix Version/s: (was: 0.9.3)

> library not found for -l:libboost_unit_test_framework.a
> ---
>
> Key: THRIFT-2906
> URL: https://issues.apache.org/jira/browse/THRIFT-2906
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process, C++ - Compiler
>Affects Versions: 0.9.2
> Environment: Mac OS X 10.10.1 (Darwin 14.0.0)
> Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
> Target: x86_64-apple-darwin14.0.0
> Thread model: posix
>Reporter: Jon Parise
>Assignee: Konrad Grochowski
>Priority: Minor
>  Labels: build, patch
>
> The {{ld(1)}} (clang) that ships with Mac OS X 10.10.1 doesn't understand the 
> {{-l:libfoo.a}} syntax that it used to link 
> {{libboost_unit_test_framework.a}}:
> {code}
> /bin/sh ../../../libtool  --tag=CXX   --mode=link g++ -Wall -Wextra -pedantic 
> -g -O2 -std=c++11 -L/usr/local/lib  -o processor_test 
> processor/ProcessorTest.o processor/EventLog.o processor/ServerThread.o 
> libprocessortest.la ../../../lib/cpp/libthrift.la 
> ../../../lib/cpp/libthriftnb.la -L/usr/local/lib -levent 
> -l:libboost_unit_test_framework.a -lssl -lcrypto -lpthread
> libtool: link: g++ -Wall -Wextra -pedantic -g -O2 -std=c++11 -o 
> .libs/processor_test processor/ProcessorTest.o processor/EventLog.o 
> processor/ServerThread.o -Wl,-bind_at_load  -L/usr/local/lib 
> ./.libs/libprocessortest.a ../../../lib/cpp/.libs/libthrift.dylib 
> -L/usr/local/Cellar/openssl/1.0.1j_1/lib 
> ../../../lib/cpp/.libs/libthriftnb.dylib -levent 
> -l:libboost_unit_test_framework.a -lssl -lcrypto -lpthread
> ld: library not found for -l:libboost_unit_test_framework.a
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> {code}



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


[jira] [Updated] (THRIFT-4728) Cleanup for the double rendering test in JS

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4728:
--
Component/s: JavaScript - Library

> Cleanup for the double rendering test in JS 
> 
>
> Key: THRIFT-4728
> URL: https://issues.apache.org/jira/browse/THRIFT-4728
> Project: Thrift
>  Issue Type: Improvement
>  Components: JavaScript - Library
>Affects Versions: 0.12.0
>Reporter: Ozan Can Altiok
>Assignee: James E. King III
>Priority: Major
> Fix For: 1.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> * Fix the header comment written in test-double-rendering.js
>  * Use the qunit and jquery scripts provided in the thrift project
>  * Automate the double rendering test



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


[jira] [Commented] (THRIFT-4512) Apache Thrift NuGET package needs to be updated

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-4512:
---

https://www.nuget.org/packages/ApacheThrift/

Now has versions 0.9.3, 0.10.0, 0.11.0, and 0.12.0.  The symbols for 0.10.0 and 
0.11.0 are portable.  I couldn't get the symbols to work on 0.12.0, so we may 
need a 0.12.1 to fix the symbols and include a statically linked compiler 
(THRIFT-3604).

> Apache Thrift NuGET package needs to be updated
> ---
>
> Key: THRIFT-4512
> URL: https://issues.apache.org/jira/browse/THRIFT-4512
> Project: Thrift
>  Issue Type: Improvement
>  Components: .NETCore - Library, Deployment
>Affects Versions: 0.9.2, 0.9.3, 0.10.0, 0.11.0
> Environment: .NET Core 2.0
>Reporter: Benjamin Kraemer
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>
> The official NuGET package has not been updated since 2014 now. There exist 
> some community ones, but the latest one there is 0.10.0 and we need 0.11.0 to 
> work with .NET Core. So please update the offical one, since using Thrift 
> with .NET Core is a hussle since you need to use ILRepack or ILMerge to 
> include the library but avoid collisions with other DLLs.



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


[jira] [Updated] (THRIFT-4512) Apache Thrift NuGET package needs to be updated

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4512:
--
Fix Version/s: (was: 0.11.0)
   0.12.0

> Apache Thrift NuGET package needs to be updated
> ---
>
> Key: THRIFT-4512
> URL: https://issues.apache.org/jira/browse/THRIFT-4512
> Project: Thrift
>  Issue Type: Improvement
>  Components: .NETCore - Library, Deployment
>Affects Versions: 0.9.2, 0.9.3, 0.10.0, 0.11.0
> Environment: .NET Core 2.0
>Reporter: Benjamin Kraemer
>Priority: Major
> Fix For: 0.12.0
>
>
> The official NuGET package has not been updated since 2014 now. There exist 
> some community ones, but the latest one there is 0.10.0 and we need 0.11.0 to 
> work with .NET Core. So please update the offical one, since using Thrift 
> with .NET Core is a hussle since you need to use ILRepack or ILMerge to 
> include the library but avoid collisions with other DLLs.



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


[jira] [Assigned] (THRIFT-4512) Apache Thrift NuGET package needs to be updated

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reassigned THRIFT-4512:
-

Assignee: James E. King III

> Apache Thrift NuGET package needs to be updated
> ---
>
> Key: THRIFT-4512
> URL: https://issues.apache.org/jira/browse/THRIFT-4512
> Project: Thrift
>  Issue Type: Improvement
>  Components: .NETCore - Library, Deployment
>Affects Versions: 0.9.2, 0.9.3, 0.10.0, 0.11.0
> Environment: .NET Core 2.0
>Reporter: Benjamin Kraemer
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>
> The official NuGET package has not been updated since 2014 now. There exist 
> some community ones, but the latest one there is 0.10.0 and we need 0.11.0 to 
> work with .NET Core. So please update the offical one, since using Thrift 
> with .NET Core is a hussle since you need to use ILRepack or ILMerge to 
> include the library but avoid collisions with other DLLs.



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


[jira] [Commented] (THRIFT-3604) NuGet release should include compiler, and say 'official'

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-3604:
---

As a workaround, there is a Windows compiler distributed on 
https://www.apache.org/dist/thrift/ for each release.  The one for 0.12.0 is 
statically linked (including the runtime) so it is portable.  I'll assign this 
to myself to get it into the next NuGet packages.

> NuGet release should include compiler, and say 'official'
> -
>
> Key: THRIFT-3604
> URL: https://issues.apache.org/jira/browse/THRIFT-3604
> Project: Thrift
>  Issue Type: Improvement
>  Components: Deployment
>Affects Versions: 0.9.3
> Environment: Nuget, for users of Visual Studio
>Reporter: david bennett
>Priority: Major
>
> The current NuGet release includes a library but no compiler. It should 
> include a compiler that matches the library.
> This affects users who wish to use an automated build process based on 
> MsBuild and package restore, and who do not wish to check the compiler into 
> their source tree.
> Side-note: the community version does include a compiler, is older, but has 
> many more downloads. The official version should clearly state that (a) it 
> contains a compiler (b) it is the official version.



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


[jira] [Updated] (THRIFT-4725) Change Return Type Signature of Process Methods

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4725:
--
Fix Version/s: (was: 1.0)

> Change Return Type Signature of Process Methods
> ---
>
> Key: THRIFT-4725
> URL: https://issues.apache.org/jira/browse/THRIFT-4725
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: BELUGA BEHR
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The method signature of {{TProcessor}} and {{TAsyncProcessor}} is:
>  
> {code:java}
> public boolean process(...) throws TException;
> {code}
> It's not clear what the return value here because there is no documentation, 
> but parts of the code do not even bother checking the return value.  All of 
> the returns, save one, are hard-coded to _true_.  If there is a problem, code 
> should throw an Exception.  Make this a void method.
> Note: This the method signature in other languages is also a boolean.



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


[jira] [Updated] (THRIFT-4600) Don't close the connection in flush for python THttpClient.py

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4600:
--
Fix Version/s: (was: 0.11.0)

> Don't close the connection in flush for python THttpClient.py
> -
>
> Key: THRIFT-4600
> URL: https://issues.apache.org/jira/browse/THRIFT-4600
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Library
>Affects Versions: 0.11.0
>Reporter: Finn Isaac Norris Colman
>Priority: Major
> Attachments: 1572.patch
>
>
> In thrift/lib/py/src/transport/THttpClient.py in the flush method it closes 
> and reopens the connection:
> {noformat}
> if self.isOpen():
>     self.close()
> self.open(){noformat}
>  
> This code is closing the connection on every flush request. The flush request 
> occurs for every message send, which means that keep alive cannot be used. 
> Removing this code from flush means that keep alive can be used as the user 
> now has control over when the connection is closed.



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


[jira] [Updated] (THRIFT-4728) Cleanup for the double rendering test in JS

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4728:
--
Fix Version/s: (was: 0.12.0)
   1.0

> Cleanup for the double rendering test in JS 
> 
>
> Key: THRIFT-4728
> URL: https://issues.apache.org/jira/browse/THRIFT-4728
> Project: Thrift
>  Issue Type: Improvement
>Reporter: Ozan Can Altiok
>Assignee: James E. King III
>Priority: Major
> Fix For: 1.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> * Fix the header comment written in test-double-rendering.js
>  * Use the qunit and jquery scripts provided in the thrift project
>  * Automate the double rendering test



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


[jira] [Updated] (THRIFT-4728) Cleanup for the double rendering test in JS

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4728:
--
Affects Version/s: 0.12.0

> Cleanup for the double rendering test in JS 
> 
>
> Key: THRIFT-4728
> URL: https://issues.apache.org/jira/browse/THRIFT-4728
> Project: Thrift
>  Issue Type: Improvement
>Affects Versions: 0.12.0
>Reporter: Ozan Can Altiok
>Assignee: James E. King III
>Priority: Major
> Fix For: 1.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> * Fix the header comment written in test-double-rendering.js
>  * Use the qunit and jquery scripts provided in the thrift project
>  * Automate the double rendering test



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


[jira] [Resolved] (THRIFT-4728) Cleanup for the double rendering test in JS

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4728.
---
Resolution: Fixed
  Assignee: James E. King III

> Cleanup for the double rendering test in JS 
> 
>
> Key: THRIFT-4728
> URL: https://issues.apache.org/jira/browse/THRIFT-4728
> Project: Thrift
>  Issue Type: Improvement
>Reporter: Ozan Can Altiok
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.12.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> * Fix the header comment written in test-double-rendering.js
>  * Use the qunit and jquery scripts provided in the thrift project
>  * Automate the double rendering test



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


[jira] [Updated] (THRIFT-4647) [CVE-2018-11798] Node.js Fileserver webroot path

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4647:
--
Affects Version/s: 0.9.2

> [CVE-2018-11798] Node.js Fileserver webroot path 
> -
>
> Key: THRIFT-4647
> URL: https://issues.apache.org/jira/browse/THRIFT-4647
> Project: Thrift
>  Issue Type: Bug
>  Components: Node.js - Library
>Affects Versions: 0.9.2
>Reporter: Jake Farrell
>Assignee: Jake Farrell
>Priority: Critical
>  Labels: SECURITY
> Fix For: 0.12.0
>
>
> Node.js fileserver allows for escaping the set file path 



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


[SECURITY] CVE-2018-11798 Announcement

2019-01-07 Thread James E. King III
Reported By: Asger Feldthaus
Vendor: The Apache Software Foundation
Product: Apache Thrift
Problem Type: Improper Access Control
Versions Affected: Apache Thrift versions 0.9.2 through 0.11.0
Mitigation: Upgrading to the latest 0.12.0 release

Description:
The Apache Thrift Node.js static file server has been determined to have a
security vulnerability in it which a remote user has the ability to access
files outside the set webservers docroot path.

Resolution:
The code which sets the visible path for the static files to be served will
now verify that the requested path is within the specified webservers
docroot path and not allow a malicious user to escape out of the configured
path.

Jira issue:
 - https://issues.apache.org/jira/browse/THRIFT-4647

Mitre issue:
  - https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-11798

Committed resolution:
 -
*https://github.com/apache/thrift/commit/2a2b72f6c8aef200ecee4984f011e06052288ff2
*

On behalf of the Apache Thrift PMC,

Thank you


[jira] [Closed] (THRIFT-4647) [CVE-2018-11798] Node.js Fileserver webroot path

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-4647.
-
Resolution: Fixed

> [CVE-2018-11798] Node.js Fileserver webroot path 
> -
>
> Key: THRIFT-4647
> URL: https://issues.apache.org/jira/browse/THRIFT-4647
> Project: Thrift
>  Issue Type: Bug
>  Components: Node.js - Library
>Affects Versions: 0.9.2
>Reporter: Jake Farrell
>Assignee: Jake Farrell
>Priority: Critical
>  Labels: SECURITY
> Fix For: 0.12.0
>
>
> Node.js fileserver allows for escaping the set file path 
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-11798



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


[jira] [Updated] (THRIFT-4647) [CVE-2018-11798] Node.js Fileserver webroot path

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4647:
--
Description: 
Node.js fileserver allows for escaping the set file path 

https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-11798

  was:Node.js fileserver allows for escaping the set file path 


> [CVE-2018-11798] Node.js Fileserver webroot path 
> -
>
> Key: THRIFT-4647
> URL: https://issues.apache.org/jira/browse/THRIFT-4647
> Project: Thrift
>  Issue Type: Bug
>  Components: Node.js - Library
>Affects Versions: 0.9.2
>Reporter: Jake Farrell
>Assignee: Jake Farrell
>Priority: Critical
>  Labels: SECURITY
> Fix For: 0.12.0
>
>
> Node.js fileserver allows for escaping the set file path 
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-11798



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


[jira] [Closed] (THRIFT-4506) [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in release builds

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-4506.
-
Resolution: Fixed

> [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in 
> release builds
> --
>
> Key: THRIFT-4506
> URL: https://issues.apache.org/jira/browse/THRIFT-4506
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.5
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Minor
>  Labels: SASL, security
> Fix For: 0.12.0
>
>
> There is an assertion in the SASL transport for Java that will only be 
> processed in debug builds, at 
> https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
>   The preceeding while loop can be changed to guarantee this assertion in all 
> builds.
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1320



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


[jira] [Updated] (THRIFT-4647) [CVE-2018-11798] Node.js Fileserver webroot path

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4647:
--
Labels: SECURITY  (was: )

> [CVE-2018-11798] Node.js Fileserver webroot path 
> -
>
> Key: THRIFT-4647
> URL: https://issues.apache.org/jira/browse/THRIFT-4647
> Project: Thrift
>  Issue Type: Bug
>  Components: Node.js - Library
>Reporter: Jake Farrell
>Assignee: Jake Farrell
>Priority: Critical
>  Labels: SECURITY
> Fix For: 0.12.0
>
>
> Node.js fileserver allows for escaping the set file path 



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


[jira] [Reopened] (THRIFT-4506) [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in release builds

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reopened THRIFT-4506:
---

> [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in 
> release builds
> --
>
> Key: THRIFT-4506
> URL: https://issues.apache.org/jira/browse/THRIFT-4506
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Minor
>  Labels: SASL, security
> Fix For: 0.12.0
>
>
> There is an assertion in the SASL transport for Java that will only be 
> processed in debug builds, at 
> https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
>   The preceeding while loop can be changed to guarantee this assertion in all 
> builds.
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1320



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


[jira] [Updated] (THRIFT-4506) [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in release builds

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4506:
--
Affects Version/s: (was: 0.11.0)
   0.5

> [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in 
> release builds
> --
>
> Key: THRIFT-4506
> URL: https://issues.apache.org/jira/browse/THRIFT-4506
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.5
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Minor
>  Labels: SASL, security
> Fix For: 0.12.0
>
>
> There is an assertion in the SASL transport for Java that will only be 
> processed in debug builds, at 
> https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
>   The preceeding while loop can be changed to guarantee this assertion in all 
> builds.
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1320



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


[jira] [Updated] (THRIFT-4647) [CVE-2018-11798] Node.js Fileserver webroot path

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4647:
--
Summary: [CVE-2018-11798] Node.js Fileserver webroot path   (was: Node.js 
Fileserver webroot path )

> [CVE-2018-11798] Node.js Fileserver webroot path 
> -
>
> Key: THRIFT-4647
> URL: https://issues.apache.org/jira/browse/THRIFT-4647
> Project: Thrift
>  Issue Type: Bug
>  Components: Node.js - Library
>Reporter: Jake Farrell
>Assignee: Jake Farrell
>Priority: Critical
> Fix For: 0.12.0
>
>
> Node.js fileserver allows for escaping the set file path 



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


[jira] [Reopened] (THRIFT-4647) Node.js Fileserver webroot path

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reopened THRIFT-4647:
---

Reopen to add CVE Info.

> Node.js Fileserver webroot path 
> 
>
> Key: THRIFT-4647
> URL: https://issues.apache.org/jira/browse/THRIFT-4647
> Project: Thrift
>  Issue Type: Bug
>  Components: Node.js - Library
>Reporter: Jake Farrell
>Assignee: Jake Farrell
>Priority: Critical
> Fix For: 0.12.0
>
>
> Node.js fileserver allows for escaping the set file path 



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


[SECURITY] CVE-2018-1320 Announcement

2019-01-07 Thread James E. King III
Reported By: Sudheesh Katkam
Vendor: The Apache Software Foundation
Product: Apache Thrift
Problem Type: Improper Authentication
Versions Affected: Apache Thrift versions 0.5.0 through 0.11.0
Mitigation: Upgrading to the latest 0.12.0 release

Description:
Apache Thrift Java client library TSaslTransport can bypass SASL negotiation
isComplete validation. An assert was previously used to determine if the
SASL handshake had successfully completed, but in some cases this assertion
could be disabled in production settings making the validation incomplete.

Resolution:
The assertion has been removed and an isComplete check has
been moved within the handshake processing loop. The fix is contained
in the 0.12.0 Apache Thrift release.

Jira issue:
 - https://issues.apache.org/jira/browse/THRIFT-4506

Mitre issue:
  - https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1320

Committed resolution:
 -
https://github.com/apache/thrift/commit/d973409661f820d80d72c0034d06a12348c8705e

On behalf of the Apache Thrift PMC,

Thank you


[jira] [Updated] (THRIFT-4506) [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in release builds

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4506:
--
Summary: [CVE-2018-1320] Remove assertion in Java SASL code that would be 
ignored in release builds  (was: Remove assertion in Java SASL code that would 
be ignored in release builds)

> [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in 
> release builds
> --
>
> Key: THRIFT-4506
> URL: https://issues.apache.org/jira/browse/THRIFT-4506
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Minor
>  Labels: SASL, security
> Fix For: 0.12.0
>
>
> There is an assertion in the SASL transport for Java that will only be 
> processed in debug builds, at 
> https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
>   The preceeding while loop can be changed to guarantee this assertion in all 
> builds.



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


[jira] [Closed] (THRIFT-4506) [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in release builds

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-4506.
-
Resolution: Fixed

> [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in 
> release builds
> --
>
> Key: THRIFT-4506
> URL: https://issues.apache.org/jira/browse/THRIFT-4506
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Minor
>  Labels: SASL, security
> Fix For: 0.12.0
>
>
> There is an assertion in the SASL transport for Java that will only be 
> processed in debug builds, at 
> https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
>   The preceeding while loop can be changed to guarantee this assertion in all 
> builds.
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1320



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


[jira] [Updated] (THRIFT-4506) [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in release builds

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4506:
--
Description: 
There is an assertion in the SASL transport for Java that will only be 
processed in debug builds, at 
https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
  The preceeding while loop can be changed to guarantee this assertion in all 
builds.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1320

  was:There is an assertion in the SASL transport for Java that will only be 
processed in debug builds, at 
https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
  The preceeding while loop can be changed to guarantee this assertion in all 
builds.


> [CVE-2018-1320] Remove assertion in Java SASL code that would be ignored in 
> release builds
> --
>
> Key: THRIFT-4506
> URL: https://issues.apache.org/jira/browse/THRIFT-4506
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Minor
>  Labels: SASL, security
> Fix For: 0.12.0
>
>
> There is an assertion in the SASL transport for Java that will only be 
> processed in debug builds, at 
> https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
>   The preceeding while loop can be changed to guarantee this assertion in all 
> builds.
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1320



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


[jira] [Reopened] (THRIFT-4506) Remove assertion in Java SASL code that would be ignored in release builds

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reopened THRIFT-4506:
---

Adding CVE.

> Remove assertion in Java SASL code that would be ignored in release builds
> --
>
> Key: THRIFT-4506
> URL: https://issues.apache.org/jira/browse/THRIFT-4506
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: James E. King III
>Assignee: James E. King III
>Priority: Minor
>  Labels: SASL, security
> Fix For: 0.12.0
>
>
> There is an assertion in the SASL transport for Java that will only be 
> processed in debug builds, at 
> https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L298.
>   The preceeding while loop can be changed to guarantee this assertion in all 
> builds.



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


[jira] [Commented] (THRIFT-2798) Thrift does not compile on Windows with TARGET_WIN_XP=0

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-2798:
---

We should probably drop Windows XP support and use _WINNT_WIN32=0x0601 (Windows 
7 or later):
https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2017

Given the number of breaking changes in THRIFT-4720 it might be a good time to 
do this.

> Thrift does not compile on Windows with TARGET_WIN_XP=0
> ---
>
> Key: THRIFT-2798
> URL: https://issues.apache.org/jira/browse/THRIFT-2798
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.9.1, 0.9.2
>Reporter: Alex Merry
>Priority: Major
>
> To compile with Visual Studio 2013 after defining TARGET_WIN_XP=0 (and 
> HAVE_STDINT_H=1), I have to do the following:
> # Remove BoostThreadFactory.cpp and BoostThreadFactory.h from concurrency
> # Add
> \#ifndef WINVER
> \#  define WINVER 0x0601
> \#endif
>   after
> \#ifndef _WIN32_WINNT
> \#  define _WIN32_WINNT 0x0601
> \#endif
>   in windows/config.h
>  # Remove #include  from Thrift.h (or move 
> it to after #include ), since it depends on the 
> WINVER definition from windows/config.h.
> I'm not sure what the best fix for the boost thread factory thing is (maybe 
> #ifdef the file contents based on USE_BOOST_THREAD?), but I think the other 
> code changes should go in.
> It may also be worth having
> \#if _MSC_VER >= 1800
> \#  define HAVE_STDINT_H
> \#endif
> in windows/config.h.



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


[jira] [Updated] (THRIFT-4720) migrate code to c++11

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4720:
--
Labels: Breaking-Change  (was: )

> migrate code to c++11
> -
>
> Key: THRIFT-4720
> URL: https://issues.apache.org/jira/browse/THRIFT-4720
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler, C++ - Library
>Affects Versions: 1.0
>Reporter: yuanyuan chen
>Priority: Major
>  Labels: Breaking-Change
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As discussed in THRIFT-4678,now that we may want to drop C++03 support.
> I will take the following steps:
> 1.force C++11 compilers in CMake.But I am not familiar with GNU 
> autotools,would anybody help me changing that piece of script?
> 2.remove deprecated features in C++11 from run-time library and compiler 
> generated code.
> 3.replace boost components with C++11 counterparts gradually.
>  
> This issue is created for some advises for the above steps.
>  



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


[jira] [Commented] (THRIFT-1947) C++ constructor with initializer list should be generated

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-1947:
---

Given THRIFT-4720 has moved us to C++11 does it make that easier or just work 
in C++11 now?

> C++ constructor with initializer list should be generated
> -
>
> Key: THRIFT-1947
> URL: https://issues.apache.org/jira/browse/THRIFT-1947
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler
>Reporter: Vitali Lovich
>Assignee: Kamil Sałaś
>Priority: Major
> Attachments: 0001-Thrift-1947.patch, 0001-Thrift-1947_v2.patch, 
> 0001-Thrift-1947_v3.patch, v3_test_out.zip
>
>
> It would be really nice if the thrift constructor took in an initializer list 
> like the generated Java constructor does for non-optional fields.



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


[jira] [Commented] (THRIFT-3560) C++ TTransport::isOpen() and TTransport::getOrigin() should be const member functions

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-3560:
---

Given THRIFT-4720 is introducing breaking changes to C++, now would be a very 
good time to fix const correctness issues like this in the public interface.

> C++ TTransport::isOpen() and TTransport::getOrigin() should be const member 
> functions
> -
>
> Key: THRIFT-3560
> URL: https://issues.apache.org/jira/browse/THRIFT-3560
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.9.3, 0.10.0, 1.0
>Reporter: Sebastian Zenker
>Priority: Minor
>  Labels: easyfix
>
> ... as they should not alter the state of TTransport. Also peek() should be 
> const in my opinion, but this requires some more refactoring.



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


[jira] [Closed] (THRIFT-3779) Qt Client Android and Windows QTcpSocket

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-3779.
-
Resolution: Incomplete
  Assignee: James E. King III

Author closed and expressed no interest in completing after a long discussion 
on the pull request.

> Qt Client Android and Windows QTcpSocket
> 
>
> Key: THRIFT-3779
> URL: https://issues.apache.org/jira/browse/THRIFT-3779
> Project: Thrift
>  Issue Type: New Feature
>  Components: C++ - Library
> Environment: Qt Windows, Qt Android on windows
>Reporter: Gjergji Ramku
>Assignee: James E. King III
>Priority: Minor
>  Labels: features
>
> Thrift Client library based on QTcpSocket.
> QTcpSocket should help make a tcp socket client run on all platforms where Qt 
> runs.
> Is there such port?
> I already have a port that I have tested on Qt Android and Qt Windows clients.



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


[jira] [Updated] (THRIFT-3560) C++ TTransport::isOpen() and TTransport::getOrigin() should be const member functions

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-3560:
--
Affects Version/s: (was: 1.0)

> C++ TTransport::isOpen() and TTransport::getOrigin() should be const member 
> functions
> -
>
> Key: THRIFT-3560
> URL: https://issues.apache.org/jira/browse/THRIFT-3560
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.9.3, 0.10.0
>Reporter: Sebastian Zenker
>Priority: Minor
>  Labels: easyfix
>
> ... as they should not alter the state of TTransport. Also peek() should be 
> const in my opinion, but this requires some more refactoring.



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


[jira] [Commented] (THRIFT-4156) Using boost spirit instead of lex and yacc

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-4156:
---

With THRIFT-4720 we've removed the runtime library dependency on boost.  This 
would introduce a build-time dependency on boost to build the compiler.  
Boost.Spirit has one of the widest dependency lists in Boost, requiring much of 
the release.  I agree it is a cool idea.  I don't necessarily see flex and 
bison as difficult dependencies compared to boost however, especially in a 
product with a stable IDL.  It would be nice to see this completed if the dev 
team thinks it's worth introducing boost as a dependency for building the 
compiler.  We could link boost static to the compiler to eliminate runtime 
dependencies but you would still need it to build, and that's a pretty big 
dependency.

> Using boost spirit instead of lex and yacc
> --
>
> Key: THRIFT-4156
> URL: https://issues.apache.org/jira/browse/THRIFT-4156
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General)
>Reporter: Mike Gresens
>Priority: Major
> Attachments: MyService.hpp, MyService.thrift, ast.hpp, 
> doxygen_enum.png, doxygen_service.png, doxygen_struct.png, parser.cpp
>
>
> As a developer I want to use boost spirit to get rid of lex and yacc.
> This kicks dependency to lex, flex, yacc, bison or what ever.
> This makes building easier, because only c++ code must be compiled.
> All grammar is inside the code - all c++. No need to learn ll and yy.



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


[jira] [Closed] (THRIFT-4027) Compilation error with boost 1.63.0

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-4027.
-
Resolution: Fixed

> Compilation error with boost 1.63.0
> ---
>
> Key: THRIFT-4027
> URL: https://issues.apache.org/jira/browse/THRIFT-4027
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.10.0
> Environment: Boost 1.63.0
>Reporter: Benoit Sigoure
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.11.0
>
> Attachments: 1005-Workaround-for-Boost-1.63.0.patch
>
>
> It's kinda stupid but {{Boost.Test}} introduced a global variable called 
> {{VERSION}} in one of their inline headers ([in this 
> commit|https://github.com/boostorg/test/commit/86bcffea6dfb2513142c42721bf2af3e80ea068d])
>  and this causes the build of Thrift 0.10.0 to fail with:
> {code}
> make[1]: Entering directory 
> `/bld/thrift/Artools-rpmbuild/thrift-0.10.0/compiler/cpp/test'
> g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift 
> -I../../../lib/c_glib/src/thrift  -I/usr/include -I../../../compiler/cpp/src 
> -I../../../lib/cpp/src -I../../../lib/cpp/src  -Wall -Wextra -pedantic -O2 -g 
> -pipe -Wall -Wp,-D
> _FORTIFY_SOURCE=2 -fexceptions -fstack-protector -fno-var-tracking 
> -fno-var-tracking-assignments --param=ssp-buffer-size=4 -m32 -march=i686 
> -mtune=atom -fasynchronous-unwind-tables  -std=c++11 -c -o 
> plugin/conversion_test.o plugin/convers
> ion_test.cc
> In file included from /usr/include/boost/test/included/unit_test.hpp:32:0,
>  from plugin/conversion_test.cc:28:
> /usr/include/boost/test/impl/unit_test_parameters.ipp:102:12: error: expected 
> unqualified-id before string constant
>  std::string VERSION   = "version";
> ^
> {code}



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


[jira] [Comment Edited] (THRIFT-4027) Compilation error with boost 1.63.0

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III edited comment on THRIFT-4027 at 1/7/19 1:24 PM:
---

I believe this was fixed in 0.11.0 by changing our macro to PACKAGE_VERSION.


was (Author: jking3):
I believe this was fixed in 0.11.0 by changing our macro to BOOST_VERSION.

> Compilation error with boost 1.63.0
> ---
>
> Key: THRIFT-4027
> URL: https://issues.apache.org/jira/browse/THRIFT-4027
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.10.0
> Environment: Boost 1.63.0
>Reporter: Benoit Sigoure
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.11.0
>
> Attachments: 1005-Workaround-for-Boost-1.63.0.patch
>
>
> It's kinda stupid but {{Boost.Test}} introduced a global variable called 
> {{VERSION}} in one of their inline headers ([in this 
> commit|https://github.com/boostorg/test/commit/86bcffea6dfb2513142c42721bf2af3e80ea068d])
>  and this causes the build of Thrift 0.10.0 to fail with:
> {code}
> make[1]: Entering directory 
> `/bld/thrift/Artools-rpmbuild/thrift-0.10.0/compiler/cpp/test'
> g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift 
> -I../../../lib/c_glib/src/thrift  -I/usr/include -I../../../compiler/cpp/src 
> -I../../../lib/cpp/src -I../../../lib/cpp/src  -Wall -Wextra -pedantic -O2 -g 
> -pipe -Wall -Wp,-D
> _FORTIFY_SOURCE=2 -fexceptions -fstack-protector -fno-var-tracking 
> -fno-var-tracking-assignments --param=ssp-buffer-size=4 -m32 -march=i686 
> -mtune=atom -fasynchronous-unwind-tables  -std=c++11 -c -o 
> plugin/conversion_test.o plugin/convers
> ion_test.cc
> In file included from /usr/include/boost/test/included/unit_test.hpp:32:0,
>  from plugin/conversion_test.cc:28:
> /usr/include/boost/test/impl/unit_test_parameters.ipp:102:12: error: expected 
> unqualified-id before string constant
>  std::string VERSION   = "version";
> ^
> {code}



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


[jira] [Commented] (THRIFT-2256) Using c++11/c++0x std library replace boost library

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-2256:
---

Just committed a C++11 pull request (THRIFT-4720) FYI.

> Using c++11/c++0x std library  replace boost library
> 
>
> Key: THRIFT-2256
> URL: https://issues.apache.org/jira/browse/THRIFT-2256
> Project: Thrift
>  Issue Type: New Feature
>  Components: C++ - Library
>Affects Versions: 1.0
> Environment: linux windows
>Reporter: david han
>Assignee: Roger Meier
>Priority: Major
>  Labels: features
> Fix For: 0.9.2
>
>
> the C++ 11/C++ 0X  standard already published  as "ISO/IEC 14882:2011"
> the compiler of MSVC 2012 and gcc 4.8.1 already support it.
> In the thrift Cpp library, mostly using the boost library part already 
> implemented in C++11
> so, I hope the thrift using the C++11 to replace the boost library, reduce 
> the third part Dependence.



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


[jira] [Reopened] (THRIFT-4027) Compilation error with boost 1.63.0

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III reopened THRIFT-4027:
---

> Compilation error with boost 1.63.0
> ---
>
> Key: THRIFT-4027
> URL: https://issues.apache.org/jira/browse/THRIFT-4027
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.10.0
> Environment: Boost 1.63.0
>Reporter: Benoit Sigoure
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.11.0
>
> Attachments: 1005-Workaround-for-Boost-1.63.0.patch
>
>
> It's kinda stupid but {{Boost.Test}} introduced a global variable called 
> {{VERSION}} in one of their inline headers ([in this 
> commit|https://github.com/boostorg/test/commit/86bcffea6dfb2513142c42721bf2af3e80ea068d])
>  and this causes the build of Thrift 0.10.0 to fail with:
> {code}
> make[1]: Entering directory 
> `/bld/thrift/Artools-rpmbuild/thrift-0.10.0/compiler/cpp/test'
> g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift 
> -I../../../lib/c_glib/src/thrift  -I/usr/include -I../../../compiler/cpp/src 
> -I../../../lib/cpp/src -I../../../lib/cpp/src  -Wall -Wextra -pedantic -O2 -g 
> -pipe -Wall -Wp,-D
> _FORTIFY_SOURCE=2 -fexceptions -fstack-protector -fno-var-tracking 
> -fno-var-tracking-assignments --param=ssp-buffer-size=4 -m32 -march=i686 
> -mtune=atom -fasynchronous-unwind-tables  -std=c++11 -c -o 
> plugin/conversion_test.o plugin/convers
> ion_test.cc
> In file included from /usr/include/boost/test/included/unit_test.hpp:32:0,
>  from plugin/conversion_test.cc:28:
> /usr/include/boost/test/impl/unit_test_parameters.ipp:102:12: error: expected 
> unqualified-id before string constant
>  std::string VERSION   = "version";
> ^
> {code}



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


[jira] [Resolved] (THRIFT-4027) Compilation error with boost 1.63.0

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4027.
---
   Resolution: Fixed
 Assignee: James E. King III
Fix Version/s: 0.11.0

I believe this was fixed in 0.11.0 by changing our macro to BOOST_VERSION.

> Compilation error with boost 1.63.0
> ---
>
> Key: THRIFT-4027
> URL: https://issues.apache.org/jira/browse/THRIFT-4027
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.10.0
> Environment: Boost 1.63.0
>Reporter: Benoit Sigoure
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.11.0
>
> Attachments: 1005-Workaround-for-Boost-1.63.0.patch
>
>
> It's kinda stupid but {{Boost.Test}} introduced a global variable called 
> {{VERSION}} in one of their inline headers ([in this 
> commit|https://github.com/boostorg/test/commit/86bcffea6dfb2513142c42721bf2af3e80ea068d])
>  and this causes the build of Thrift 0.10.0 to fail with:
> {code}
> make[1]: Entering directory 
> `/bld/thrift/Artools-rpmbuild/thrift-0.10.0/compiler/cpp/test'
> g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift 
> -I../../../lib/c_glib/src/thrift  -I/usr/include -I../../../compiler/cpp/src 
> -I../../../lib/cpp/src -I../../../lib/cpp/src  -Wall -Wextra -pedantic -O2 -g 
> -pipe -Wall -Wp,-D
> _FORTIFY_SOURCE=2 -fexceptions -fstack-protector -fno-var-tracking 
> -fno-var-tracking-assignments --param=ssp-buffer-size=4 -m32 -march=i686 
> -mtune=atom -fasynchronous-unwind-tables  -std=c++11 -c -o 
> plugin/conversion_test.o plugin/convers
> ion_test.cc
> In file included from /usr/include/boost/test/included/unit_test.hpp:32:0,
>  from plugin/conversion_test.cc:28:
> /usr/include/boost/test/impl/unit_test_parameters.ipp:102:12: error: expected 
> unqualified-id before string constant
>  std::string VERSION   = "version";
> ^
> {code}



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


[jira] [Closed] (THRIFT-4027) Compilation error with boost 1.63.0

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III closed THRIFT-4027.
-

> Compilation error with boost 1.63.0
> ---
>
> Key: THRIFT-4027
> URL: https://issues.apache.org/jira/browse/THRIFT-4027
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.10.0
> Environment: Boost 1.63.0
>Reporter: Benoit Sigoure
>Assignee: James E. King III
>Priority: Major
> Fix For: 0.11.0
>
> Attachments: 1005-Workaround-for-Boost-1.63.0.patch
>
>
> It's kinda stupid but {{Boost.Test}} introduced a global variable called 
> {{VERSION}} in one of their inline headers ([in this 
> commit|https://github.com/boostorg/test/commit/86bcffea6dfb2513142c42721bf2af3e80ea068d])
>  and this causes the build of Thrift 0.10.0 to fail with:
> {code}
> make[1]: Entering directory 
> `/bld/thrift/Artools-rpmbuild/thrift-0.10.0/compiler/cpp/test'
> g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift 
> -I../../../lib/c_glib/src/thrift  -I/usr/include -I../../../compiler/cpp/src 
> -I../../../lib/cpp/src -I../../../lib/cpp/src  -Wall -Wextra -pedantic -O2 -g 
> -pipe -Wall -Wp,-D
> _FORTIFY_SOURCE=2 -fexceptions -fstack-protector -fno-var-tracking 
> -fno-var-tracking-assignments --param=ssp-buffer-size=4 -m32 -march=i686 
> -mtune=atom -fasynchronous-unwind-tables  -std=c++11 -c -o 
> plugin/conversion_test.o plugin/convers
> ion_test.cc
> In file included from /usr/include/boost/test/included/unit_test.hpp:32:0,
>  from plugin/conversion_test.cc:28:
> /usr/include/boost/test/impl/unit_test_parameters.ipp:102:12: error: expected 
> unqualified-id before string constant
>  std::string VERSION   = "version";
> ^
> {code}



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


[jira] [Commented] (THRIFT-3817) Redeclaration of std::tuple

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-3817:
---

May no longer be an issue with the commit of THRIFT-4720.

> Redeclaration of std::tuple 
> 
>
> Key: THRIFT-3817
> URL: https://issues.apache.org/jira/browse/THRIFT-3817
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.9.3
>Reporter: Kurt Johnson
>Priority: Major
>
> In /lib/cpp/src/thrift/cxxfunctional.h, the version of the functional header 
> is picked based on the compiler. Gcc defaults to . This 
> includes the  which causes a redeclaration error if the c++11 
>  has been used anywhere else.
> Thrift should default to using c++11 version of functional if the compiler 
> supports it.



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


[jira] [Commented] (THRIFT-2242) Generate C++11 code

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-2242:
---

I often rely on the properties of an ordered set in order to do optimal set 
manipulation.  To see it change to an unordered set would be a breaking change 
to me (unless I could coerce it to be an ordered set with cpp_type and 
cpp_include, both of which are hacks).

I just merged THRIFT-4720 which eliminated boost from the C++ runtime and 
converted to noexcept.  Looking forward to cleaning up with delegating 
constructors and eliminating all of the PlatformThreadFactory.

Not sure you want to keep this open or not, up to you.  Half of it is now done.

> Generate C++11 code
> ---
>
> Key: THRIFT-2242
> URL: https://issues.apache.org/jira/browse/THRIFT-2242
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.9.1
>Reporter: Vitali Lovich
>Priority: Major
>
> unordered_map instead of map, unordered_set instead of set, noexcept instead 
> of throw() (unless the exact semantics of throw() are needed which seems 
> unlikely).
> It should use the shared_ptr implementation that the library is configured 
> with.



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


[jira] [Commented] (THRIFT-4593) Unit Tests failing on Alpine Linux due to non-portable mutex initializers

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III commented on THRIFT-4593:
---

This will be cleaned up once PosixThreadFactory and PlatformThreadFactory are 
removed, based on ongoing work in THRIFT-4720.

> Unit Tests failing on Alpine Linux due to non-portable mutex initializers
> -
>
> Key: THRIFT-4593
> URL: https://issues.apache.org/jira/browse/THRIFT-4593
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.11.0
> Environment: Ubuntu Bionic (native)
> alpine:latest (docker)
>Reporter: Christopher Friedt
>Priority: Minor
>
> It seems that the lib/cpp/test suite is broken in the 0.11.0 tagged release 
> because this fails in Ubuntu Bionic and inside of an Alpine Linux 3.8 Docker 
> container.
> I would have thought all test suites would pass for tagged releases.
> In any case, I've narrowed the culprits down to the non-portable (NP) class 
> of Mutex initializers.
> I'd rather not speculate at this point exactly why this problem is happening. 
> Currently my patching just disables those tests undonditionally, but there 
> should probably be a better solution used in the end. E.g. better .m4 testing 
> for non-portable pthread features - if they are actually functional or just 
> stubs.
> Currently, I'm working on automating builds of thrift for Alpine Linux 3.8, 
> and they will likely require "make check" to pass successfully in future 
> versions. Might as well ensure it works now.
>  
> ```
> make[5]: Entering directory 
> '/home/cfriedt/Desktop/thrift-20180627/lib/cpp/test'
> Running 54 test cases...
> An error message from getaddrinfo on the console is expected:
> Thrift: Wed Jun 27 20:16:03 2018 getaddrinfo -2: Name or service not known
> *** No errors detected
> PASS: UnitTests
> Running 2 test cases...
> Thrift: Wed Jun 27 20:16:10 2018 ~TFDTransport TTransportException: 
> 'TFDTransport::close(): Bad file descriptor'
> *** No errors detected
> PASS: TFDTransportTest
> Running 1 test case...
> *** No errors detected
> PASS: TPipedTransportTest
> Running 3 test cases...
> *** No errors detected
> PASS: DebugProtoTest
> Running 11 test cases...
> *** No errors detected
> PASS: JSONProtoTest
> Running 17 test cases...
> *** No errors detected
> PASS: OptionalRequiredTest
> Running 4 test cases...
> *** No errors detected
> PASS: RecursiveTest
> Running 1 test case...
> *** No errors detected
> PASS: SpecializationTest
> Running 3 test cases...
> TBinaryProtocol => OK
> TLEBinaryProtocol => OK
> TCompactProtocol => OK
> *** No errors detected
> PASS: AllProtocolsTest
> Running 285 test cases...
> Timeout alarm expired; attempting to unblock transport
> Timeout alarm expired; attempting to unblock transport
> Timeout alarm expired; attempting to unblock transport
> Timeout alarm expired; attempting to unblock transport
> Timeout alarm expired; attempting to unblock transport
> ^CMakefile:1436: recipe for target 'check-TESTS' failed
> make[5]: *** [check-TESTS] Interrupt
> Makefile:1559: recipe for target 'check-am' failed
> make[4]: *** [check-am] Interrupt
> Makefile:1562: recipe for target 'check' failed
> make[3]: *** [check] Interrupt
> Makefile:1658: recipe for target 'check-recursive' failed
> make[2]: *** [check-recursive] Interrupt
> Makefile:580: recipe for target 'check-recursive' failed
> make[1]: *** [check-recursive] Interrupt
> Makefile:663: recipe for target 'check-recursive' failed
> make: *** [check-recursive] Interrupt
> ```



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


[jira] [Resolved] (THRIFT-4441) C++: support building lib without Boost

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4441.
---
   Resolution: Fixed
Fix Version/s: 1.0

The runtime C++ library no longer requires boost, based on the work in 
THRIFT-4720.  The unit tests still require boost.

> C++: support building lib without Boost
> ---
>
> Key: THRIFT-4441
> URL: https://issues.apache.org/jira/browse/THRIFT-4441
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler, C++ - Library
>Affects Versions: 0.11.0, 0.12.0
>Reporter: Francois Ferrand
>Assignee: James E. King III
>Priority: Major
>  Labels: boost, c++11
> Fix For: 1.0
>
>
> It would be great to support compiling Thrift library without boost: in 
> C++11, most of the things are already integrated, and it is often not 
> practical to integrate boost, esp. in embedded projects.
> Some steps have already been done (esp. THRIFT-2221) to support building user 
> code without boost, but it would be nice to allow building completely without 
> boost.



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


[jira] [Resolved] (THRIFT-4678) add noexcept cpp generator option

2019-01-07 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4678.
---
   Resolution: Fixed
 Assignee: James E. King III
Fix Version/s: 1.0

The pull request for THRIFT-4720 (C++11) made this change.

> add noexcept cpp generator option
> -
>
> Key: THRIFT-4678
> URL: https://issues.apache.org/jira/browse/THRIFT-4678
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Compiler, C++ - Library
>Affects Versions: 0.11.0
>Reporter: yuanyuan chen
>Assignee: James E. King III
>Priority: Minor
> Fix For: 1.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The C++11 standard has deprecated the usage of throw() to express 
> exceptions,so to avoid warnings from the compiler,I think this option is 
> useful.
> I have a pull request in github,this issue is created to track it.
> Some questions remain:
> 1.Should we change the runtime c++ library to use BOOST_NOEXCEPT_OR_NOTHROW?
> 2.Should we add an control option to enable all c++11 options like 
> moveable_types .etc?
> 3.Should we begin to support C+17 features? I think std::optional should be 
> used to implement optional keyword,but this is clearly an API breaking 
> change,so we need an c+17 control option.



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


[jira] [Updated] (THRIFT-4728) Cleanup for the double rendering test in JS

2019-01-07 Thread Ozan Can Altiok (JIRA)


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

Ozan Can Altiok updated THRIFT-4728:

Description: 
* Fix the header comment written in test-double-rendering.js
 * Use the qunit and jquery scripts provided in the thrift project
 * Automate the double rendering test

  was:
* Fix the header comment written in test-double-rendering.js
 * Use the qunit and jquery scripts provided in the thrift project
 * Automatize the double rendering test


> Cleanup for the double rendering test in JS 
> 
>
> Key: THRIFT-4728
> URL: https://issues.apache.org/jira/browse/THRIFT-4728
> Project: Thrift
>  Issue Type: Improvement
>Reporter: Ozan Can Altiok
>Priority: Major
> Fix For: 0.12.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> * Fix the header comment written in test-double-rendering.js
>  * Use the qunit and jquery scripts provided in the thrift project
>  * Automate the double rendering test



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


[jira] [Created] (THRIFT-4728) Cleanup for the double rendering test in JS

2019-01-07 Thread Ozan Can Altiok (JIRA)
Ozan Can Altiok created THRIFT-4728:
---

 Summary: Cleanup for the double rendering test in JS 
 Key: THRIFT-4728
 URL: https://issues.apache.org/jira/browse/THRIFT-4728
 Project: Thrift
  Issue Type: Improvement
Reporter: Ozan Can Altiok
 Fix For: 0.12.0


* Fix the comment written in test-double-rendering.js
 * use the qunit and jquery scripts provided in the thrift project
 * automatize the double rendering test



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


[jira] [Updated] (THRIFT-4728) Cleanup for the double rendering test in JS

2019-01-07 Thread Ozan Can Altiok (JIRA)


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

Ozan Can Altiok updated THRIFT-4728:

Description: 
* Fix the header comment written in test-double-rendering.js
 * Use the qunit and jquery scripts provided in the thrift project
 * Automatize the double rendering test

  was:
* Fix the comment written in test-double-rendering.js
 * use the qunit and jquery scripts provided in the thrift project
 * automatize the double rendering test


> Cleanup for the double rendering test in JS 
> 
>
> Key: THRIFT-4728
> URL: https://issues.apache.org/jira/browse/THRIFT-4728
> Project: Thrift
>  Issue Type: Improvement
>Reporter: Ozan Can Altiok
>Priority: Major
> Fix For: 0.12.0
>
>
> * Fix the header comment written in test-double-rendering.js
>  * Use the qunit and jquery scripts provided in the thrift project
>  * Automatize the double rendering test



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


[jira] [Updated] (THRIFT-4727) javascript compiler generates struct code with duplicate `case 0` statements

2019-01-07 Thread Xiao Wang (JIRA)


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

Xiao Wang updated THRIFT-4727:
--
Description: 
*Reproducible steps:*

Javascript compiler would always generate duplicate `case 0` codes;

1. Below is a demo IDL file:
{code:java}
// test.thrift
struct Obj {
   1: string name;
}

service Test {
   Obj test()
}

{code}
2. Generate code using
{code:java}
thrift -r --gen js:node test.thrift{code}
3. The related problematic code is like below:
{code:java}
// part of Test.js
..
Test_test_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true)
  {
    var ret = input.readFieldBegin();
    var fname = ret.fname;
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
  break;
    }
    switch (fid)
    {
  case 0:
  if (ftype == Thrift.Type.STRUCT) {
    this.success = new ttypes.Obj();
    this.success.read(input);
  } else {
    input.skip(ftype);
  }
  break;
  case 0:
    input.skip(ftype);
    break;
  default:
    input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};
..{code}
*_Root cause:_*

The code makes this bug was imported due to bugfix THRIFT-1089.

Commit address: 
[https://github.com/apache/thrift/commit/da6e6ae91894bc52fc04234fbd2610f8969399f4]

*_Potential fix:_*

I think remove below code should fix this problem:
{code:java}
if (fields.size() == 1) {
  // pseudo case to make jslint happy
  indent(out) << "case 0:" << endl;
  indent(out) << " input.skip(ftype);" << endl;
  indent(out) << " break;" << endl;
}
{code}
This code seems to satisfy jslint about 8 years ago, but now this also fails 
the static code scan both in jslint and sonarqube default profile.

I could propose a PR if it's OK to fix it this way.

 

  was:
*Reproducible steps:*

Javascript compiler would always generate duplicate `case 0` codes;

1. Below is a demo IDL file:

 
{code:java}
// test.thrift
struct Obj {
   1: string name;
}

service Test {
   Obj test()
}

{code}
2. Generate code using
{code:java}
thrift -r --gen js:node test.thrift{code}
3. The related problematic code is like below:

 

 
{code:java}
// part of Test.js
..
Test_test_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true)
  {
    var ret = input.readFieldBegin();
    var fname = ret.fname;
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
  break;
    }
    switch (fid)
    {
  case 0:
  if (ftype == Thrift.Type.STRUCT) {
    this.success = new ttypes.Obj();
    this.success.read(input);
  } else {
    input.skip(ftype);
  }
  break;
  case 0:
    input.skip(ftype);
    break;
  default:
    input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};
..{code}
*_Root cause:_*

The code makes this bug was imported due to bugfix THRIFT-1089.

Commit 
address:[https://github.com/apache/thrift/commit/da6e6ae91894bc52fc04234fbd2610f8969399f4|https://github.com/apache/thrift/commit/da6e6ae91894bc52fc04234fbd2610f8969399f4.]

*_Potential fix:_*

I think remove below code should fix this problem:
{code:java}
if (fields.size() == 1) {
  // pseudo case to make jslint happy
  indent(out) << "case 0:" << endl;
  indent(out) << " input.skip(ftype);" << endl;
  indent(out) << " break;" << endl;
}
{code}
This code seems to satisfy jslint about 8 years ago, but now this also fails 
the static code scan both in jslint and sonarqube default profile.

I could propose a PR if it's OK to fix it this way.

 


> javascript compiler generates struct code with duplicate  `case 0` statements
> -
>
> Key: THRIFT-4727
> URL: https://issues.apache.org/jira/browse/THRIFT-4727
> Project: Thrift
>  Issue Type: Bug
>  Components: JavaScript - Compiler
>Affects Versions: 0.7, 0.8, 0.9, 0.10.0, 0.11.0
>Reporter: Xiao Wang
>Priority: Major
>
> *Reproducible steps:*
> Javascript compiler would always generate duplicate `case 0` codes;
> 1. Below is a demo IDL file:
> {code:java}
> // test.thrift
> struct Obj {
>    1: string name;
> }
> service Test {
>    Obj test()
> }
> {code}
> 2. Generate code using
> {code:java}
> thrift -r --gen js:node test.thrift{code}
> 3. The related problematic code is like below:
> {code:java}
> // part of Test.js
> ..
> Test_test_result.prototype.read = function(input) {
>   input.readStructBegin();
>   while (true)
>   {
>     var ret = input.readFieldBegin();
>     var fname = ret.fname;
>     var ftype = ret.ftype;
>     var fid = ret.fid;
>     if (ftype == Thrift.Type.STOP) {
>   break;
>     }
>     switch (fid)
>     {
>   case 0:
>   if (ftype 

[jira] [Updated] (THRIFT-4727) javascript compiler generates struct code with duplicate `case 0` statements

2019-01-07 Thread Xiao Wang (JIRA)


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

Xiao Wang updated THRIFT-4727:
--
Description: 
*Reproducible steps:*

Javascript compiler would always generate duplicate `case 0` codes;

1. Below is a demo IDL file:

 
{code:java}
// test.thrift
struct Obj {
   1: string name;
}

service Test {
   Obj test()
}

{code}
2. Generate code using
{code:java}
thrift -r --gen js:node test.thrift{code}
3. The related problematic code is like below:

 

 
{code:java}
// part of Test.js
..
Test_test_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true)
  {
    var ret = input.readFieldBegin();
    var fname = ret.fname;
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
  break;
    }
    switch (fid)
    {
  case 0:
  if (ftype == Thrift.Type.STRUCT) {
    this.success = new ttypes.Obj();
    this.success.read(input);
  } else {
    input.skip(ftype);
  }
  break;
  case 0:
    input.skip(ftype);
    break;
  default:
    input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};
..{code}
*_Root cause:_*

The code makes this bug was imported due to bugfix THRIFT-1089.

Commit 
address:[https://github.com/apache/thrift/commit/da6e6ae91894bc52fc04234fbd2610f8969399f4|https://github.com/apache/thrift/commit/da6e6ae91894bc52fc04234fbd2610f8969399f4.]

*_Potential fix:_*

I think remove below code should fix this problem:
{code:java}
if (fields.size() == 1) {
  // pseudo case to make jslint happy
  indent(out) << "case 0:" << endl;
  indent(out) << " input.skip(ftype);" << endl;
  indent(out) << " break;" << endl;
}
{code}
This code seems to satisfy jslint about 8 years ago, but now this also fails 
the static code scan both in jslint and sonarqube default profile.

I could propose a PR if it's OK to fix it this way.

 

  was:
*Reproducible steps:*

Javascript compiler would always generate duplicate `case 0` codes;

1. Below is a demo IDL file:

 
{code:java}
// test.thrift
struct Obj {
   1: string name;
}

service Test {
   Obj test()
}

{code}
2. Generate code using
{code:java}
thrift -r --gen js:node test.thrift{code}
3. The related problematic code is like below:

 

 
{code:java}
// part of Test.js
..
Test_test_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true)
  {
    var ret = input.readFieldBegin();
    var fname = ret.fname;
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
  break;
    }
    switch (fid)
    {
  case 0:
  if (ftype == Thrift.Type.STRUCT) {
    this.success = new ttypes.Obj();
    this.success.read(input);
  } else {
    input.skip(ftype);
  }
  break;
  case 0:
    input.skip(ftype);
    break;
  default:
    input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};
..{code}
*_Root cause:_*

The code makes this bug was imported due to bugfix 
[THRIFT-1089|https://issues.apache.org/jira/browse/THRIFT-1089].

Commit 
address:[https://github.com/apache/thrift/commit/da6e6ae91894bc52fc04234fbd2610f8969399f4.]

*_Potential fix:_*

I think remove below code should fix this problem:
{code:java}
if (fields.size() == 1) {
  // pseudo case to make jslint happy
  indent(out) << "case 0:" << endl;
  indent(out) << " input.skip(ftype);" << endl;
  indent(out) << " break;" << endl;
}
{code}
This code seems to satisfy jslint about 8 years ago, but now this also fails 
the static code scan both in jslint and sonarqube default profile.

 

 


> javascript compiler generates struct code with duplicate  `case 0` statements
> -
>
> Key: THRIFT-4727
> URL: https://issues.apache.org/jira/browse/THRIFT-4727
> Project: Thrift
>  Issue Type: Bug
>  Components: JavaScript - Compiler
>Affects Versions: 0.7, 0.8, 0.9, 0.10.0, 0.11.0
>Reporter: Xiao Wang
>Priority: Major
>
> *Reproducible steps:*
> Javascript compiler would always generate duplicate `case 0` codes;
> 1. Below is a demo IDL file:
>  
> {code:java}
> // test.thrift
> struct Obj {
>    1: string name;
> }
> service Test {
>    Obj test()
> }
> {code}
> 2. Generate code using
> {code:java}
> thrift -r --gen js:node test.thrift{code}
> 3. The related problematic code is like below:
>  
>  
> {code:java}
> // part of Test.js
> ..
> Test_test_result.prototype.read = function(input) {
>   input.readStructBegin();
>   while (true)
>   {
>     var ret = input.readFieldBegin();
>     var fname = ret.fname;
>     var ftype = ret.ftype;
>     var fid = ret.fid;
>     if (ftype == Thrift.Type.STOP) {
>   break;
>     }
>     switch (fid)
>     {
>   

[jira] [Created] (THRIFT-4727) javascript compiler generates struct code with duplicate `case 0` statements

2019-01-07 Thread Xiao Wang (JIRA)
Xiao Wang created THRIFT-4727:
-

 Summary: javascript compiler generates struct code with duplicate  
`case 0` statements
 Key: THRIFT-4727
 URL: https://issues.apache.org/jira/browse/THRIFT-4727
 Project: Thrift
  Issue Type: Bug
  Components: JavaScript - Compiler
Affects Versions: 0.11.0, 0.10.0, 0.9, 0.8, 0.7
Reporter: Xiao Wang


*Reproducible steps:*

Javascript compiler would always generate duplicate `case 0` codes;

1. Below is a demo IDL file:

 
{code:java}
// test.thrift
struct Obj {
   1: string name;
}

service Test {
   Obj test()
}

{code}
2. Generate code using
{code:java}
thrift -r --gen js:node test.thrift{code}
3. The related problematic code is like below:

 

 
{code:java}
// part of Test.js
..
Test_test_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true)
  {
    var ret = input.readFieldBegin();
    var fname = ret.fname;
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
  break;
    }
    switch (fid)
    {
  case 0:
  if (ftype == Thrift.Type.STRUCT) {
    this.success = new ttypes.Obj();
    this.success.read(input);
  } else {
    input.skip(ftype);
  }
  break;
  case 0:
    input.skip(ftype);
    break;
  default:
    input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};
..{code}
*_Root cause:_*

The code makes this bug was imported due to bugfix 
[THRIFT-1089|https://issues.apache.org/jira/browse/THRIFT-1089].

Commit 
address:[https://github.com/apache/thrift/commit/da6e6ae91894bc52fc04234fbd2610f8969399f4.]

*_Potential fix:_*

I think remove below code should fix this problem:
{code:java}
if (fields.size() == 1) {
  // pseudo case to make jslint happy
  indent(out) << "case 0:" << endl;
  indent(out) << " input.skip(ftype);" << endl;
  indent(out) << " break;" << endl;
}
{code}
This code seems to satisfy jslint about 8 years ago, but now this also fails 
the static code scan both in jslint and sonarqube default profile.

 

 



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