[jira] [Commented] (THRIFT-4489) Unix domain socket support for NodeJS client

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4489:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1491
  
Looks good, will merge in the morning.


> Unix domain socket support for NodeJS client
> 
>
> Key: THRIFT-4489
> URL: https://issues.apache.org/jira/browse/THRIFT-4489
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.11.0
>Reporter: Daniel Shih
>Assignee: James E. King, III
>Priority: Major
>
> I would like to use Unix domain sockets for NodeJS client,
> Here is the proposed PR: https://github.com/apache/thrift/pull/1491



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


[GitHub] thrift issue #1491: THRIFT-4489: Add UDS support for nodejs thrift client

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1491
  
Looks good, will merge in the morning.


---


[jira] [Commented] (THRIFT-4525) Add ssl socket option to ruby cross tests

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4525:


GitHub user jeking3 opened a pull request:

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

THRIFT-4525: add ruby cross test ssl support



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

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

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

https://github.com/apache/thrift/pull/1514.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1514






> Add ssl socket option to ruby cross tests
> -
>
> Key: THRIFT-4525
> URL: https://issues.apache.org/jira/browse/THRIFT-4525
> Project: Thrift
>  Issue Type: Improvement
>  Components: Ruby - Library
>Affects Versions: 0.11.0
> Environment: ubuntu-artful
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
>
> There are no ssl based ruby cross tests.



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


[GitHub] thrift pull request #1514: THRIFT-4525: add ruby cross test ssl support

2018-03-20 Thread jeking3
GitHub user jeking3 opened a pull request:

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

THRIFT-4525: add ruby cross test ssl support



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

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

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

https://github.com/apache/thrift/pull/1514.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1514






---


[jira] [Commented] (THRIFT-4358) Add unix domain sockets in ruby to cross test - code exists

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4358:


Github user asfgit closed the pull request at:

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


> Add unix domain sockets in ruby to cross test - code exists
> ---
>
> Key: THRIFT-4358
> URL: https://issues.apache.org/jira/browse/THRIFT-4358
> Project: Thrift
>  Issue Type: Test
>  Components: Test Suite
>Affects Versions: 0.10.0
> Environment: docker ubuntu-xenial; autoconf
>Reporter: James E. King, III
>Priority: Minor
>
> I see a unix domain socket class in the ruby transport directory but no cross 
> test enabled for it.



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


[GitHub] thrift pull request #1513: THRIFT-4358: add unix domain socket option to rub...

2018-03-20 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[jira] [Commented] (THRIFT-4489) Unix domain socket support for NodeJS client

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4489:


Github user danielhtshih commented on the issue:

https://github.com/apache/thrift/pull/1491
  
@jeking3 here is the single commit 
https://github.com/danielhtshih/thrift/commit/9c560daf52fcd89c212451f0793973af17f6cc55
 from THRIFT-4489-squashed

Thanks.


> Unix domain socket support for NodeJS client
> 
>
> Key: THRIFT-4489
> URL: https://issues.apache.org/jira/browse/THRIFT-4489
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.11.0
>Reporter: Daniel Shih
>Assignee: James E. King, III
>Priority: Major
>
> I would like to use Unix domain sockets for NodeJS client,
> Here is the proposed PR: https://github.com/apache/thrift/pull/1491



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


[GitHub] thrift issue #1491: THRIFT-4489: Add UDS support for nodejs thrift client

2018-03-20 Thread danielhtshih
Github user danielhtshih commented on the issue:

https://github.com/apache/thrift/pull/1491
  
@jeking3 here is the single commit 
https://github.com/danielhtshih/thrift/commit/9c560daf52fcd89c212451f0793973af17f6cc55
 from THRIFT-4489-squashed

Thanks.


---


[jira] [Created] (THRIFT-4526) Implement rubocop for ruby in the sca build, once clean into every make

2018-03-20 Thread James E. King, III (JIRA)
James E. King, III created THRIFT-4526:
--

 Summary: Implement rubocop for ruby in the sca build, once clean 
into every make
 Key: THRIFT-4526
 URL: https://issues.apache.org/jira/browse/THRIFT-4526
 Project: Thrift
  Issue Type: Improvement
  Components: Ruby - Library
Affects Versions: 0.11.0
 Environment: ubuntu-artful

gem install rubocop

cd lib/rs

rubocop
Reporter: James E. King, III


[https://github.com/bbatsov/rubocop]

Will find a lot of good things to fix.



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


[jira] [Commented] (THRIFT-4524) .NET Core Server doesn't close properly when cancelled

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4524:


Github user asfgit closed the pull request at:

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


> .NET Core Server doesn't close properly when cancelled
> --
>
> Key: THRIFT-4524
> URL: https://issues.apache.org/jira/browse/THRIFT-4524
> Project: Thrift
>  Issue Type: Bug
>  Components: .NETCore - Library
>Affects Versions: 0.11.0
> Environment: Windows 10 Surface Pro 4. Xamarin.Forms app.  .NET 
> Standard 2.0 libraries.
>Reporter: Stephen Starkie
>Assignee: James E. King, III
>Priority: Major
> Fix For: 0.12.0
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> My code starts a server with a cancellation token and then later stops it by 
> triggering the token.  When it does, the server fails to close cleanly and my 
> code cannot then start another server on the same port.  The problem is that 
> the Task which is responsible for opening and closing the connection in 
> AsyncBaseServer throws a TokenCancelationException in the Task.Delay call 
> which is not caught and therefore bombs out the task without closing the 
> socket.  I will raise a pull request with a fix.



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


[jira] [Resolved] (THRIFT-4524) .NET Core Server doesn't close properly when cancelled

2018-03-20 Thread James E. King, III (JIRA)

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

James E. King, III resolved THRIFT-4524.

   Resolution: Fixed
Fix Version/s: 0.12.0

> .NET Core Server doesn't close properly when cancelled
> --
>
> Key: THRIFT-4524
> URL: https://issues.apache.org/jira/browse/THRIFT-4524
> Project: Thrift
>  Issue Type: Bug
>  Components: .NETCore - Library
>Affects Versions: 0.11.0
> Environment: Windows 10 Surface Pro 4. Xamarin.Forms app.  .NET 
> Standard 2.0 libraries.
>Reporter: Stephen Starkie
>Assignee: James E. King, III
>Priority: Major
> Fix For: 0.12.0
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> My code starts a server with a cancellation token and then later stops it by 
> triggering the token.  When it does, the server fails to close cleanly and my 
> code cannot then start another server on the same port.  The problem is that 
> the Task which is responsible for opening and closing the connection in 
> AsyncBaseServer throws a TokenCancelationException in the Task.Delay call 
> which is not caught and therefore bombs out the task without closing the 
> socket.  I will raise a pull request with a fix.



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


[GitHub] thrift pull request #1512: Fix for THRIFT-4524

2018-03-20 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[jira] [Assigned] (THRIFT-4524) .NET Core Server doesn't close properly when cancelled

2018-03-20 Thread James E. King, III (JIRA)

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

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

Assignee: James E. King, III

> .NET Core Server doesn't close properly when cancelled
> --
>
> Key: THRIFT-4524
> URL: https://issues.apache.org/jira/browse/THRIFT-4524
> Project: Thrift
>  Issue Type: Bug
>  Components: .NETCore - Library
>Affects Versions: 0.11.0
> Environment: Windows 10 Surface Pro 4. Xamarin.Forms app.  .NET 
> Standard 2.0 libraries.
>Reporter: Stephen Starkie
>Assignee: James E. King, III
>Priority: Major
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> My code starts a server with a cancellation token and then later stops it by 
> triggering the token.  When it does, the server fails to close cleanly and my 
> code cannot then start another server on the same port.  The problem is that 
> the Task which is responsible for opening and closing the connection in 
> AsyncBaseServer throws a TokenCancelationException in the Task.Delay call 
> which is not caught and therefore bombs out the task without closing the 
> socket.  I will raise a pull request with a fix.



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


[jira] [Updated] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread James E. King, III (JIRA)

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

James E. King, III updated THRIFT-4476:
---
Component/s: Python - Compiler
 JavaScript - Compiler
 Erlang - Compiler
 C++ - Compiler

> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler, Erlang - Compiler, Java - Compiler, 
> JavaScript - Compiler, Python - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Assignee: James E. King, III
>Priority: Major
> Fix For: 0.12.0
>
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[GitHub] thrift issue #1269: THRIFT-4187 Allow dart framed transport to read incomple...

2018-03-20 Thread allengeorge
Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1269
  
@jeking3 Yup - just did that. Is there a way to do it automatically, or is 
it a manual process (for now)?


---


[jira] [Commented] (THRIFT-4187) Dart -> Rust Framed cross tests fail

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4187:


Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1269
  
@jeking3 Yup - just did that. Is there a way to do it automatically, or is 
it a manual process (for now)?


> Dart -> Rust Framed cross tests fail
> 
>
> Key: THRIFT-4187
> URL: https://issues.apache.org/jira/browse/THRIFT-4187
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
> Fix For: 0.12.0
>
>
> For some reason the Dart (client) -> Rust (server) framed-transport cross 
> tests fail. Initial investigation shows that *somehow* the dart client think 
> the socket was closed, which means it doesn't read the message from the 
> underlying transport.



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


[jira] [Resolved] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread James E. King, III (JIRA)

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

James E. King, III resolved THRIFT-4476.

   Resolution: Fixed
 Assignee: James E. King, III
Fix Version/s: 0.12.0

Committed - thanks.

> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Assignee: James E. King, III
>Priority: Major
> Fix For: 0.12.0
>
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[jira] [Resolved] (THRIFT-4187) Dart -> Rust Framed cross tests fail

2018-03-20 Thread Allen George (JIRA)

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

Allen George resolved THRIFT-4187.
--
   Resolution: Fixed
Fix Version/s: 0.12.0

Fixed as of b4960838a3b20e6bcf61727f21214a47418a2ca5

> Dart -> Rust Framed cross tests fail
> 
>
> Key: THRIFT-4187
> URL: https://issues.apache.org/jira/browse/THRIFT-4187
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
> Fix For: 0.12.0
>
>
> For some reason the Dart (client) -> Rust (server) framed-transport cross 
> tests fail. Initial investigation shows that *somehow* the dart client think 
> the socket was closed, which means it doesn't read the message from the 
> underlying transport.



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


[jira] [Commented] (THRIFT-4187) Dart -> Rust Framed cross tests fail

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4187:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1269
  
Remember to resolve https://issues.apache.org/jira/browse/THRIFT-4187 as 
fixed in 0.12.0.


> Dart -> Rust Framed cross tests fail
> 
>
> Key: THRIFT-4187
> URL: https://issues.apache.org/jira/browse/THRIFT-4187
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
> Fix For: 0.12.0
>
>
> For some reason the Dart (client) -> Rust (server) framed-transport cross 
> tests fail. Initial investigation shows that *somehow* the dart client think 
> the socket was closed, which means it doesn't read the message from the 
> underlying transport.



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


[GitHub] thrift issue #1269: THRIFT-4187 Allow dart framed transport to read incomple...

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1269
  
Remember to resolve https://issues.apache.org/jira/browse/THRIFT-4187 as 
fixed in 0.12.0.


---


[jira] [Commented] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4476:


Github user asfgit closed the pull request at:

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


> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Priority: Major
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[GitHub] thrift pull request #1511: THRIFT-4476: Typecasting problem on double list i...

2018-03-20 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] thrift pull request #1269: THRIFT-4187 Allow dart framed transport to read i...

2018-03-20 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[jira] [Commented] (THRIFT-4187) Dart -> Rust Framed cross tests fail

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4187:


Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1269
  
No problem! I'm sorry I was lax and left it so long :/

Looks like the tests passed, so it's good to merge. Not 100% of the 
process, so I'll follow up via email.


> Dart -> Rust Framed cross tests fail
> 
>
> Key: THRIFT-4187
> URL: https://issues.apache.org/jira/browse/THRIFT-4187
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
>
> For some reason the Dart (client) -> Rust (server) framed-transport cross 
> tests fail. Initial investigation shows that *somehow* the dart client think 
> the socket was closed, which means it doesn't read the message from the 
> underlying transport.



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


[GitHub] thrift issue #1269: THRIFT-4187 Allow dart framed transport to read incomple...

2018-03-20 Thread allengeorge
Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1269
  
No problem! I'm sorry I was lax and left it so long :/

Looks like the tests passed, so it's good to merge. Not 100% of the 
process, so I'll follow up via email.


---


[jira] [Commented] (THRIFT-4489) Unix domain socket support for NodeJS client

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4489:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1491
  
This squash was not done properly.  It includes all of the master commits 
in it.

You want to start with an updated master:

git checkout master
git pull

Then you want to branch:
git checkout -b THRIFT-4489-squashed

Then you want to merge with squash, pulling anything in uds-nodejs over to 
THRIFT-4489-squashed
git merge --squash uds-nodejs

Then commit and add your description for your changes.
Then push that branch and let me know when it is in your fork, and I will 
pull it and merge it.  No need to update this PR or open a new one.



> Unix domain socket support for NodeJS client
> 
>
> Key: THRIFT-4489
> URL: https://issues.apache.org/jira/browse/THRIFT-4489
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.11.0
>Reporter: Daniel Shih
>Assignee: James E. King, III
>Priority: Major
>
> I would like to use Unix domain sockets for NodeJS client,
> Here is the proposed PR: https://github.com/apache/thrift/pull/1491



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


[GitHub] thrift issue #1491: THRIFT-4489: Add UDS support for nodejs thrift client

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1491
  
This squash was not done properly.  It includes all of the master commits 
in it.

You want to start with an updated master:

git checkout master
git pull

Then you want to branch:
git checkout -b THRIFT-4489-squashed

Then you want to merge with squash, pulling anything in uds-nodejs over to 
THRIFT-4489-squashed
git merge --squash uds-nodejs

Then commit and add your description for your changes.
Then push that branch and let me know when it is in your fork, and I will 
pull it and merge it.  No need to update this PR or open a new one.



---


[jira] [Created] (THRIFT-4525) Add ssl socket option to ruby cross tests

2018-03-20 Thread James E. King, III (JIRA)
James E. King, III created THRIFT-4525:
--

 Summary: Add ssl socket option to ruby cross tests
 Key: THRIFT-4525
 URL: https://issues.apache.org/jira/browse/THRIFT-4525
 Project: Thrift
  Issue Type: Improvement
  Components: Ruby - Library
Affects Versions: 0.11.0
 Environment: ubuntu-artful
Reporter: James E. King, III
Assignee: James E. King, III


There are no ssl based ruby cross tests.



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


[jira] [Commented] (THRIFT-4358) Add unix domain sockets in ruby to cross test - code exists

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4358:


GitHub user jeking3 opened a pull request:

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

THRIFT-4358: add unix domain socket option to ruby cross tests

This is the first time I've tried to use ruby with any seriousness.  I like 
the unit test framework (rspec) -
 very descriptive and the mocking is so damn easy compared to C++.  

In addition to adding domain socket support to the test harness for client 
and server (there was already an implementation in the library), the ruby test 
server has a new line of code that's neat:

puts "Starting TestServer #{@server.to_s}"

which turns into, for example:

Starting TestServer 
threaded(server(binary(buffered(domain(/tmp/ThriftTest.thrift.57621)

or for a socket test:

Starting TestServer threaded(server(compact(framed(socket(:36653)


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

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

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

https://github.com/apache/thrift/pull/1513.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1513


commit 971719d13e84aac03037b4afae4c7916661ee371
Author: James E. King III 
Date:   2018-03-20T19:06:08Z

THRIFT-4358: add unix domain socket option to ruby cross tests




> Add unix domain sockets in ruby to cross test - code exists
> ---
>
> Key: THRIFT-4358
> URL: https://issues.apache.org/jira/browse/THRIFT-4358
> Project: Thrift
>  Issue Type: Test
>  Components: Test Suite
>Affects Versions: 0.10.0
> Environment: docker ubuntu-xenial; autoconf
>Reporter: James E. King, III
>Priority: Minor
>
> I see a unix domain socket class in the ruby transport directory but no cross 
> test enabled for it.



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


[GitHub] thrift pull request #1513: THRIFT-4358: add unix domain socket option to rub...

2018-03-20 Thread jeking3
GitHub user jeking3 opened a pull request:

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

THRIFT-4358: add unix domain socket option to ruby cross tests

This is the first time I've tried to use ruby with any seriousness.  I like 
the unit test framework (rspec) -
 very descriptive and the mocking is so damn easy compared to C++.  

In addition to adding domain socket support to the test harness for client 
and server (there was already an implementation in the library), the ruby test 
server has a new line of code that's neat:

puts "Starting TestServer #{@server.to_s}"

which turns into, for example:

Starting TestServer 
threaded(server(binary(buffered(domain(/tmp/ThriftTest.thrift.57621)

or for a socket test:

Starting TestServer threaded(server(compact(framed(socket(:36653)


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

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

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

https://github.com/apache/thrift/pull/1513.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1513


commit 971719d13e84aac03037b4afae4c7916661ee371
Author: James E. King III 
Date:   2018-03-20T19:06:08Z

THRIFT-4358: add unix domain socket option to ruby cross tests




---


[jira] [Commented] (THRIFT-4524) .NET Core Server doesn't close properly when cancelled

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4524:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1512
  
Build failures appear unrelated to the change.


> .NET Core Server doesn't close properly when cancelled
> --
>
> Key: THRIFT-4524
> URL: https://issues.apache.org/jira/browse/THRIFT-4524
> Project: Thrift
>  Issue Type: Bug
>  Components: .NETCore - Library
>Affects Versions: 0.11.0
> Environment: Windows 10 Surface Pro 4. Xamarin.Forms app.  .NET 
> Standard 2.0 libraries.
>Reporter: Stephen Starkie
>Priority: Major
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> My code starts a server with a cancellation token and then later stops it by 
> triggering the token.  When it does, the server fails to close cleanly and my 
> code cannot then start another server on the same port.  The problem is that 
> the Task which is responsible for opening and closing the connection in 
> AsyncBaseServer throws a TokenCancelationException in the Task.Delay call 
> which is not caught and therefore bombs out the task without closing the 
> socket.  I will raise a pull request with a fix.



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


[GitHub] thrift issue #1512: Fix for THRIFT-4524

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1512
  
Build failures appear unrelated to the change.


---


[jira] [Commented] (THRIFT-4187) Dart -> Rust Framed cross tests fail

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4187:


Github user markerickson-wf commented on the issue:

https://github.com/apache/thrift/pull/1269
  
+1


> Dart -> Rust Framed cross tests fail
> 
>
> Key: THRIFT-4187
> URL: https://issues.apache.org/jira/browse/THRIFT-4187
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
>
> For some reason the Dart (client) -> Rust (server) framed-transport cross 
> tests fail. Initial investigation shows that *somehow* the dart client think 
> the socket was closed, which means it doesn't read the message from the 
> underlying transport.



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


[GitHub] thrift issue #1269: THRIFT-4187 Allow dart framed transport to read incomple...

2018-03-20 Thread markerickson-wf
Github user markerickson-wf commented on the issue:

https://github.com/apache/thrift/pull/1269
  
+1


---


[jira] [Commented] (THRIFT-4489) Unix domain socket support for NodeJS client

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4489:


Github user danielhtshih commented on the issue:

https://github.com/apache/thrift/pull/1491
  
@jeking3 please use this single commit 
https://github.com/apache/thrift/pull/1491/commits/041f91dd6042b98c5bbd0846f5e6ed7fb6fd4bf1

Thanks.


> Unix domain socket support for NodeJS client
> 
>
> Key: THRIFT-4489
> URL: https://issues.apache.org/jira/browse/THRIFT-4489
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.11.0
>Reporter: Daniel Shih
>Assignee: James E. King, III
>Priority: Major
>
> I would like to use Unix domain sockets for NodeJS client,
> Here is the proposed PR: https://github.com/apache/thrift/pull/1491



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


[GitHub] thrift issue #1491: THRIFT-4489: Add UDS support for nodejs thrift client

2018-03-20 Thread danielhtshih
Github user danielhtshih commented on the issue:

https://github.com/apache/thrift/pull/1491
  
@jeking3 please use this single commit 
https://github.com/apache/thrift/pull/1491/commits/041f91dd6042b98c5bbd0846f5e6ed7fb6fd4bf1

Thanks.


---


[jira] [Commented] (THRIFT-4524) .NET Core Server doesn't close properly when cancelled

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4524:


GitHub user stephenstarkie opened a pull request:

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

Fix for THRIFT-4524

Also fixed up the project files to include quoted Program Files paths

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

$ git pull https://github.com/stephenstarkie/thrift THRIFT-4524

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

https://github.com/apache/thrift/pull/1512.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1512


commit 0cf5f5abe7fdb8e901918806f4af26a8bf581568
Author: Stephen Starkie 
Date:   2018-03-20T13:28:40Z

Fix for THRIFT-4524
Also fixed up the project files to include quoted Program Files paths




> .NET Core Server doesn't close properly when cancelled
> --
>
> Key: THRIFT-4524
> URL: https://issues.apache.org/jira/browse/THRIFT-4524
> Project: Thrift
>  Issue Type: Bug
>  Components: .NETCore - Library
>Affects Versions: 0.11.0
> Environment: Windows 10 Surface Pro 4. Xamarin.Forms app.  .NET 
> Standard 2.0 libraries.
>Reporter: Stephen Starkie
>Priority: Major
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> My code starts a server with a cancellation token and then later stops it by 
> triggering the token.  When it does, the server fails to close cleanly and my 
> code cannot then start another server on the same port.  The problem is that 
> the Task which is responsible for opening and closing the connection in 
> AsyncBaseServer throws a TokenCancelationException in the Task.Delay call 
> which is not caught and therefore bombs out the task without closing the 
> socket.  I will raise a pull request with a fix.



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


[GitHub] thrift pull request #1512: Fix for THRIFT-4524

2018-03-20 Thread stephenstarkie
GitHub user stephenstarkie opened a pull request:

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

Fix for THRIFT-4524

Also fixed up the project files to include quoted Program Files paths

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

$ git pull https://github.com/stephenstarkie/thrift THRIFT-4524

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

https://github.com/apache/thrift/pull/1512.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1512


commit 0cf5f5abe7fdb8e901918806f4af26a8bf581568
Author: Stephen Starkie 
Date:   2018-03-20T13:28:40Z

Fix for THRIFT-4524
Also fixed up the project files to include quoted Program Files paths




---


[jira] [Updated] (THRIFT-4514) Remove pthread library support and use std::thread or boost::thread

2018-03-20 Thread James E. King, III (JIRA)

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

James E. King, III updated THRIFT-4514:
---
Description: 
We have a pretty awful thread class implementation:

1. The build system compiles in the right files to implement the class 
definition.
 2. We support three thread libraries.

I want to simplify this, tremendously, to:

A. Remove the pthread implementation.
 B. Dynamically select the thread class the same way we select which smart_ptr 
to use (in stdcxx, if you're curious).
 C. Have one thread class implementation.
 D. Remove the WITH_STDTHREADS build time option as it will no longer be 
necessary.
 E. Continue to allow someone to force use of boost threads even in C++11 if 
they really want to.

In short:
 * Support std::thread for C++11 or later, unless overridden to use boost
 * Support boost::thread for C++98
 * Drop support for native pthreads

We have a lot of branches and test conditionals that do special things with 
different thread implementations. We need to simplify and move forward to 
reduce the maintenance cost in this area.

Any objections?

  was:
We have a pretty awful thread class implementation:

1. The build system compiles in the right files to implement the class 
definition.
2. We support three thread libraries.

I want to simplify this, tremendously, to:

A. Remove the pthread implementation.
B. Dynamically select the thread class the same way we select which smart_ptr 
to use (in stdcxx, if you're curious).
C. Have one thread class implementation.
D. Remove the WITH_STDTHREADS build time option as it will no longer be 
necessary.
E. Continue to allow someone to force use of boost threads even in C++11 if 
they really want to.

In short:

* Support std::thread for C++11 or later
* Support boost::thread for C++98
* Drop support for native pthreads

We have a lot of branches and test conditionals that do special things with 
different thread implementations.  We need to simplify and move forward.

Any objections?


> Remove pthread library support and use std::thread or boost::thread
> ---
>
> Key: THRIFT-4514
> URL: https://issues.apache.org/jira/browse/THRIFT-4514
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.11.0
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Major
>
> We have a pretty awful thread class implementation:
> 1. The build system compiles in the right files to implement the class 
> definition.
>  2. We support three thread libraries.
> I want to simplify this, tremendously, to:
> A. Remove the pthread implementation.
>  B. Dynamically select the thread class the same way we select which 
> smart_ptr to use (in stdcxx, if you're curious).
>  C. Have one thread class implementation.
>  D. Remove the WITH_STDTHREADS build time option as it will no longer be 
> necessary.
>  E. Continue to allow someone to force use of boost threads even in C++11 if 
> they really want to.
> In short:
>  * Support std::thread for C++11 or later, unless overridden to use boost
>  * Support boost::thread for C++98
>  * Drop support for native pthreads
> We have a lot of branches and test conditionals that do special things with 
> different thread implementations. We need to simplify and move forward to 
> reduce the maintenance cost in this area.
> Any objections?



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


[jira] [Commented] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4476:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1511
  
Thanks for the squash.  We'll get this merged.


> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Priority: Major
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[GitHub] thrift issue #1511: THRIFT-4476: Typecasting problem on double list items, e...

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1511
  
Thanks for the squash.  We'll get this merged.


---


[jira] [Commented] (THRIFT-3773) Swift Library

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3773:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1084
  
Okay, so I could merge this, but I need to know (since I've never used 
cocoa, swift, or any of the apple stuff really):

* Are there breaking changes?
* Are they documented?
* Is it already running in the cross test or is that future work?
* Can this be exercised in the Travis CI build environment? (make check, 
make cross?)
* Can I add swift support to Ubuntu Xenial and Artful?
* What minimum and maximum versions are known supported?
* Has the LANGUAGES.md file been updated?
* Has the build/docker/README.md file been updated?
* Is this supposed to replace the cocoa implementation?  Should that be 
removed?

I can make some of these changes as part of finalization.  Thanks.


> Swift Library
> -
>
> Key: THRIFT-3773
> URL: https://issues.apache.org/jira/browse/THRIFT-3773
> Project: Thrift
>  Issue Type: New Feature
>  Components: Swift - Library
>Reporter: Thomas Bartelmess
>Assignee: Chris Simpson
>Priority: Major
>
> We already have the option to generate Swift code in the Cocoa compiler, 
> however large parts of the (Objective-C) Cocoa Library still depend on Cocoa 
> and  Objective-C.
> It would be good to have a native Swift library that doesn't depend on the 
> Cocoa libraries.
> Design goals:
> - Fully compatible with the code that is currently generated by the Cocoa 
> compiler (both Objective-C and Swift).
> - Ability to run on Linux
> - Pure Swift, no Objective-C code.
> - No dependencies on closed source apple libraries
> - Keep the same interface, so that the library is compatible with the code 
> the current cocoa compiler generates
> - Better server support that the current Objective-C library.
> - Follow the new Swift packaging format to be compatible with the Swift 
> Package manager



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


[GitHub] thrift issue #1084: THRIFT-3773 Swift 3 Native Library

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1084
  
Okay, so I could merge this, but I need to know (since I've never used 
cocoa, swift, or any of the apple stuff really):

* Are there breaking changes?
* Are they documented?
* Is it already running in the cross test or is that future work?
* Can this be exercised in the Travis CI build environment? (make check, 
make cross?)
* Can I add swift support to Ubuntu Xenial and Artful?
* What minimum and maximum versions are known supported?
* Has the LANGUAGES.md file been updated?
* Has the build/docker/README.md file been updated?
* Is this supposed to replace the cocoa implementation?  Should that be 
removed?

I can make some of these changes as part of finalization.  Thanks.


---


[jira] [Commented] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4476:


GitHub user ozymaxx opened a pull request:

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

THRIFT-4476: Typecasting problem on double list items, emitting doubles 
with high precision (for Java, C++, Python, JS and Erlang)

All commits have been squashed into one
see the related issue: https://issues.apache.org/jira/browse/THRIFT-4476

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

$ git pull https://github.com/ozymaxx/thrift THRIFT-4476-squashed

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

https://github.com/apache/thrift/pull/1511.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1511






> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Priority: Major
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[GitHub] thrift pull request #1511: THRIFT-4476: Typecasting problem on double list i...

2018-03-20 Thread ozymaxx
GitHub user ozymaxx opened a pull request:

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

THRIFT-4476: Typecasting problem on double list items, emitting doubles 
with high precision (for Java, C++, Python, JS and Erlang)

All commits have been squashed into one
see the related issue: https://issues.apache.org/jira/browse/THRIFT-4476

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

$ git pull https://github.com/ozymaxx/thrift THRIFT-4476-squashed

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

https://github.com/apache/thrift/pull/1511.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1511






---


[jira] [Commented] (THRIFT-3770) Support Python 3.4+ asyncio support

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3770:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/972
  
@jfarrell please close this; the author indicated no interest in finishing 
the work due to the team's past inaction on pull request management. 


> Support Python 3.4+ asyncio support
> ---
>
> Key: THRIFT-3770
> URL: https://issues.apache.org/jira/browse/THRIFT-3770
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Compiler, Python - Library
>Affects Versions: 1.0
>Reporter: Vadim Markovtsev
>Priority: Minor
>  Labels: features
>
> Currently, Tornado and Twisted async engines are supported in client lib and 
> the compiler. asyncio is a relatively new engine which is included into 
> Python 3.4+ standard library. It is gaining popularity fast.



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


[GitHub] thrift issue #972: THRIFT-3770 Implement Python 3.4+ asyncio support

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/972
  
@jfarrell please close this; the author indicated no interest in finishing 
the work due to the team's past inaction on pull request management. 


---


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

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3560:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/798
  
I am okay making this change for 0.12.0; if you can rebase, squash, and fix 
up the issues and force push, and if there are any other methods that need the 
same const correctness, let's do those too.


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


[GitHub] thrift issue #798: THRIFT-3560: C++: declared TTransport::isOpen() and TTran...

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/798
  
I am okay making this change for 0.12.0; if you can rebase, squash, and fix 
up the issues and force push, and if there are any other methods that need the 
same const correctness, let's do those too.


---


[jira] [Commented] (THRIFT-2790) thrift -gen all => an option to generate all languages and features

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2790:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/782
  
Should this be moved forward or closed?


> thrift -gen all => an option to generate all languages and features
> ---
>
> Key: THRIFT-2790
> URL: https://issues.apache.org/jira/browse/THRIFT-2790
> Project: Thrift
>  Issue Type: Improvement
>  Components: Compiler (General), Documentation, Test Suite
>Reporter: Roger Meier
>Priority: Major
> Attachments: 
> 0001-THRIFT-2790-gen-all-option-to-easily-test-compatibil.patch, 
> generate-all-languages.bat
>
>
> I would like to have a *thrift -gen all* option to generate everything we 
> have in one step. This would allow proper testing of all compiler changes by 
> using  test/ThriftTest.thrift. An optional make check target could compare 
> different versions based on their git hash or to previous gen-all.backup 
> folder.
> Suggested-by: Roger Meier 



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


[GitHub] thrift issue #782: THRIFT-2790 thrift -gen all => an option to generate all ...

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/782
  
Should this be moved forward or closed?


---


[GitHub] thrift issue #744: update TSocket.php

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/744
  
@lihanharry please move this forward or it will eventually be closed due to 
inactivity. @RobberPhex any concerns with this code?


---


[jira] [Commented] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4476:


Github user ozymaxx closed the pull request at:

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


> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Priority: Major
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[jira] [Commented] (THRIFT-4187) Dart -> Rust Framed cross tests fail

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4187:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1269
  
I'd suggest waiting to see how the CI build fares given a change was made.  
So today is a distinct possibility.  Also, you can commit your own changes.  
There's no rule against it. :)


> Dart -> Rust Framed cross tests fail
> 
>
> Key: THRIFT-4187
> URL: https://issues.apache.org/jira/browse/THRIFT-4187
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
>
> For some reason the Dart (client) -> Rust (server) framed-transport cross 
> tests fail. Initial investigation shows that *somehow* the dart client think 
> the socket was closed, which means it doesn't read the message from the 
> underlying transport.



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


[GitHub] thrift pull request #1510: THRIFT-4476: Typecasting problem on floating-poin...

2018-03-20 Thread ozymaxx
Github user ozymaxx closed the pull request at:

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


---


[GitHub] thrift issue #1269: THRIFT-4187 Allow dart framed transport to read incomple...

2018-03-20 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1269
  
I'd suggest waiting to see how the CI build fares given a change was made.  
So today is a distinct possibility.  Also, you can commit your own changes.  
There's no rule against it. :)


---


[jira] [Commented] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4476:


Github user ozymaxx commented on the issue:

https://github.com/apache/thrift/pull/1510
  
@jeking3 I squashed all into one commit and opened another branch (I had 
some problems while changing the history)


> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Priority: Major
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[GitHub] thrift issue #1510: THRIFT-4476: Typecasting problem on floating-point list ...

2018-03-20 Thread ozymaxx
Github user ozymaxx commented on the issue:

https://github.com/apache/thrift/pull/1510
  
@jeking3 I squashed all into one commit and opened another branch (I had 
some problems while changing the history)


---


[jira] [Commented] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4476:


Github user ozymaxx closed the pull request at:

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


> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Priority: Major
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[GitHub] thrift pull request #1496: THRIFT-4476: Typecasting problem on list items (+...

2018-03-20 Thread ozymaxx
Github user ozymaxx closed the pull request at:

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


---


[jira] [Commented] (THRIFT-4476) Typecasting problem on list items

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4476:


GitHub user ozymaxx opened a pull request:

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

THRIFT-4476: Typecasting problem on floating-point list items, emitting 
doubles with high precision in Python, JS, Java, C++ and Erlang

Squashed version
see the related issue: https://issues.apache.org/jira/browse/THRIFT-4476

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

$ git pull https://github.com/ozymaxx/thrift THRIFT-4476-squashed

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

https://github.com/apache/thrift/pull/1510.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1510


commit 744230485d3c6c4739f33f8984378a61a7bb030f
Author: Ozan Can Altiok 
Date:   2018-03-20T11:41:27Z

THRIFT-4476: Emitting doubles with high precision in Python, JS, Java, C++ 
and Erlang




> Typecasting problem on list items
> -
>
> Key: THRIFT-4476
> URL: https://issues.apache.org/jira/browse/THRIFT-4476
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Compiler
>Affects Versions: 0.11.0
>Reporter: Ozan Can Altiok
>Priority: Major
>
> I was trying to add the following into a thrift interface file.
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> With the definition given above the {{.thrift}} file compiled properly. 
> However, I noticed that in Python, the items in {{timeCoefficients}} are 
> considered to be integer although the list has been defined to include items 
> of {{double}} type. Then I modified the definition as given below to make 
> sure all the items are of type {{double}}. 
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> After the change, I ran into the following error during compilation.
> {{[ERROR] .../TimeCoefficients.java:[402,48] error: no suitable method found 
> for add(int)}}
>  {{[ERROR] method Collection.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
>  {{[ERROR] method List.add(Double) is not applicable}}
>  {{[ERROR] (argument mismatch; int cannot be converted to Double)}}
> Next, I changed the line as follows and the compilation became successful.
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> When I reviewed the generated Java source files, I discovered that
> {{const list timeCoefficients = [24, 60, 60, 1000, 1000, 1000]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add((double)24);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)60);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
>  {{  timeCoefficients.add((double)1000);}}
> {{}}}
> whilst
> {{const list timeCoefficients = [24.0, 60.0, 60.0, 1000.0, 1000.0, 
> 1000.0]}}
> compiles to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(60);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{  timeCoefficients.add(1000);}}
> {{}}}
> which leads to an error.
> When I modified this line as follows
> {{const list timeCoefficients = [24.1, 60.1, 60.1, 1000.1, 1000.1, 
> 1000.1]}}
> this line compiled to
> {{public static final java.util.List timeCoefficients = new 
> java.util.ArrayList();}}
> {{static {}}
> {{  timeCoefficients.add(24.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(60.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{  timeCoefficients.add(1000.1);}}
> {{}}}
> My guess is that, even if I put {{.0}} at the end of each numeric constant, 
> on the Java side, Thrift compiler considers them to be {{double}} and does no 
> typecasts. However, the {{.0}} s are getting lost somewhere and the items 
> become integers in the generated Java code. Thus, when it comes to populating 
> the array, Java cannot succeed. {{Double}} s cannot be unboxed to integer and 
> Java thinks {{int}} and {{Double}} are not related.



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


[GitHub] thrift pull request #1510: THRIFT-4476: Typecasting problem on floating-poin...

2018-03-20 Thread ozymaxx
GitHub user ozymaxx opened a pull request:

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

THRIFT-4476: Typecasting problem on floating-point list items, emitting 
doubles with high precision in Python, JS, Java, C++ and Erlang

Squashed version
see the related issue: https://issues.apache.org/jira/browse/THRIFT-4476

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

$ git pull https://github.com/ozymaxx/thrift THRIFT-4476-squashed

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

https://github.com/apache/thrift/pull/1510.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1510


commit 744230485d3c6c4739f33f8984378a61a7bb030f
Author: Ozan Can Altiok 
Date:   2018-03-20T11:41:27Z

THRIFT-4476: Emitting doubles with high precision in Python, JS, Java, C++ 
and Erlang




---


[jira] [Commented] (THRIFT-4187) Dart -> Rust Framed cross tests fail

2018-03-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4187:


Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1269
  
@jeking3 Any chance this could be merged? TY!


> Dart -> Rust Framed cross tests fail
> 
>
> Key: THRIFT-4187
> URL: https://issues.apache.org/jira/browse/THRIFT-4187
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
>
> For some reason the Dart (client) -> Rust (server) framed-transport cross 
> tests fail. Initial investigation shows that *somehow* the dart client think 
> the socket was closed, which means it doesn't read the message from the 
> underlying transport.



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


[GitHub] thrift issue #1269: THRIFT-4187 Allow dart framed transport to read incomple...

2018-03-20 Thread allengeorge
Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1269
  
@jeking3 Any chance this could be merged? TY!


---


[jira] [Created] (THRIFT-4524) .NET Core Server doesn't close properly when cancelled

2018-03-20 Thread Stephen Starkie (JIRA)
Stephen Starkie created THRIFT-4524:
---

 Summary: .NET Core Server doesn't close properly when cancelled
 Key: THRIFT-4524
 URL: https://issues.apache.org/jira/browse/THRIFT-4524
 Project: Thrift
  Issue Type: Bug
  Components: .NETCore - Library
Affects Versions: 0.11.0
 Environment: Windows 10 Surface Pro 4. Xamarin.Forms app.  .NET 
Standard 2.0 libraries.
Reporter: Stephen Starkie


My code starts a server with a cancellation token and then later stops it by 
triggering the token.  When it does, the server fails to close cleanly and my 
code cannot then start another server on the same port.  The problem is that 
the Task which is responsible for opening and closing the connection in 
AsyncBaseServer throws a TokenCancelationException in the Task.Delay call which 
is not caught and therefore bombs out the task without closing the socket.  I 
will raise a pull request with a fix.



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