[jira] [Commented] (THRIFT-4436) Deserialization of nested list discards content

2018-01-02 Thread Philip Frank (JIRA)

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

Philip Frank commented on THRIFT-4436:
--

I expanded the test cases to cover this issue in 
https://github.com/bananer/thrift/tree/THRIFT-4436

Resuling failure:


{code}
Running "qunit:ThriftDeepConstructor" (qunit) task
Testing http://localhost:8088/test-deep-constructor.html .F...
>> Serialize/deserialize should return equal object
>> Message: null
>> Actual: {
>>   "list_of_list_field": [
>> [
>>   "one",
>>   "two"
>> ],
>> [],
>> []
>>   ],
…
>> Expected: {
>>   "list_of_list_field": [
>> [
>>   "one",
>>   "two"
>> ],
>> [
>>   "three",
>>   "four"
>> ],
>> [
>>   "five",
>>   "six"
>> ]
>>   ],
…
{code}


> Deserialization of nested list discards content
> ---
>
> Key: THRIFT-4436
> URL: https://issues.apache.org/jira/browse/THRIFT-4436
> Project: Thrift
>  Issue Type: Bug
>  Components: JavaScript - Library
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Philip Frank
>
> I'm trying to transmit a list of lists, like this:
> {code}
> service HelloSvc {
>   list> test()
> }
> {code}
> Using XHR Transport and JSON Protocol, with a service implementation in 
> Python like this:
> {code}
> class HelloSvcHandler:
> def __init__(self):
> pass
> def test(self,):
> return [
> ["s1", "s2"],
> ["s3", "s4"],
> ["s5"]
> ]
> {code}
> The serialized response looks good to me (seen in browser development tools):
> {code}
> [1,"test",2,0,{"0":{"lst":["lst",3,["str",2,"s1","s2"],["str",2,"s3","s4"],["str",1,"s5"]]}}]
> {code}
> However, when deserialized to JavaScript, the result looks like this:
> {code}
> [["s1","s2"],[],[]]
> {code}
> I would expect it to look like this:
> {code}
> [["s1","s2"],["s3","s4"],["s5"]]
> {code}
> It looks to me like during JSON deserialization, all but the first entry in 
> the list of lists lose their content.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1454: THRIFT-4436: port nodejs changes from THRIFT-3748...

2018-01-02 Thread bananer
GitHub user bananer opened a pull request:

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

THRIFT-4436: port nodejs changes from THRIFT-3748 to js lib,

test for serialization of nested list,
run all tests when building js lib

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

$ git pull https://github.com/bananer/thrift THRIFT-4436-pr

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

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


commit 305f27362e615f7752be8ae701dce85d8e2122ef
Author: Philip Frank 
Date:   2018-01-02T08:00:36Z

THRIFT-4436: port nodejs changes from THRIFT-3748 to js lib,
test for serialization of nested list,
run all tests when building js lib




---


[jira] [Commented] (THRIFT-4436) Deserialization of nested list discards content

2018-01-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4436:


GitHub user bananer opened a pull request:

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

THRIFT-4436: port nodejs changes from THRIFT-3748 to js lib,

test for serialization of nested list,
run all tests when building js lib

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

$ git pull https://github.com/bananer/thrift THRIFT-4436-pr

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

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


commit 305f27362e615f7752be8ae701dce85d8e2122ef
Author: Philip Frank 
Date:   2018-01-02T08:00:36Z

THRIFT-4436: port nodejs changes from THRIFT-3748 to js lib,
test for serialization of nested list,
run all tests when building js lib




> Deserialization of nested list discards content
> ---
>
> Key: THRIFT-4436
> URL: https://issues.apache.org/jira/browse/THRIFT-4436
> Project: Thrift
>  Issue Type: Bug
>  Components: JavaScript - Library
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Philip Frank
>
> I'm trying to transmit a list of lists, like this:
> {code}
> service HelloSvc {
>   list> test()
> }
> {code}
> Using XHR Transport and JSON Protocol, with a service implementation in 
> Python like this:
> {code}
> class HelloSvcHandler:
> def __init__(self):
> pass
> def test(self,):
> return [
> ["s1", "s2"],
> ["s3", "s4"],
> ["s5"]
> ]
> {code}
> The serialized response looks good to me (seen in browser development tools):
> {code}
> [1,"test",2,0,{"0":{"lst":["lst",3,["str",2,"s1","s2"],["str",2,"s3","s4"],["str",1,"s5"]]}}]
> {code}
> However, when deserialized to JavaScript, the result looks like this:
> {code}
> [["s1","s2"],[],[]]
> {code}
> I would expect it to look like this:
> {code}
> [["s1","s2"],["s3","s4"],["s5"]]
> {code}
> It looks to me like during JSON deserialization, all but the first entry in 
> the list of lists lose their content.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4436) Deserialization of nested list discards content

2018-01-02 Thread Philip Frank (JIRA)

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

Philip Frank commented on THRIFT-4436:
--

Turns out this was fixed for nodejs in THRIFT-3748 

I created a pull request that ports the change over and enables tests that 
cover it.

> Deserialization of nested list discards content
> ---
>
> Key: THRIFT-4436
> URL: https://issues.apache.org/jira/browse/THRIFT-4436
> Project: Thrift
>  Issue Type: Bug
>  Components: JavaScript - Library
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Philip Frank
>
> I'm trying to transmit a list of lists, like this:
> {code}
> service HelloSvc {
>   list> test()
> }
> {code}
> Using XHR Transport and JSON Protocol, with a service implementation in 
> Python like this:
> {code}
> class HelloSvcHandler:
> def __init__(self):
> pass
> def test(self,):
> return [
> ["s1", "s2"],
> ["s3", "s4"],
> ["s5"]
> ]
> {code}
> The serialized response looks good to me (seen in browser development tools):
> {code}
> [1,"test",2,0,{"0":{"lst":["lst",3,["str",2,"s1","s2"],["str",2,"s3","s4"],["str",1,"s5"]]}}]
> {code}
> However, when deserialized to JavaScript, the result looks like this:
> {code}
> [["s1","s2"],[],[]]
> {code}
> I would expect it to look like this:
> {code}
> [["s1","s2"],["s3","s4"],["s5"]]
> {code}
> It looks to me like during JSON deserialization, all but the first entry in 
> the list of lists lose their content.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1448: [WIP] Support compilation without Boost

2018-01-02 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1448#discussion_r159267705
  
--- Diff: lib/cpp/src/thrift/processor/TMultiplexedProcessor.h ---
@@ -165,10 +166,11 @@ class TMultiplexedProcessor : public TProcessor {
 }
 
 // Extract the service name
-boost::tokenizer > tok(name, 
boost::char_separator(":"));
-
 std::vector tokens;
-std::copy(tok.begin(), tok.end(), std::back_inserter(tokens));
+std::istringstream tokenStream(name);
+for (std::string token; std::getline(tokenStream, token, ':');) {
--- End diff --

std::getline is available also in pre-C++11 (though C++11 adds some 
overloads): http://en.cppreference.com/w/cpp/string/basic_string/getline

I would be OK with C++11, but this may not be applicable to all cases... 
Maybe a safer approach would be first allow use without boost (relying on 
C++11: i.e. this patch :-) ), then add C++11 requirement if this is acceptable.



---


[GitHub] thrift pull request #1455: THRIFT-4440: cleanup *.orig

2018-01-02 Thread RobberPhex
GitHub user RobberPhex opened a pull request:

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

THRIFT-4440: cleanup *.orig

It seems like `build/docker/ubuntu-trusty/Dockerfile.orig` is useless.

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

$ git pull https://github.com/RobberPhex/thrift cleanup

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

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


commit 18d422b2905f94352600bb765a388da0a3dc7a39
Author: Robert Lu 
Date:   2018-01-03T00:40:17Z

cleanup *.orig




---


[jira] [Commented] (THRIFT-4440) rm `build/docker/ubuntu-trusty/Dockerfile.orig`

2018-01-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4440:


GitHub user RobberPhex opened a pull request:

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

THRIFT-4440: cleanup *.orig

It seems like `build/docker/ubuntu-trusty/Dockerfile.orig` is useless.

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

$ git pull https://github.com/RobberPhex/thrift cleanup

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

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


commit 18d422b2905f94352600bb765a388da0a3dc7a39
Author: Robert Lu 
Date:   2018-01-03T00:40:17Z

cleanup *.orig




> rm `build/docker/ubuntu-trusty/Dockerfile.orig`
> ---
>
> Key: THRIFT-4440
> URL: https://issues.apache.org/jira/browse/THRIFT-4440
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: RobberPhex
>Priority: Minor
>
> It seems like `build/docker/ubuntu-trusty/Dockerfile.orig` is useless.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (THRIFT-4440) rm `build/docker/ubuntu-trusty/Dockerfile.orig`

2018-01-02 Thread RobberPhex (JIRA)
RobberPhex created THRIFT-4440:
--

 Summary: rm `build/docker/ubuntu-trusty/Dockerfile.orig`
 Key: THRIFT-4440
 URL: https://issues.apache.org/jira/browse/THRIFT-4440
 Project: Thrift
  Issue Type: Improvement
  Components: Build Process
Affects Versions: 0.11.0
Reporter: RobberPhex
Priority: Minor


It seems like `build/docker/ubuntu-trusty/Dockerfile.orig` is useless.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4439) Shouldn't download dart.deb directly.

2018-01-02 Thread RobberPhex (JIRA)

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

RobberPhex commented on THRIFT-4439:


[~jking3] Just retrigger ci, it's success at [apache 
repo|https://travis-ci.org/apache/thrift/builds/324407532] and [personal 
repo|https://travis-ci.org/RobberPhex/thrift/builds/324407500].

> Shouldn't download dart.deb directly.
> -
>
> Key: THRIFT-4439
> URL: https://issues.apache.org/jira/browse/THRIFT-4439
> Project: Thrift
>  Issue Type: Bug
>  Components: Dart - Library
>Affects Versions: 0.11.0
> Environment: travis-ci
>Reporter: RobberPhex
>Assignee: James E. King, III
>
> https://storage.googleapis.com/dart-archive/channels/stable/release/latest/linux_packages/dart_1.24.2-1_amd64.deb
>  is 404,
> So, as https://www.dartlang.org/install/linux suggested, use source list.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)