[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines
Github user sharpdevel commented on the pull request: https://github.com/apache/thrift/pull/377#issuecomment-93936892 I'm afraid I don't know how to reopen this pull request. Do I have to create a new one? I already create a Jira-Ticket https://issues.apache.org/jira/browse/THRIFT-3000. Do I have to recreate that too? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-2877) Optimize generated hashCode
[ https://issues.apache.org/jira/browse/THRIFT-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499511#comment-14499511 ] ASF GitHub Bot commented on THRIFT-2877: GitHub user roshan opened a pull request: https://github.com/apache/thrift/pull/447 THRIFT-2877 Generate hashCode using primitives, static utility methods This is pretty much the List.hashCode() except without any list. It takes about a third the time on some rudimentary benchmarks. I tried it out with ``` typedef i32 SomeId typedef binary BinId typedef string StringId struct NonTrue {} union MaybeAThing { 1: NonTrue nt 2: bool bl } enum Nomnom { EAT=31 LIVE=515 } struct AllPrims { 1: bool boole 2: byte single_byte 3: i16 shrt 4: i32 integ 5: i64 longue 6: double f64 7: string str 8: binary bin 9: Nomnom en 10: NonTrue stru 11: MaybeAThing un 12: SomeId intid 13: BinId binid 14: StringId strid } ``` generating [this hashCode()](https://gist.github.com/roshan/7b7fff349e3ed06322c3). Populating these structs with some values has it match the AbstractList.hashCode() result but maybe we could try a different multiplicative factor. You can merge this pull request into a Git repository by running: $ git pull https://github.com/roshan/thrift THRIFT-2877_int_based_hashcode Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/447.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 #447 commit f7618aee96061e14b323c653ab36d40158c391c4 Author: Roshan George ros...@arjie.com Date: 2015-04-17T07:46:02Z THRIFT-2877 Generate hashCode using primitives and static utility methods Optimize generated hashCode --- Key: THRIFT-2877 URL: https://issues.apache.org/jira/browse/THRIFT-2877 Project: Thrift Issue Type: Improvement Components: Java - Compiler Affects Versions: 0.9.3 Reporter: Mike Rettig Priority: Critical The generated java hashCode method allocates an ArrayList then appends the fields to the list. Primitive fields will be boxed when added to the list. The generated code shouldn't allocate a list or box primitives. The hashCode can be calculated by using a primitive int and some static utility methods which can return the hashCode for each type. out indent() @Override endl indent() public int hashCode() { endl; 1839 indent_up(); 1840 indent(out) ListObject list = new ArrayListObject(); endl; 1841 1842 for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { 1843 out endl; 1844 1845 t_type* t = get_true_type((*m_iter)-get_type()); 1846 bool is_optional = (*m_iter)-get_req() == t_field::T_OPTIONAL; 1847 bool can_be_null = type_can_be_null(t); 1848 string name = (*m_iter)-get_name(); 1849 1850 string present = true; 1851 1852 if (is_optional || can_be_null) { 1853 present += ( + generate_isset_check(*m_iter) + ); 1854 } 1855 1856 indent(out) boolean present_ name = present ; endl; 1857 indent(out) list.add(present_ name ); endl; 1858 indent(out) if (present_ name ) endl; 1859 if (t-is_enum()) { 1860 indent(out)list.add( name .getValue()); endl; 1861 } else { 1862 indent(out)list.add( name ); endl; 1863 } 1864 } 1865 1866 out endl; 1867 indent(out) return list.hashCode(); endl; 1868 indent_down(); 1869 indent(out) } endl endl; 1870 } -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (THRIFT-3101) Thrift cannot support the collection whose element is null
[ https://issues.apache.org/jira/browse/THRIFT-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xiaopeng.he updated THRIFT-3101: Description: Thrift's protocol cannot support the collection whose element is null (was: Thrift's protocal cannot support the collection whose element is null) Thrift cannot support the collection whose element is null -- Key: THRIFT-3101 URL: https://issues.apache.org/jira/browse/THRIFT-3101 Project: Thrift Issue Type: Bug Reporter: xiaopeng.he Thrift's protocol cannot support the collection whose element is null -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (THRIFT-3101) Thrift cannot support the collection whose element is null
xiaopeng.he created THRIFT-3101: --- Summary: Thrift cannot support the collection whose element is null Key: THRIFT-3101 URL: https://issues.apache.org/jira/browse/THRIFT-3101 Project: Thrift Issue Type: Bug Reporter: xiaopeng.he Thrift's protocal cannot support the collection whose element is null -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...
Github user roshan closed the pull request at: https://github.com/apache/thrift/pull/447 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-2877) Optimize generated hashCode
[ https://issues.apache.org/jira/browse/THRIFT-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499519#comment-14499519 ] ASF GitHub Bot commented on THRIFT-2877: Github user roshan closed the pull request at: https://github.com/apache/thrift/pull/447 Optimize generated hashCode --- Key: THRIFT-2877 URL: https://issues.apache.org/jira/browse/THRIFT-2877 Project: Thrift Issue Type: Improvement Components: Java - Compiler Affects Versions: 0.9.3 Reporter: Mike Rettig Priority: Critical The generated java hashCode method allocates an ArrayList then appends the fields to the list. Primitive fields will be boxed when added to the list. The generated code shouldn't allocate a list or box primitives. The hashCode can be calculated by using a primitive int and some static utility methods which can return the hashCode for each type. out indent() @Override endl indent() public int hashCode() { endl; 1839 indent_up(); 1840 indent(out) ListObject list = new ArrayListObject(); endl; 1841 1842 for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { 1843 out endl; 1844 1845 t_type* t = get_true_type((*m_iter)-get_type()); 1846 bool is_optional = (*m_iter)-get_req() == t_field::T_OPTIONAL; 1847 bool can_be_null = type_can_be_null(t); 1848 string name = (*m_iter)-get_name(); 1849 1850 string present = true; 1851 1852 if (is_optional || can_be_null) { 1853 present += ( + generate_isset_check(*m_iter) + ); 1854 } 1855 1856 indent(out) boolean present_ name = present ; endl; 1857 indent(out) list.add(present_ name ); endl; 1858 indent(out) if (present_ name ) endl; 1859 if (t-is_enum()) { 1860 indent(out)list.add( name .getValue()); endl; 1861 } else { 1862 indent(out)list.add( name ); endl; 1863 } 1864 } 1865 1866 out endl; 1867 indent(out) return list.hashCode(); endl; 1868 indent_down(); 1869 indent(out) } endl endl; 1870 } -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...
GitHub user roshan opened a pull request: https://github.com/apache/thrift/pull/448 THRIFT-2877 Generate hashCode using primitives, static utility methods This is pretty much the List.hashCode() except without any list. It takes about a third the time on some rudimentary benchmarks. I tried it out with ``` typedef i32 SomeId typedef binary BinId typedef string StringId struct NonTrue {} union MaybeAThing { 1: NonTrue nt 2: bool bl } enum Nomnom { EAT=31 LIVE=515 } struct AllPrims { 1: bool boole 2: byte single_byte 3: i16 shrt 4: i32 integ 5: i64 longue 6: double f64 7: string str 8: binary bin 9: Nomnom en 10: NonTrue stru 11: MaybeAThing un 12: SomeId intid 13: BinId binid 14: StringId strid } ``` generating [this hashCode()](https://gist.github.com/roshan/7b7fff349e3ed06322c3). Populating these structs with some values has it match the AbstractList.hashCode() result but maybe we could try a different multiplicative factor. Sorry about the other one https://github.com/apache/thrift/pull/447. I rebased to one commit, but couldn't seem to reuse the old PR (it compiled locally on gcc but failed on clang). You can merge this pull request into a Git repository by running: $ git pull https://github.com/roshan/thrift THRIFT-2877_int_based_hashcode Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/448.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 #448 commit b436a7ef56f5e6744d1004b284efa7b1d64b375b Author: Roshan George ros...@arjie.com Date: 2015-04-17T07:46:02Z THRIFT-2877 Generate hashCode using primitives and static utility methods --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-2877) Optimize generated hashCode
[ https://issues.apache.org/jira/browse/THRIFT-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499525#comment-14499525 ] ASF GitHub Bot commented on THRIFT-2877: GitHub user roshan opened a pull request: https://github.com/apache/thrift/pull/448 THRIFT-2877 Generate hashCode using primitives, static utility methods This is pretty much the List.hashCode() except without any list. It takes about a third the time on some rudimentary benchmarks. I tried it out with ``` typedef i32 SomeId typedef binary BinId typedef string StringId struct NonTrue {} union MaybeAThing { 1: NonTrue nt 2: bool bl } enum Nomnom { EAT=31 LIVE=515 } struct AllPrims { 1: bool boole 2: byte single_byte 3: i16 shrt 4: i32 integ 5: i64 longue 6: double f64 7: string str 8: binary bin 9: Nomnom en 10: NonTrue stru 11: MaybeAThing un 12: SomeId intid 13: BinId binid 14: StringId strid } ``` generating [this hashCode()](https://gist.github.com/roshan/7b7fff349e3ed06322c3). Populating these structs with some values has it match the AbstractList.hashCode() result but maybe we could try a different multiplicative factor. Sorry about the other one https://github.com/apache/thrift/pull/447. I rebased to one commit, but couldn't seem to reuse the old PR (it compiled locally on gcc but failed on clang). You can merge this pull request into a Git repository by running: $ git pull https://github.com/roshan/thrift THRIFT-2877_int_based_hashcode Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/448.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 #448 commit b436a7ef56f5e6744d1004b284efa7b1d64b375b Author: Roshan George ros...@arjie.com Date: 2015-04-17T07:46:02Z THRIFT-2877 Generate hashCode using primitives and static utility methods Optimize generated hashCode --- Key: THRIFT-2877 URL: https://issues.apache.org/jira/browse/THRIFT-2877 Project: Thrift Issue Type: Improvement Components: Java - Compiler Affects Versions: 0.9.3 Reporter: Mike Rettig Priority: Critical The generated java hashCode method allocates an ArrayList then appends the fields to the list. Primitive fields will be boxed when added to the list. The generated code shouldn't allocate a list or box primitives. The hashCode can be calculated by using a primitive int and some static utility methods which can return the hashCode for each type. out indent() @Override endl indent() public int hashCode() { endl; 1839 indent_up(); 1840 indent(out) ListObject list = new ArrayListObject(); endl; 1841 1842 for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { 1843 out endl; 1844 1845 t_type* t = get_true_type((*m_iter)-get_type()); 1846 bool is_optional = (*m_iter)-get_req() == t_field::T_OPTIONAL; 1847 bool can_be_null = type_can_be_null(t); 1848 string name = (*m_iter)-get_name(); 1849 1850 string present = true; 1851 1852 if (is_optional || can_be_null) { 1853 present += ( + generate_isset_check(*m_iter) + ); 1854 } 1855 1856 indent(out) boolean present_ name = present ; endl; 1857 indent(out) list.add(present_ name ); endl; 1858 indent(out) if (present_ name ) endl; 1859 if (t-is_enum()) { 1860 indent(out)list.add( name .getValue()); endl; 1861 } else { 1862 indent(out)list.add( name ); endl; 1863 } 1864 } 1865 1866 out endl; 1867 indent(out) return list.hashCode(); endl; 1868 indent_down(); 1869 indent(out) } endl endl; 1870 } -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3013: -- Attachment: (was: THRIFT-3013.v3.patch) make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier Attachments: THRIFT-3013.v4.patch At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines
GitHub user sharpdevel reopened a pull request: https://github.com/apache/thrift/pull/377 Issue with IPv6 an IPv4 on windows machines When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to estabild IPv6 sockets before they fallback to IPv4. For example IPv4 is preferred on Windows 7 machines while on Windows 8 and 8.1 machines IPv6 is preferred. This patch works on Window 7, 8 and 8.1. Additionally the AssemblyFileVersion must not contain an asterix. By removing the AssemblyFileVersion it alsways corresponds the the generated value of AsemblyVersion In the PreBuild command of the ThriftTest project I added around the MSBuildToolPath to make the script work on english windows machine wheren the folder equals to sth like C:\program files\. You can merge this pull request into a Git repository by running: $ git pull https://github.com/sharpdevel/thrift master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/377.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 #377 commit 9bed8db267bf4b48cc9d6dd5d0a809d83e1e2fb1 Author: sharpdevel icode666@github Date: 2015-02-13T12:19:44Z - When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to estabild IPv6 sockets before they fallback to IPv4 commit 7704ab0ce8e9dfa180d5351ffdd3e4065b09fa95 Author: sharpdevel icode666@github Date: 2015-02-26T12:45:57Z TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Updated] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3013: -- Attachment: (was: THRIFT-3013.patch) make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier Attachments: THRIFT-3013.v3.patch, THRIFT-3013.v4.patch At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499756#comment-14499756 ] Xiaoshuang LU edited comment on THRIFT-3013 at 4/17/15 12:52 PM: - Hi [~roger.meier], I have migrated the patch from getopt_long to getopt_long_only. The main differences between them are described as follows. {quote} The getopt_long_only() function behaves identically to getopt_long() with the exception that long options may start with - in addition to --. If an option starting with - does not match a long option but does match a single-character option, the single-character option is returned. {quote} References: 1. https://www.freebsd.org/cgi/man.cgi?getopt_long(3) 2. http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html was (Author: in-chief): Hi [~roger.meier], I have migrated the patch from getopt_long to getopt_long_only. The main differences between them are described as follows. {quote} The getopt_long_only() function behaves identically to getopt_long() with the exception that long options may start with `-' in addition to `--'. If an option starting with `-' does not match a long option but does match a single-character option, the single-character option is returned. {quote} References: 1. https://www.freebsd.org/cgi/man.cgi?getopt_long(3) 2. http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier Attachments: THRIFT-3013.v4.patch At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3013: -- Attachment: THRIFT-3013.v4.patch make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier Attachments: THRIFT-3013.v4.patch At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (THRIFT-3102) could not make check for Go Library
Xiaoshuang LU created THRIFT-3102: - Summary: could not make check for Go Library Key: THRIFT-3102 URL: https://issues.apache.org/jira/browse/THRIFT-3102 Project: Thrift Issue Type: Bug Components: Go - Library Affects Versions: 0.9.2 Environment: OS: CentOS 7.1 x86_64 golang: 1.4 Reporter: Xiaoshuang LU steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 make check still does work even after I modify lib/go/test/Makefile.am (add --gen go) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3013: -- Attachment: (was: THRIFT-3013.v4.patch) make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Issue Comment Deleted] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3013: -- Comment: was deleted (was: Hi [~roger.meier], I have migrate the patch from getopt_long to getopt_long_only. The main difference between is that {quote}The getopt_long_only() function behaves identically to getopt_long() with the exception that long options may start with `-' in addition to `--'. If an option starting with `-' does not match a long option but does match a single-character option, the single-character option is returned.{quote} References: 1. https://www.freebsd.org/cgi/man.cgi?getopt_long(3) 2. http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html) make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499756#comment-14499756 ] Xiaoshuang LU edited comment on THRIFT-3013 at 4/17/15 12:49 PM: - Hi [~roger.meier], I have migrated the patch from getopt_long to getopt_long_only. The main differences between them are described as follows. {quote} The getopt_long_only() function behaves identically to getopt_long() with the exception that long options may start with `-' in addition to `--'. If an option starting with `-' does not match a long option but does match a single-character option, the single-character option is returned. {quote} References: 1. https://www.freebsd.org/cgi/man.cgi?getopt_long(3) 2. http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html was (Author: in-chief): Hi [~roger.meier], I have migrate the patch from getopt_long to getopt_long_only. The main difference between is that {quote}The getopt_long_only() function behaves identically to getopt_long() with the exception that long options may start with `-' in addition to `--'. If an option starting with `-' does not match a long option but does match a single-character option, the single-character option is returned.{quote} References: 1. https://www.freebsd.org/cgi/man.cgi?getopt_long(3) 2. http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499756#comment-14499756 ] Xiaoshuang LU edited comment on THRIFT-3013 at 4/17/15 12:54 PM: - Hi [~roger.meier], I have migrated the patch from getopt_long to getopt_long_only. The main differences between them are described as follows. {quote} The getopt_long_only() function behaves identically to getopt_long() with the exception that long options may start with '-' in addition to '--'. If an option starting with '-' does not match a long option but does match a single-character option, the single-character option is returned. {quote} References: 1. https://www.freebsd.org/cgi/man.cgi?getopt_long(3) 2. http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html was (Author: in-chief): Hi [~roger.meier], I have migrated the patch from getopt_long to getopt_long_only. The main differences between them are described as follows. {quote} The getopt_long_only() function behaves identically to getopt_long() with the exception that long options may start with - in addition to --. If an option starting with - does not match a long option but does match a single-character option, the single-character option is returned. {quote} References: 1. https://www.freebsd.org/cgi/man.cgi?getopt_long(3) 2. http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier Attachments: THRIFT-3013.v4.patch At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (THRIFT-3013) make thrift compiler accept a list of input files
[ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3013: -- Attachment: THRIFT-3013.v4.patch make thrift compiler accept a list of input files - Key: THRIFT-3013 URL: https://issues.apache.org/jira/browse/THRIFT-3013 Project: Thrift Issue Type: New Feature Components: Compiler (General) Affects Versions: 0.9.2 Reporter: Xiaoshuang LU Assignee: Roger Meier Attachments: THRIFT-3013.patch, THRIFT-3013.v2.patch, THRIFT-3013.v3.patch, THRIFT-3013.v4.patch At present, customer could specify one input file to the thrift compiler. There are maybe two approaches to support multiple input files. Approach 1: Improve the option parser in compiler/cpp/src/main.cc. Maybe we can borrow code from GUN's getopt_long. Approach 2: Offer users a maven plugin which can help them to iterate through a list of input files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3102: -- Description: steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {quote} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {quote} make check still does not work even after I modify lib/go/test/Makefile.am (add --gen go). {quote} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {quote} was: steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 make check still does work even after I modify lib/go/test/Makefile.am (add --gen go) could not make check for Go Library --- Key: THRIFT-3102 URL: https://issues.apache.org/jira/browse/THRIFT-3102 Project: Thrift Issue Type: Bug Components: Go - Library Affects Versions: 0.9.2 Environment: OS: CentOS 7.1 x86_64 golang: 1.4 Reporter: Xiaoshuang LU steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499935#comment-14499935 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on the pull request: https://github.com/apache/thrift/pull/442#issuecomment-94001001 It would be nice if this built cleanly with the following warning config: `OTHER_CFLAGS = -Wall -Wextra -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-parameter -Wno-auto-import -Wno-documentation-unknown-command -Wno-direct-ivar-access -Wno-objc-interface-ivars -fno-objc-arc` This finds a lot of implicit conversion and ARC issues. Many of those are due to TProtocol.h not being updated similarly to TBinaryProtocol.h to avoid unnecessary indirect returns (and, under ARC, the need for `__autoreleasing`), like `- (void) readStructBeginReturningName: (NSString **) name;` which could simply return the name directly. I know that's a pain though, and I don't want to hold up adding a compact protocol, so we could add an issue to fix this up in a later PR. (More generally, we really need an actual Xcode project with consistent build configuration, and actual protocol tests.) Compact Protocol in Cocoa - Key: THRIFT-2640 URL: https://issues.apache.org/jira/browse/THRIFT-2640 Project: Thrift Issue Type: Sub-task Components: Cocoa - Library Affects Versions: 0.9.1 Reporter: Mark Hornsby Assignee: Jens Geyer Priority: Minor -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user jeremy-w commented on the pull request: https://github.com/apache/thrift/pull/442#issuecomment-94001001 It would be nice if this built cleanly with the following warning config: `OTHER_CFLAGS = -Wall -Wextra -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-parameter -Wno-auto-import -Wno-documentation-unknown-command -Wno-direct-ivar-access -Wno-objc-interface-ivars -fno-objc-arc` This finds a lot of implicit conversion and ARC issues. Many of those are due to TProtocol.h not being updated similarly to TBinaryProtocol.h to avoid unnecessary indirect returns (and, under ARC, the need for `__autoreleasing`), like `- (void) readStructBeginReturningName: (NSString **) name;` which could simply return the name directly. I know that's a pain though, and I don't want to hold up adding a compact protocol, so we could add an issue to fix this up in a later PR. (More generally, we really need an actual Xcode project with consistent build configuration, and actual protocol tests.) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] thrift pull request: Add moveable_types option to C++ generator
Github user flandr commented on the pull request: https://github.com/apache/thrift/pull/271#issuecomment-94001280 Of course, and it was https://issues.apache.org/jira/browse/THRIFT-2836 was merged. Not sure exactly how, tho clearly not through this interface ;) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-2836) Optionally generate C++11 MoveConstructible types
[ https://issues.apache.org/jira/browse/THRIFT-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499940#comment-14499940 ] ASF GitHub Bot commented on THRIFT-2836: Github user flandr commented on the pull request: https://github.com/apache/thrift/pull/271#issuecomment-94001280 Of course, and it was https://issues.apache.org/jira/browse/THRIFT-2836 was merged. Not sure exactly how, tho clearly not through this interface ;) Optionally generate C++11 MoveConstructible types - Key: THRIFT-2836 URL: https://issues.apache.org/jira/browse/THRIFT-2836 Project: Thrift Issue Type: New Feature Components: C++ - Compiler Affects Versions: 1.0 Reporter: Nate Rosenblum Assignee: Nate Rosenblum Fix For: 0.9.3 Presently the cpp compiler only emits copy constructors for generated Thrift types. This is sub-optimal when passing types as parameters to std::bind when there are container fields that have move-constructible STL implementations. Adding rvalue constructors assignment operators will avoid copies in these cases. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28600626 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +{ +i32buf[idx++] = (uint8_t)n; +break; +} +else +{ +i32buf[idx++] = (uint8_t)((n 0x7F) | 0x80); +n = 7; +} +} +[mTransport
[jira] [Updated] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3102: -- Description: steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {quote} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {quote} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {quote} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {quote} was: steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {quote} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {quote} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {quote} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of:
[jira] [Updated] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiaoshuang LU updated THRIFT-3102: -- Description: steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {quote} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {quote} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {quote} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {quote} was: steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {quote} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {quote} make check still does not work even after I modify lib/go/test/Makefile.am (add --gen go). {quote} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) /home/username/workshop/thrift-go/lib/go/test/gopath/src/includestest
[jira] [Commented] (THRIFT-3028) Regression caused by THRIFT-2180
[ https://issues.apache.org/jira/browse/THRIFT-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499899#comment-14499899 ] Jeremy W. Sherman commented on THRIFT-3028: --- [~jensg] Would a GitHub pull request be preferable to an attached patch? Regression caused by THRIFT-2180 Key: THRIFT-3028 URL: https://issues.apache.org/jira/browse/THRIFT-3028 Project: Thrift Issue Type: Bug Components: Cocoa - Library Affects Versions: 0.9.3 Environment: Reported against ios-arm64. Reporter: Jeremy W. Sherman Labels: endianness Attachments: 3028.patch Changes made in THRIFT-2180 to TBinaryProtocol broke little-endian message reading. Message-writing was also affected. This was not caught by tests, because the cross-tests appear not to include the Cocoa platform. A minimal patch is attached to address this. I wrote a local test using a StreamTransport, which lets me use NSStream to read/write via in-memory buffers easily (or file handles - the existing transports probably should have been written in terms of this standard Foundation abstraction) to verify that write/read of a message agree on how to read-write. [~gurubook]: Would you be so kind as to apply the attached patch, and verify it addresses the issue you reported on THRIFT-2180? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28598871 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.h --- @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TProtocol.h +#import TTransport.h +#import TProtocolFactory.h + +@interface TCompactProtocol : NSObjectTProtocol + +-(id)initWithTransport:(id TTransport)transport; --- End diff -- It would be nice to be consistent with the layout style used in the rest of the Obj-C library. Specifically, it uses a lot more whitespace in method decls. See for example [TProcessor.h](https://github.com/apache/thrift/blob/master/lib/cocoa/src/TProcessor.h#L24-L29) which looks like: ```objc @protocol TProcessor NSObject - (BOOL) processOnInputProtocol: (id TProtocol) inProtocol outputProtocol: (id TProtocol) outProtocol; @end ``` The main difference is adding space between the `-/+` leading the method decl/impl and the return type, between types and `*`s, and between the types and the selector chunks. This affects all methods declared and implemented in this PR, but it should be an easy change with some regex magic :). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499905#comment-14499905 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28598871 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.h --- @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TProtocol.h +#import TTransport.h +#import TProtocolFactory.h + +@interface TCompactProtocol : NSObjectTProtocol + +-(id)initWithTransport:(id TTransport)transport; --- End diff -- It would be nice to be consistent with the layout style used in the rest of the Obj-C library. Specifically, it uses a lot more whitespace in method decls. See for example [TProcessor.h](https://github.com/apache/thrift/blob/master/lib/cocoa/src/TProcessor.h#L24-L29) which looks like: ```objc @protocol TProcessor NSObject - (BOOL) processOnInputProtocol: (id TProtocol) inProtocol outputProtocol: (id TProtocol) outProtocol; @end ``` The main difference is adding space between the `-/+` leading the method decl/impl and the return type, between types and `*`s, and between the types and the selector chunks. This affects all methods declared and implemented in this PR, but it should be an easy change with some regex magic :). Compact Protocol in Cocoa - Key: THRIFT-2640 URL: https://issues.apache.org/jira/browse/THRIFT-2640 Project: Thrift Issue Type: Sub-task Components: Cocoa - Library Affects Versions: 0.9.1 Reporter: Mark Hornsby Assignee: Jens Geyer Priority: Minor -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28600942 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +{ +i32buf[idx++] = (uint8_t)n; +break; +} +else +{ +i32buf[idx++] = (uint8_t)((n 0x7F) | 0x80); +n = 7; +} +} +[mTransport
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499952#comment-14499952 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28600942 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28601691 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +{ +i32buf[idx++] = (uint8_t)n; +break; +} +else +{ +i32buf[idx++] = (uint8_t)((n 0x7F) | 0x80); +n = 7; +} +} +[mTransport
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499970#comment-14499970 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28601636 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499971#comment-14499971 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28601691 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28601814 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +{ +i32buf[idx++] = (uint8_t)n; +break; +} +else +{ +i32buf[idx++] = (uint8_t)((n 0x7F) | 0x80); +n = 7; +} +} +[mTransport
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499974#comment-14499974 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28601814 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14499982#comment-14499982 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on a diff in the pull request: https://github.com/apache/thrift/pull/442#discussion_r28601980 --- Diff: lib/cocoa/src/protocol/TCompactProtocol.m --- @@ -0,0 +1,706 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import TCompactProtocol.h +#import TObjective-C.h +#import TProtocolException.h + +static const uint8_t COMPACT_PROTOCOL_ID = 0x82; +static const uint8_t COMPACT_VERSION = 1; +static const uint8_t COMPACT_VERSION_MASK = 0x1F; // 0001 +static const uint8_t COMPACT_TYPE_MASK = 0xE0; // 1110 +static const uint8_t COMPACT_TYPE_BITS = 0x07; // 0111 +static const int COMPACT_TYPE_SHIFT_AMOUNT = 5; + +static uint8_t ttypeToCompactType[16] = {0}; + +enum +{ +TCType_STOP = 0x00, +TCType_BOOLEAN_TRUE = 0x01, +TCType_BOOLEAN_FALSE = 0x02, +TCType_BYTE = 0x03, +TCType_I16 = 0x04, +TCType_I32 = 0x05, +TCType_I64 = 0x06, +TCType_DOUBLE = 0x07, +TCType_BINARY = 0x08, +TCType_LIST = 0x09, +TCType_SET = 0x0A, +TCType_MAP = 0x0B, +TCType_STRUCT = 0x0C, +}; + +@implementation TCompactProtocolFactory + ++(TCompactProtocolFactory*)sharedFactory +{ +static TCompactProtocolFactory* gSharedFactory = nil; +if (gSharedFactory == nil) +{ +gSharedFactory = [[TCompactProtocolFactory alloc] init]; +} + +return gSharedFactory; +} + +-(TCompactProtocol*)newProtocolOnTransport:(id TTransport)transport +{ +return [[TCompactProtocol alloc] initWithTransport:transport]; +} + +@end + +@implementation TCompactProtocol +{ +NSMutableArray* lastField; +short lastFieldId; +id TTransport mTransport; + +NSString* boolFieldName; +NSNumber* boolFieldType; +NSNumber* boolFieldId; +NSNumber* booleanValue; +} + +-(id)init +{ +self = [super init]; + +if (self != nil) +{ +lastField = [[NSMutableArray alloc] init]; +} + +return self; +} + +-(id)initWithTransport:(id TTransport)transport +{ +self = [self init]; + +if (self != nil) +{ +mTransport = [transport retain_stub]; + +ttypeToCompactType[TType_STOP] = TCType_STOP; +ttypeToCompactType[TType_BOOL] = TCType_BOOLEAN_FALSE; +ttypeToCompactType[TType_BYTE] = TCType_BYTE; +ttypeToCompactType[TType_DOUBLE] = TCType_DOUBLE; +ttypeToCompactType[TType_I16] = TCType_I16; +ttypeToCompactType[TType_I32] = TCType_I32; +ttypeToCompactType[TType_I64] = TCType_I64; +ttypeToCompactType[TType_STRING] = TCType_BINARY; +ttypeToCompactType[TType_STRUCT] = TCType_STRUCT; +ttypeToCompactType[TType_MAP] = TCType_MAP; +ttypeToCompactType[TType_SET] = TCType_SET; +ttypeToCompactType[TType_LIST] = TCType_LIST; +} + +return self; +} + +-(void)dealloc +{ +[lastField release_stub]; +[mTransport release_stub]; +[boolFieldName release_stub]; +[boolFieldType release_stub]; +[boolFieldId release_stub]; +[booleanValue release_stub]; +[super dealloc_stub]; +} + +-(idTTransport)transport +{ +return mTransport; +} + +-(void)writeByteDirect:(int8_t)n +{ +[mTransport write:(uint8_t*)n offset:0 length:1]; +} + +-(void)writeVarint32:(uint32_t)n +{ +uint8_t i32buf[5] = {0}; +uint32_t idx = 0; +while (true) +{ +if ((n ~0x7F) == 0) +
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user jeremy-w commented on the pull request: https://github.com/apache/thrift/pull/442#issuecomment-94005616 If you would be so kind as to fix the `ttypeToCompactType` bit, I think this would be fine to merge. The other fixes can be done later. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1449#comment-1449 ] ASF GitHub Bot commented on THRIFT-2640: Github user jeremy-w commented on the pull request: https://github.com/apache/thrift/pull/442#issuecomment-94005616 If you would be so kind as to fix the `ttypeToCompactType` bit, I think this would be fine to merge. The other fixes can be done later. Compact Protocol in Cocoa - Key: THRIFT-2640 URL: https://issues.apache.org/jira/browse/THRIFT-2640 Project: Thrift Issue Type: Sub-task Components: Cocoa - Library Affects Versions: 0.9.1 Reporter: Mark Hornsby Assignee: Jens Geyer Priority: Minor -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500016#comment-14500016 ] Jeremy W. Sherman commented on THRIFT-2640: --- As the last comment says, I only see 1 small issue needing a fix before applying the changes, but there are a lot of other issues that should be cleaned up in a later pass. [~jensg] What would be the best way to go about adding an Xcode project file, so authors can be consistent in which warnings are observed? It would be used during development, but we wouldn't want to copy it into a release tarball. I'm also curious if there's any documentation on adding tests for a language / how the testrunner system works. Unless the tests are being run under OS X, it wouldn't be possible to run the tests as part of whatever buildbot/CI system is in place, but it would still be useful during patch review. The Cocoa lib currently has no tests, and that makes it unfortunately terribly easy to miss a feature (like service inheritance) or bungle something in an edit and fail to catch it. If I'd do better asking these questions in an email to thrift-dev@, I've no problem moving them there. Thanks! Compact Protocol in Cocoa - Key: THRIFT-2640 URL: https://issues.apache.org/jira/browse/THRIFT-2640 Project: Thrift Issue Type: Sub-task Components: Cocoa - Library Affects Versions: 0.9.1 Reporter: Mark Hornsby Assignee: Jens Geyer Priority: Minor -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: Thrift 3103
Github user marco-m commented on the pull request: https://github.com/apache/thrift/pull/449#issuecomment-94012877 Actually this pull request is only about THRIFT-3103, but you see also the previous THRIFT-3090 commit (which has a separate pull request, https://github.com/apache/thrift/pull/434), because this commit, THRIFT-3103, depends on THRIFT-3090. Hope it is clear :-) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-3103) cmake is missing RPATH on MacOSX
[ https://issues.apache.org/jira/browse/THRIFT-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500073#comment-14500073 ] ASF GitHub Bot commented on THRIFT-3103: Github user marco-m commented on the pull request: https://github.com/apache/thrift/pull/449#issuecomment-94012877 Actually this pull request is only about THRIFT-3103, but you see also the previous THRIFT-3090 commit (which has a separate pull request, https://github.com/apache/thrift/pull/434), because this commit, THRIFT-3103, depends on THRIFT-3090. Hope it is clear :-) cmake is missing RPATH on MacOSX Key: THRIFT-3103 URL: https://issues.apache.org/jira/browse/THRIFT-3103 Project: Thrift Issue Type: Bug Affects Versions: 1.0 Environment: MacOSX specific Reporter: Marco Molteni The Thrift CMakefiles do not enable RPATH handling for MacOSX. This means that if the Thrift shared libraries are installed in a non-system directory (i.e. a directory not known by the dynamic linker), any executable linked against them will fail to run, unless the {{DYLD_LIBRARY_PATH}} environment variable (Unix equivalent: {{LD_LIBRARY_PATH}}) is set to the appropriate value. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (THRIFT-3028) Regression caused by THRIFT-2180
[ https://issues.apache.org/jira/browse/THRIFT-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500158#comment-14500158 ] Jens Geyer edited comment on THRIFT-3028 at 4/17/15 4:42 PM: - Hi [~jeremyw.sherman], patch file is fine, PR is better, especially with larger change sets. PRs automatically go through Travis and are slightly easier to handle (IMHO) when it comes to merging. But in general either one is ok. was (Author: jensg): Hi [~jeremyw.sherman], patch file is fine, PR is better. PRs automatically go through Travis and are slightly easier to handle (IMHO) when it comes to merging. But in general either one is ok. Regression caused by THRIFT-2180 Key: THRIFT-3028 URL: https://issues.apache.org/jira/browse/THRIFT-3028 Project: Thrift Issue Type: Bug Components: Cocoa - Library Affects Versions: 0.9.3 Environment: Reported against ios-arm64. Reporter: Jeremy W. Sherman Labels: endianness Attachments: 3028.patch Changes made in THRIFT-2180 to TBinaryProtocol broke little-endian message reading. Message-writing was also affected. This was not caught by tests, because the cross-tests appear not to include the Cocoa platform. A minimal patch is attached to address this. I wrote a local test using a StreamTransport, which lets me use NSStream to read/write via in-memory buffers easily (or file handles - the existing transports probably should have been written in terms of this standard Foundation abstraction) to verify that write/read of a message agree on how to read-write. [~gurubook]: Would you be so kind as to apply the attached patch, and verify it addresses the issue you reported on THRIFT-2180? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500031#comment-14500031 ] ASF GitHub Bot commented on THRIFT-2640: Github user creker commented on the pull request: https://github.com/apache/thrift/pull/442#issuecomment-94009192 Thanks for the comments! I'll try to fix as much as I can. The code is straight port from C# with C++ bits here and there so I expected it woudn't be merged straight away. TProtocol indeed looks strange with pointers to objects instead of a simple return but it would require not only library modificaion but also compiler. I think it's better to fix that in a separate issue. Compact Protocol in Cocoa - Key: THRIFT-2640 URL: https://issues.apache.org/jira/browse/THRIFT-2640 Project: Thrift Issue Type: Sub-task Components: Cocoa - Library Affects Versions: 0.9.1 Reporter: Mark Hornsby Assignee: Jens Geyer Priority: Minor -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa
Github user creker commented on the pull request: https://github.com/apache/thrift/pull/442#issuecomment-94009192 Thanks for the comments! I'll try to fix as much as I can. The code is straight port from C# with C++ bits here and there so I expected it woudn't be merged straight away. TProtocol indeed looks strange with pointers to objects instead of a simple return but it would require not only library modificaion but also compiler. I think it's better to fix that in a separate issue. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-3090) cmake build is broken
[ https://issues.apache.org/jira/browse/THRIFT-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500032#comment-14500032 ] Marco Molteni commented on THRIFT-3090: --- Updated pull request https://github.com/apache/thrift/pull/434. Kept as small as possible, and enables the build on MacOSX :-) The MacOSX linker wants to resolve all symbols at shared library creation time, while the Linux and FreeBSD linkers are happy to delay resolving until linking an executable with the given shared library. Although it might be possible to ask the MacOSX linker to behave like the FreeBSD one (both are using Clang), I don't see a problem in providing all symbols at shared library creation time. h4. thriftnb {noformat} Linking CXX shared library ../libthriftnb.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++11 -O2 -Wall -Wextra -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.0.0 -install_name /Users/mmolteni/src/thrift.marco.hggit/thebuild/lib/libthriftnb.1.0.0.dylib -o ../libthriftnb.1.0.0.dylib CMakeFiles/thriftnb.dir/src/thrift/server/TNonblockingServer.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TAsyncProtocolProcessor.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TEvhttpServer.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TEvhttpClientChannel.cpp.o /opt/local/lib/libssl.dylib /opt/local/lib/libcrypto.dylib -lpthread /opt/local/lib/libevent.dylib Undefined symbols for architecture x86_64: apache::thrift::concurrency::PosixThreadFactory::PosixThreadFactory(apache::thrift::concurrency::PosixThreadFactory::POLICY, apache::thrift::concurrency::PosixThreadFactory::PRIORITY, int, bool), referenced from: apache::thrift::server::TNonblockingServer::registerEvents(event_base*) in TNonblockingServer.cpp.o {noformat} h4. thriftqt {noformat} Linking CXX shared library ../libthriftqt.dylib Undefined symbols for architecture x86_64: apache::thrift::TOutput::strerror_s(int), referenced from: apache::thrift::transport::TTransportException::TTransportException(apache::thrift::transport::TTransportException::TTransportExceptionType, std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const, int) in TQIODeviceTransport.cpp.o {noformat} h4. thriftz {noformat} Linking CXX shared library ../libthriftz.dylib Undefined symbols for architecture x86_64: apache::thrift::GlobalOutput, referenced from: apache::thrift::transport::TZlibTransport::initZlib() in TZlibTransport.cpp.o {noformat} cmake build is broken - Key: THRIFT-3090 URL: https://issues.apache.org/jira/browse/THRIFT-3090 Project: Thrift Issue Type: Bug Environment: Mac OS X 10.10.3 C++ compiler: Apple system compiler (clang), Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) boost 1.57 cmake 3.2.1 Reporter: Marco Molteni Fix For: 0.9.3 A current version of apache/thrift on github as of 2015-04-10 doesn't build with cmake due to multiple errors: - some C++ targets fail to link with missing symbols, because they do not link against the `thrift` library - the c_glib test targets fail to build because the reference to `shared_ptr` is considered ambiguous by the compiler (it resolves to both boost and stdlib shared_ptr) See pull request https://github.com/apache/thrift/pull/434 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3101) Thrift cannot support the collection whose element is null
[ https://issues.apache.org/jira/browse/THRIFT-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500171#comment-14500171 ] Jens Geyer commented on THRIFT-3101: Could you please provide (at least) a reproducible test case? Of course, patches are also highly welcome, just in case you already have one. Thank you! Thrift cannot support the collection whose element is null -- Key: THRIFT-3101 URL: https://issues.apache.org/jira/browse/THRIFT-3101 Project: Thrift Issue Type: Bug Reporter: xiaopeng.he Thrift's protocol cannot support the collection whose element is null -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (THRIFT-3101) Thrift cannot support the collection whose element is null
[ https://issues.apache.org/jira/browse/THRIFT-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500171#comment-14500171 ] Jens Geyer edited comment on THRIFT-3101 at 4/17/15 4:51 PM: - Could you please provide (at least) a reproducible test case and specify the language you are talking about? Of course, patches are also highly welcome, just in case you already have one. Thank you! was (Author: jensg): Could you please provide (at least) a reproducible test case? Of course, patches are also highly welcome, just in case you already have one. Thank you! Thrift cannot support the collection whose element is null -- Key: THRIFT-3101 URL: https://issues.apache.org/jira/browse/THRIFT-3101 Project: Thrift Issue Type: Bug Reporter: xiaopeng.he Thrift's protocol cannot support the collection whose element is null -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3028) Regression caused by THRIFT-2180
[ https://issues.apache.org/jira/browse/THRIFT-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500158#comment-14500158 ] Jens Geyer commented on THRIFT-3028: Hi [~jeremyw.sherman], patch file is fine, PR is better. PRs automatically go through Travis and are slightly easier to handle (IMHO) when it comes to merging. But in general either one is ok. Regression caused by THRIFT-2180 Key: THRIFT-3028 URL: https://issues.apache.org/jira/browse/THRIFT-3028 Project: Thrift Issue Type: Bug Components: Cocoa - Library Affects Versions: 0.9.3 Environment: Reported against ios-arm64. Reporter: Jeremy W. Sherman Labels: endianness Attachments: 3028.patch Changes made in THRIFT-2180 to TBinaryProtocol broke little-endian message reading. Message-writing was also affected. This was not caught by tests, because the cross-tests appear not to include the Cocoa platform. A minimal patch is attached to address this. I wrote a local test using a StreamTransport, which lets me use NSStream to read/write via in-memory buffers easily (or file handles - the existing transports probably should have been written in terms of this standard Foundation abstraction) to verify that write/read of a message agree on how to read-write. [~gurubook]: Would you be so kind as to apply the attached patch, and verify it addresses the issue you reported on THRIFT-2180? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (THRIFT-3028) Regression caused by THRIFT-2180
[ https://issues.apache.org/jira/browse/THRIFT-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer resolved THRIFT-3028. Resolution: Fixed Fix Version/s: 0.9.3 Assignee: Jens Geyer Committed. {quote} This was not caught by tests, because the cross-tests appear not to include the Cocoa platform. {quote} Guess why I created THRIFT-3100 ... ;-) Jokes aside, you're completely and utterly right, that topic should absolutely be addressed in near future. Regression caused by THRIFT-2180 Key: THRIFT-3028 URL: https://issues.apache.org/jira/browse/THRIFT-3028 Project: Thrift Issue Type: Bug Components: Cocoa - Library Affects Versions: 0.9.3 Environment: Reported against ios-arm64. Reporter: Jeremy W. Sherman Assignee: Jens Geyer Labels: endianness Fix For: 0.9.3 Attachments: 3028.patch Changes made in THRIFT-2180 to TBinaryProtocol broke little-endian message reading. Message-writing was also affected. This was not caught by tests, because the cross-tests appear not to include the Cocoa platform. A minimal patch is attached to address this. I wrote a local test using a StreamTransport, which lets me use NSStream to read/write via in-memory buffers easily (or file handles - the existing transports probably should have been written in terms of this standard Foundation abstraction) to verify that write/read of a message agree on how to read-write. [~gurubook]: Would you be so kind as to apply the attached patch, and verify it addresses the issue you reported on THRIFT-2180? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3100) Implement standard Thrift test for Cocoa
[ https://issues.apache.org/jira/browse/THRIFT-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500553#comment-14500553 ] Jeremy W. Sherman commented on THRIFT-3100: --- The tests and Travis output definitely gave me a false sense of security when hacking on the Cocoa library, because it wasn't clear to me till after I'd introduced a bug that they weren't testing anything I'd actually touched. Is there any HACKING documentation on how to go about bringing up tests for an existing platform? I could find mentions to ensure you add some, but nothing practically about how the existing test system works and how to start a new test suite for a new platform. Implement standard Thrift test for Cocoa Key: THRIFT-3100 URL: https://issues.apache.org/jira/browse/THRIFT-3100 Project: Thrift Issue Type: Improvement Components: Cocoa - Library Reporter: Jens Geyer More than comments (THRIFT-281) we need at least an implementation of the standard Thrift test for Cocoa. Right now we do not have any tests at all for that client. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer reassigned THRIFT-3102: -- Assignee: Jens Geyer could not make check for Go Library --- Key: THRIFT-3102 URL: https://issues.apache.org/jira/browse/THRIFT-3102 Project: Thrift Issue Type: Bug Components: Go - Library Affects Versions: 0.9.2 Environment: OS: CentOS 7.1 x86_64 golang: 1.4 Reporter: Xiaoshuang LU Assignee: Jens Geyer steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {code} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {code} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {code} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-2571) Simplify cross compilation using CMake
[ https://issues.apache.org/jira/browse/THRIFT-2571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500714#comment-14500714 ] James E. King, III commented on THRIFT-2571: I used cmake to generate a build environment on Windows and see that the C++ library is disabled: {noformat}C:\Users\Jim\workspace\thrift-buildc:\Program Files (x86)\CMake\bin\c -- Parsed Thrift package version: 1.0.0-dev -- Parsed Thrift version: 1.0.0 (1.0.0) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Building with unittests -- Found FLEX: C:/cygwin64/bin/flex.exe (found version 2.5.39) -- Found BISON: c:/cygwin64/bin/bison.exe (found version 3.0.4) -- -- -- Thrift version: 1.0.0 (1.0.0) -- Thrift package version: 1.0.0-dev -- Build configuration Summary -- Build Thrift compiler: ON -- Build with unit tests: ON -- Build examples: ON -- Build Thrfit libraries: ON -- Language libraries: -- Build C++ library: OFF -- Build C (GLib) library: OFF -- Build Java library: OFF -- Library features: -- Build shared libraries: ON -- Build static libraries: ON -- Build with ZLIB support:OFF -- Build with libevent support:OFF -- Build with Qt4 support: OFF -- Build with Qt5 support: OFF -- Build with OpenSSL support: OFF -- Build with Boost thread support:OFF -- Build with C++ std::thread support: OFF -- -- -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Jim/workspace/thrift-build{noformat} Simplify cross compilation using CMake -- Key: THRIFT-2571 URL: https://issues.apache.org/jira/browse/THRIFT-2571 Project: Thrift Issue Type: Improvement Components: Compiler (General) Affects Versions: 1.0 Reporter: Pascal Bach Assignee: Henrique Mendonça Priority: Minor Fix For: 0.9.2 Using CMake would simplify cross compilation. The for example the same build script can be used to build: - Native for Linux using GCC - Native for Windows using Visual Studio - Cross compile for ARM on Linux - Cross compile for Windows form Linux using mingw32 It also makes it easy to generate project files for Eclipse or Visual Studio. h2. Some examples: {code:title=Create an eclipse project|borderStyle=solid} mkdir build_ec cd build_ec cmake -G Eclipse CDT4 - Unix Makefiles ../compiler/cpp make {code} Now open the folder build_ec using eclipse. {code:title=Create a Visual Studio project (Windows only)|borderStyle=solid} mkdir build_vs cd build_vs cmake -G Visual Studio 12 ../compiler/cpp {code} Now open the folder build_vs using Visual Studio. {code:title=Cross compile using mingw32|borderStyle=solid} mkdir build_mingw32 cd build_mingw32 cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake ../compiler/cpp make {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-2571) Simplify cross compilation using CMake
[ https://issues.apache.org/jira/browse/THRIFT-2571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500692#comment-14500692 ] James E. King, III commented on THRIFT-2571: On Windows is the only supported environment with cmake supposed to be the compiler, or is it supposed to be the compiler and C++ (and C#)? Simplify cross compilation using CMake -- Key: THRIFT-2571 URL: https://issues.apache.org/jira/browse/THRIFT-2571 Project: Thrift Issue Type: Improvement Components: Compiler (General) Affects Versions: 1.0 Reporter: Pascal Bach Assignee: Henrique Mendonça Priority: Minor Fix For: 0.9.2 Using CMake would simplify cross compilation. The for example the same build script can be used to build: - Native for Linux using GCC - Native for Windows using Visual Studio - Cross compile for ARM on Linux - Cross compile for Windows form Linux using mingw32 It also makes it easy to generate project files for Eclipse or Visual Studio. h2. Some examples: {code:title=Create an eclipse project|borderStyle=solid} mkdir build_ec cd build_ec cmake -G Eclipse CDT4 - Unix Makefiles ../compiler/cpp make {code} Now open the folder build_ec using eclipse. {code:title=Create a Visual Studio project (Windows only)|borderStyle=solid} mkdir build_vs cd build_vs cmake -G Visual Studio 12 ../compiler/cpp {code} Now open the folder build_vs using Visual Studio. {code:title=Cross compile using mingw32|borderStyle=solid} mkdir build_mingw32 cd build_mingw32 cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake ../compiler/cpp make {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-3000 .NET implementation has trouble w...
GitHub user Jens-G opened a pull request: https://github.com/apache/thrift/pull/450 THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jens-G/thrift THRIFT-3000-csharp-ipv6 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/450.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 #450 commit 407f31c83dad5b8bd8502856694e4b20ee1d4200 Author: Jens Geyer je...@apache.org Date: 2015-04-17T18:55:05Z THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-3000) .NET implementation has trouble with mixed IP modes
[ https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500793#comment-14500793 ] ASF GitHub Bot commented on THRIFT-3000: GitHub user Jens-G opened a pull request: https://github.com/apache/thrift/pull/450 THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jens-G/thrift THRIFT-3000-csharp-ipv6 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/450.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 #450 commit 407f31c83dad5b8bd8502856694e4b20ee1d4200 Author: Jens Geyer je...@apache.org Date: 2015-04-17T18:55:05Z THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 .NET implementation has trouble with mixed IP modes --- Key: THRIFT-3000 URL: https://issues.apache.org/jira/browse/THRIFT-3000 Project: Thrift Issue Type: Bug Components: C# - Library Affects Versions: 0.9.2, 0.9.3 Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 4.0 / .NET 4.5 Reporter: Tobias Mundt Assignee: Jens Geyer Priority: Minor Fix For: 0.9.3 The .NET implementation of TSocket and TServerSocket use the .NET class TcpClient and TcpListener. When creating instances of theses classes the .NET framework estabiles either an IPv4 or an IPv6 lsitener/client depending on the order of network protocols set in the control center for the network adapter. Mention that only the first type of protocol is used not both. Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 over ipv4 in windows 8 and 8.1. That means that a thrift component on a win 7 machine can not talk to the same component on a win 8 machine since they fired of different listeners. When upgrading to .NET 4.5 this can be solved by setting the DualMode=true flag on the TcpListener.Server and the TcpClient.Client sockets. Since DualMode is not supported in Mono as of February 2015. The patch can not be applied. Another possible solutions would be to get the configuration of the network protocol order manually and apply the approvriate ip protocol by hand. Yet a third possibility would by to add a parameter to the TSocket and TServerSocket constructors to let the user choose the behaviour of the TcpListener and TcpClient This problem was attmepted to be solved in the pull request https://github.com/apache/thrift/pull/377 which was rejected due to mono incompatibility -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (THRIFT-3105) C++ libthriftnb library on Windows build failure
James E. King, III created THRIFT-3105: -- Summary: C++ libthriftnb library on Windows build failure Key: THRIFT-3105 URL: https://issues.apache.org/jira/browse/THRIFT-3105 Project: Thrift Issue Type: Bug Components: C++ - Library Affects Versions: 0.9.2 Environment: Visual Studio 2010, Boost 1.53, OpenSSL 1.0.1b, libevent 2.0.22 Reporter: James E. King, III Attempted to build libthriftnb and got a build failure: {noformat}1-- Build started: Project: libthriftnb, Configuration: Debug Win32 -- 1 TNonblockingServer.cpp 1c:\users\jim\workspace\thrift\lib\cpp\src\thrift\server\tnonblockingserver.cpp(1110): error C2664: 'getsockname' : cannot convert parameter 3 from 'unsigned int *' to 'int *' 1 Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1 TEvhttpServer.cpp 1 TEvhttpClientChannel.cpp 1 Generating Code... == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3000) .NET implementation has trouble with mixed IP modes
[ https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500817#comment-14500817 ] ASF GitHub Bot commented on THRIFT-3000: Github user Jens-G closed the pull request at: https://github.com/apache/thrift/pull/450 .NET implementation has trouble with mixed IP modes --- Key: THRIFT-3000 URL: https://issues.apache.org/jira/browse/THRIFT-3000 Project: Thrift Issue Type: Bug Components: C# - Library Affects Versions: 0.9.2, 0.9.3 Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 4.0 / .NET 4.5 Reporter: Tobias Mundt Assignee: Jens Geyer Priority: Minor Fix For: 0.9.3 The .NET implementation of TSocket and TServerSocket use the .NET class TcpClient and TcpListener. When creating instances of theses classes the .NET framework estabiles either an IPv4 or an IPv6 lsitener/client depending on the order of network protocols set in the control center for the network adapter. Mention that only the first type of protocol is used not both. Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 over ipv4 in windows 8 and 8.1. That means that a thrift component on a win 7 machine can not talk to the same component on a win 8 machine since they fired of different listeners. When upgrading to .NET 4.5 this can be solved by setting the DualMode=true flag on the TcpListener.Server and the TcpClient.Client sockets. Since DualMode is not supported in Mono as of February 2015. The patch can not be applied. Another possible solutions would be to get the configuration of the network protocol order manually and apply the approvriate ip protocol by hand. Yet a third possibility would by to add a parameter to the TSocket and TServerSocket constructors to let the user choose the behaviour of the TcpListener and TcpClient This problem was attmepted to be solved in the pull request https://github.com/apache/thrift/pull/377 which was rejected due to mono incompatibility -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (THRIFT-3105) C++ libthriftnb library on Windows build failure
[ https://issues.apache.org/jira/browse/THRIFT-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James E. King, III updated THRIFT-3105: --- Description: Attempted to build libthriftnb and got a build failure: {noformat}1-- Build started: Project: libthriftnb, Configuration: Debug Win32 -- 1 TNonblockingServer.cpp 1c:\users\jim\workspace\thrift\lib\cpp\src\thrift\server\tnonblockingserver.cpp(1110): error C2664: 'getsockname' : cannot convert parameter 3 from 'unsigned int *' to 'int *' 1 Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1 TEvhttpServer.cpp 1 TEvhttpClientChannel.cpp 1 Generating Code... == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == {noformat} The type for the size should be changed to socklen_t, it is declared as unsigned int. TSocket uses this as well, and it works across platforms. was: Attempted to build libthriftnb and got a build failure: {noformat}1-- Build started: Project: libthriftnb, Configuration: Debug Win32 -- 1 TNonblockingServer.cpp 1c:\users\jim\workspace\thrift\lib\cpp\src\thrift\server\tnonblockingserver.cpp(1110): error C2664: 'getsockname' : cannot convert parameter 3 from 'unsigned int *' to 'int *' 1 Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1 TEvhttpServer.cpp 1 TEvhttpClientChannel.cpp 1 Generating Code... == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == {noformat} C++ libthriftnb library on Windows build failure Key: THRIFT-3105 URL: https://issues.apache.org/jira/browse/THRIFT-3105 Project: Thrift Issue Type: Bug Components: C++ - Library Affects Versions: 0.9.2 Environment: Visual Studio 2010, Boost 1.53, OpenSSL 1.0.1b, libevent 2.0.22 Reporter: James E. King, III Attempted to build libthriftnb and got a build failure: {noformat}1-- Build started: Project: libthriftnb, Configuration: Debug Win32 -- 1 TNonblockingServer.cpp 1c:\users\jim\workspace\thrift\lib\cpp\src\thrift\server\tnonblockingserver.cpp(1110): error C2664: 'getsockname' : cannot convert parameter 3 from 'unsigned int *' to 'int *' 1 Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1 TEvhttpServer.cpp 1 TEvhttpClientChannel.cpp 1 Generating Code... == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == {noformat} The type for the size should be changed to socklen_t, it is declared as unsigned int. TSocket uses this as well, and it works across platforms. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500849#comment-14500849 ] ASF GitHub Bot commented on THRIFT-3102: Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/451 could not make check for Go Library --- Key: THRIFT-3102 URL: https://issues.apache.org/jira/browse/THRIFT-3102 Project: Thrift Issue Type: Bug Components: Go - Library Affects Versions: 0.9.2 Environment: OS: CentOS 7.1 x86_64 golang: 1.4 Reporter: Xiaoshuang LU Assignee: Jens Geyer Priority: Blocker steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {code} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {code} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {code} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3000) .NET implementation has trouble with mixed IP modes
[ https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500847#comment-14500847 ] ASF GitHub Bot commented on THRIFT-3000: Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/377 .NET implementation has trouble with mixed IP modes --- Key: THRIFT-3000 URL: https://issues.apache.org/jira/browse/THRIFT-3000 Project: Thrift Issue Type: Bug Components: C# - Library Affects Versions: 0.9.2, 0.9.3 Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 4.0 / .NET 4.5 Reporter: Tobias Mundt Assignee: Jens Geyer Priority: Minor Fix For: 0.9.3 The .NET implementation of TSocket and TServerSocket use the .NET class TcpClient and TcpListener. When creating instances of theses classes the .NET framework estabiles either an IPv4 or an IPv6 lsitener/client depending on the order of network protocols set in the control center for the network adapter. Mention that only the first type of protocol is used not both. Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 over ipv4 in windows 8 and 8.1. That means that a thrift component on a win 7 machine can not talk to the same component on a win 8 machine since they fired of different listeners. When upgrading to .NET 4.5 this can be solved by setting the DualMode=true flag on the TcpListener.Server and the TcpClient.Client sockets. Since DualMode is not supported in Mono as of February 2015. The patch can not be applied. Another possible solutions would be to get the configuration of the network protocol order manually and apply the approvriate ip protocol by hand. Yet a third possibility would by to add a parameter to the TSocket and TServerSocket constructors to let the user choose the behaviour of the TcpListener and TcpClient This problem was attmepted to be solved in the pull request https://github.com/apache/thrift/pull/377 which was rejected due to mono incompatibility -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3000) .NET implementation has trouble with mixed IP modes
[ https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500848#comment-14500848 ] ASF GitHub Bot commented on THRIFT-3000: Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/452 .NET implementation has trouble with mixed IP modes --- Key: THRIFT-3000 URL: https://issues.apache.org/jira/browse/THRIFT-3000 Project: Thrift Issue Type: Bug Components: C# - Library Affects Versions: 0.9.2, 0.9.3 Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 4.0 / .NET 4.5 Reporter: Tobias Mundt Assignee: Jens Geyer Priority: Minor Fix For: 0.9.3 The .NET implementation of TSocket and TServerSocket use the .NET class TcpClient and TcpListener. When creating instances of theses classes the .NET framework estabiles either an IPv4 or an IPv6 lsitener/client depending on the order of network protocols set in the control center for the network adapter. Mention that only the first type of protocol is used not both. Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 over ipv4 in windows 8 and 8.1. That means that a thrift component on a win 7 machine can not talk to the same component on a win 8 machine since they fired of different listeners. When upgrading to .NET 4.5 this can be solved by setting the DualMode=true flag on the TcpListener.Server and the TcpClient.Client sockets. Since DualMode is not supported in Mono as of February 2015. The patch can not be applied. Another possible solutions would be to get the configuration of the network protocol order manually and apply the approvriate ip protocol by hand. Yet a third possibility would by to add a parameter to the TSocket and TServerSocket constructors to let the user choose the behaviour of the TcpListener and TcpClient This problem was attmepted to be solved in the pull request https://github.com/apache/thrift/pull/377 which was rejected due to mono incompatibility -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-3000: Issue with IPv6 an IPv4 on windo...
Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/377 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Resolved] (THRIFT-3000) .NET implementation has trouble with mixed IP modes
[ https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer resolved THRIFT-3000. Resolution: Fixed Modified to successfully build on Linux + committed. This commit effectively establishes .NET 4.5 as a requirement for C#. Trying to build the C# lib for earlier .NET versions *will fail*. If that turns out to become a problem we should address this with a subsequent ticket. .NET implementation has trouble with mixed IP modes --- Key: THRIFT-3000 URL: https://issues.apache.org/jira/browse/THRIFT-3000 Project: Thrift Issue Type: Bug Components: C# - Library Affects Versions: 0.9.2, 0.9.3 Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 4.0 / .NET 4.5 Reporter: Tobias Mundt Assignee: Jens Geyer Priority: Minor Fix For: 0.9.3 The .NET implementation of TSocket and TServerSocket use the .NET class TcpClient and TcpListener. When creating instances of theses classes the .NET framework estabiles either an IPv4 or an IPv6 lsitener/client depending on the order of network protocols set in the control center for the network adapter. Mention that only the first type of protocol is used not both. Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 over ipv4 in windows 8 and 8.1. That means that a thrift component on a win 7 machine can not talk to the same component on a win 8 machine since they fired of different listeners. When upgrading to .NET 4.5 this can be solved by setting the DualMode=true flag on the TcpListener.Server and the TcpClient.Client sockets. Since DualMode is not supported in Mono as of February 2015. The patch can not be applied. Another possible solutions would be to get the configuration of the network protocol order manually and apply the approvriate ip protocol by hand. Yet a third possibility would by to add a parameter to the TSocket and TServerSocket constructors to let the user choose the behaviour of the TcpListener and TcpClient This problem was attmepted to be solved in the pull request https://github.com/apache/thrift/pull/377 which was rejected due to mono incompatibility -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer resolved THRIFT-3102. Resolution: Fixed Fix Version/s: 0.9.3 Committed. This leaves us with some warnings, however fixes the build issue: {code} sh: gofmt: Command not found. WARNING - Running 'gofmt -w gopath/src///some/file.go' failed. {code} could not make check for Go Library --- Key: THRIFT-3102 URL: https://issues.apache.org/jira/browse/THRIFT-3102 Project: Thrift Issue Type: Bug Components: Go - Library Affects Versions: 0.9.2 Environment: OS: CentOS 7.1 x86_64 golang: 1.4 Reporter: Xiaoshuang LU Assignee: Jens Geyer Priority: Blocker Fix For: 0.9.3 steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {code} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {code} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {code} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
C# .NET framework minimum version?
Hi *, the question raised what we should support as the minimum version for .NET with C#. Before THRIFT-3000 all projects were set to Framework 3.5. I’ve checked the mono support and found that 4.5 seems to be available since 3.0.0, at least that is what I read from the release notes. The question is, whether we can safely assume 4.5 as a given and make it mandatory, or whether we need to support at least 4.0 or still 3.5 with Thrift 0.9.3. Thank you + have fun, JensG
[GitHub] thrift pull request: THRIFT-3000 .NET implementation has trouble w...
GitHub user Jens-G opened a pull request: https://github.com/apache/thrift/pull/452 THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jens-G/thrift THRIFT-3000-csharp-ipv6 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/452.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 #452 commit af5f3e6052cb9d14b998d36ea7291a92e598c565 Author: Jens Geyer je...@apache.org Date: 2015-04-17T18:55:05Z THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500818#comment-14500818 ] ASF GitHub Bot commented on THRIFT-3102: GitHub user Jens-G opened a pull request: https://github.com/apache/thrift/pull/451 THRIFT-3102 could not make check for Go Library Client: Go Patch: Jens Geyer You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jens-G/thrift THRIFT-3102-make-check-go-fails Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/451.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 #451 commit b3dd7d8bb31ea767f5eaba24151ed3f14fb61be7 Author: Jens Geyer je...@apache.org Date: 2015-04-17T21:33:48Z THRIFT-3102 could not make check for Go Library Client: Go Patch: Jens Geyer could not make check for Go Library --- Key: THRIFT-3102 URL: https://issues.apache.org/jira/browse/THRIFT-3102 Project: Thrift Issue Type: Bug Components: Go - Library Affects Versions: 0.9.2 Environment: OS: CentOS 7.1 x86_64 golang: 1.4 Reporter: Xiaoshuang LU Assignee: Jens Geyer steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {code} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {code} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {code} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request: THRIFT-3000 .NET implementation has trouble w...
Github user Jens-G closed the pull request at: https://github.com/apache/thrift/pull/450 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] thrift pull request: THRIFT-3105 fix TNonBlockingServer build for ...
GitHub user jeking3 opened a pull request: https://github.com/apache/thrift/pull/453 THRIFT-3105 fix TNonBlockingServer build for libthriftnb library on windows You can merge this pull request into a Git repository by running: $ git pull https://github.com/jeking3/thrift bugfix/THRIFT-3105-win-libcpp-build-error Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/453.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 #453 commit 0ffbb4336b6174efbdf89462e4671325f174d4f0 Author: Jim King jim.k...@simplivity.com Date: 2015-04-17T22:42:00Z THRIFT-3105 fix TNonBlockingServer build for libthriftnb library on windows --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-2877) Optimize generated hashCode
[ https://issues.apache.org/jira/browse/THRIFT-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500837#comment-14500837 ] ASF GitHub Bot commented on THRIFT-2877: Github user roshan commented on the pull request: https://github.com/apache/thrift/pull/448#issuecomment-94090889 Ah, I used Java 8 only methods. I'll fix this and reopen later. Optimize generated hashCode --- Key: THRIFT-2877 URL: https://issues.apache.org/jira/browse/THRIFT-2877 Project: Thrift Issue Type: Improvement Components: Java - Compiler Affects Versions: 0.9.3 Reporter: Mike Rettig Priority: Critical The generated java hashCode method allocates an ArrayList then appends the fields to the list. Primitive fields will be boxed when added to the list. The generated code shouldn't allocate a list or box primitives. The hashCode can be calculated by using a primitive int and some static utility methods which can return the hashCode for each type. out indent() @Override endl indent() public int hashCode() { endl; 1839 indent_up(); 1840 indent(out) ListObject list = new ArrayListObject(); endl; 1841 1842 for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { 1843 out endl; 1844 1845 t_type* t = get_true_type((*m_iter)-get_type()); 1846 bool is_optional = (*m_iter)-get_req() == t_field::T_OPTIONAL; 1847 bool can_be_null = type_can_be_null(t); 1848 string name = (*m_iter)-get_name(); 1849 1850 string present = true; 1851 1852 if (is_optional || can_be_null) { 1853 present += ( + generate_isset_check(*m_iter) + ); 1854 } 1855 1856 indent(out) boolean present_ name = present ; endl; 1857 indent(out) list.add(present_ name ); endl; 1858 indent(out) if (present_ name ) endl; 1859 if (t-is_enum()) { 1860 indent(out)list.add( name .getValue()); endl; 1861 } else { 1862 indent(out)list.add( name ); endl; 1863 } 1864 } 1865 1866 out endl; 1867 indent(out) return list.hashCode(); endl; 1868 indent_down(); 1869 indent(out) } endl endl; 1870 } -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-2441) Cannot shutdown TThreadedServer when clients are still connected
[ https://issues.apache.org/jira/browse/THRIFT-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500841#comment-14500841 ] James E. King, III commented on THRIFT-2441: I have the thrift compiler built by using cmake, and the thrift C++ library built using the canned solution (this should be moved to cmake as soon as possible!). I ran into THRIFT-3105 during this process, but now I have the compiler and libraries built. I don't see a windows project for the tests anywhere however. Is there one? If not, then I'm not sure what additional tests folks would like me to run before this can be committed? Cannot shutdown TThreadedServer when clients are still connected Key: THRIFT-2441 URL: https://issues.apache.org/jira/browse/THRIFT-2441 Project: Thrift Issue Type: Bug Components: C++ - Library Affects Versions: 0.9.1 Reporter: Chris Stylianou Assignee: Ben Craig Attachments: THRIFT-2441-prelim.patch When calling stop() on the TThreadedServer no interrupts are sent to the client threads. This means the stop() call blocks on tasksMonitor.wait() until all client naturally disconnect. How can we tell the client thread connections to close/exit during the TThreadedServer::stop() call? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3000) .NET implementation has trouble with mixed IP modes
[ https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500819#comment-14500819 ] ASF GitHub Bot commented on THRIFT-3000: GitHub user Jens-G opened a pull request: https://github.com/apache/thrift/pull/452 THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jens-G/thrift THRIFT-3000-csharp-ipv6 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/452.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 #452 commit af5f3e6052cb9d14b998d36ea7291a92e598c565 Author: Jens Geyer je...@apache.org Date: 2015-04-17T18:55:05Z THRIFT-3000 .NET implementation has trouble with mixed IP modes Client: C# Patch: sharpdevel icode666@github Jens Geyer TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before. When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to establish IPv6 sockets before they fallback to IPv4 .NET implementation has trouble with mixed IP modes --- Key: THRIFT-3000 URL: https://issues.apache.org/jira/browse/THRIFT-3000 Project: Thrift Issue Type: Bug Components: C# - Library Affects Versions: 0.9.2, 0.9.3 Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 4.0 / .NET 4.5 Reporter: Tobias Mundt Assignee: Jens Geyer Priority: Minor Fix For: 0.9.3 The .NET implementation of TSocket and TServerSocket use the .NET class TcpClient and TcpListener. When creating instances of theses classes the .NET framework estabiles either an IPv4 or an IPv6 lsitener/client depending on the order of network protocols set in the control center for the network adapter. Mention that only the first type of protocol is used not both. Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 over ipv4 in windows 8 and 8.1. That means that a thrift component on a win 7 machine can not talk to the same component on a win 8 machine since they fired of different listeners. When upgrading to .NET 4.5 this can be solved by setting the DualMode=true flag on the TcpListener.Server and the TcpClient.Client sockets. Since DualMode is not supported in Mono as of February 2015. The patch can not be applied. Another possible solutions would be to get the configuration of the network protocol order manually and apply the approvriate ip protocol by hand. Yet a third possibility would by to add a parameter to the TSocket and TServerSocket constructors to let the user choose the behaviour of the TcpListener and TcpClient This problem was attmepted to be solved in the pull request https://github.com/apache/thrift/pull/377 which was rejected due to mono incompatibility -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3102) could not make check for Go Library
[ https://issues.apache.org/jira/browse/THRIFT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500893#comment-14500893 ] Hudson commented on THRIFT-3102: SUCCESS: Integrated in Thrift #1513 (See [https://builds.apache.org/job/Thrift/1513/]) THRIFT-3102 could not make check for Go Library (jensg: rev 9f74f32ac88d29c8c9d0064d163a3135276d6756) * lib/go/test/Makefile.am could not make check for Go Library --- Key: THRIFT-3102 URL: https://issues.apache.org/jira/browse/THRIFT-3102 Project: Thrift Issue Type: Bug Components: Go - Library Affects Versions: 0.9.2 Environment: OS: CentOS 7.1 x86_64 golang: 1.4 Reporter: Xiaoshuang LU Assignee: Jens Geyer Priority: Blocker Fix For: 0.9.3 steps to reproduce 1. ./bootstrap.sh 2. ./configure --with-boost=/software/boost_1_57_0 --prefix=/home/username/software/thrift-master --with-libevent=/software/libevent-2.0.22 --without-qt4 --without-qt5 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --with-go --without-haxe --without-d --without-cpp 3. make 4. make check {code} grep -v list.*map.*list.*map ../../../test/ThriftTest.thrift | grep -v 'setInsanity' ThriftTest.thrift ../../../compiler/cpp/thrift -r IncludesTest.thrift No output language(s) specified Usage: thrift [options] file Use thrift -help for a list of options make[3]: *** [gopath] Error 1 {code} make check still does not work even after I modify lib/go/test/Makefile.am (adding --gen go). {code} GOPATH=`pwd`/gopath /software/go-1.4/bin/go build \ includestest \ binarykeytest \ servicestest \ typedeffieldtest \ refannotationfieldstest \ errortest \ namestest \ initialismstest can't load package: package includestest: cannot find package includestest in any of: /software/go-1.4/src/includestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/includestest (from $GOPATH) can't load package: package binarykeytest: cannot find package binarykeytest in any of: /software/go-1.4/src/binarykeytest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/binarykeytest (from $GOPATH) can't load package: package servicestest: cannot find package servicestest in any of: /software/go-1.4/src/servicestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/servicestest (from $GOPATH) can't load package: package typedeffieldtest: cannot find package typedeffieldtest in any of: /software/go-1.4/src/typedeffieldtest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/typedeffieldtest (from $GOPATH) can't load package: package refannotationfieldstest: cannot find package refannotationfieldstest in any of: /software/go-1.4/src/refannotationfieldstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/refannotationfieldstest (from $GOPATH) can't load package: package errortest: cannot find package errortest in any of: /software/go-1.4/src/errortest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/errortest (from $GOPATH) can't load package: package namestest: cannot find package namestest in any of: /software/go-1.4/src/namestest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/namestest (from $GOPATH) can't load package: package initialismstest: cannot find package initialismstest in any of: /software/go-1.4/src/initialismstest (from $GOROOT) ~/workshop/thrift-go/lib/go/test/gopath/src/initialismstest (from $GOPATH) make[3]: *** [check] Error 1 {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3000) .NET implementation has trouble with mixed IP modes
[ https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500892#comment-14500892 ] Hudson commented on THRIFT-3000: SUCCESS: Integrated in Thrift #1513 (See [https://builds.apache.org/job/Thrift/1513/]) THRIFT-3000 .NET implementation has trouble with mixed IP modes (jensg: rev 018c1b8f77e7d69da61014437d5f04fedbaad81d) * lib/csharp/src/Transport/TTLSServerSocket.cs * lib/csharp/src/Transport/TTLSSocket.cs * lib/csharp/src/Transport/TTransport.cs * configure.ac * lib/csharp/test/ThriftTest/ThriftTest.csproj * lib/csharp/src/Thrift.csproj * lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj * lib/csharp/src/Transport/TServerTransport.cs * lib/csharp/Makefile.am * lib/csharp/test/ThriftTest/TestClient.cs * lib/csharp/src/Transport/TSocket.cs * lib/csharp/test/Multiplex/Client/MultiplexClient.csproj * lib/csharp/src/Transport/TServerSocket.cs * lib/csharp/test/Multiplex/Server/MultiplexServer.csproj * lib/csharp/src/Transport/TSocketVersionizer.cs .NET implementation has trouble with mixed IP modes --- Key: THRIFT-3000 URL: https://issues.apache.org/jira/browse/THRIFT-3000 Project: Thrift Issue Type: Bug Components: C# - Library Affects Versions: 0.9.2, 0.9.3 Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 4.0 / .NET 4.5 Reporter: Tobias Mundt Assignee: Jens Geyer Priority: Minor Fix For: 0.9.3 The .NET implementation of TSocket and TServerSocket use the .NET class TcpClient and TcpListener. When creating instances of theses classes the .NET framework estabiles either an IPv4 or an IPv6 lsitener/client depending on the order of network protocols set in the control center for the network adapter. Mention that only the first type of protocol is used not both. Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 over ipv4 in windows 8 and 8.1. That means that a thrift component on a win 7 machine can not talk to the same component on a win 8 machine since they fired of different listeners. When upgrading to .NET 4.5 this can be solved by setting the DualMode=true flag on the TcpListener.Server and the TcpClient.Client sockets. Since DualMode is not supported in Mono as of February 2015. The patch can not be applied. Another possible solutions would be to get the configuration of the network protocol order manually and apply the approvriate ip protocol by hand. Yet a third possibility would by to add a parameter to the TSocket and TServerSocket constructors to let the user choose the behaviour of the TcpListener and TcpClient This problem was attmepted to be solved in the pull request https://github.com/apache/thrift/pull/377 which was rejected due to mono incompatibility -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (THRIFT-3090) cmake build is broken
[ https://issues.apache.org/jira/browse/THRIFT-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500032#comment-14500032 ] Marco Molteni edited comment on THRIFT-3090 at 4/17/15 3:31 PM: Updated pull request https://github.com/apache/thrift/pull/434. Kept as small as possible, and enables the build on MacOSX :-) The MacOSX linker wants to resolve all symbols at shared library creation time, while the Linux and FreeBSD linkers are happy to delay resolving until linking an executable with the given shared library. Although it might be possible to ask the MacOSX linker to behave like the FreeBSD one (both are using Clang), I don't see a problem in providing all symbols at shared library creation time. Regarding the {{RPATH}}, it is not needed to allow be build to succeed (although it is needed at runtime once the Thrift libraries are installed). I will post another pull request to enable it for MacOSX. h4. thriftnb {noformat} Linking CXX shared library ../libthriftnb.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++11 -O2 -Wall -Wextra -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.0.0 -install_name /Users/mmolteni/src/thrift.marco.hggit/thebuild/lib/libthriftnb.1.0.0.dylib -o ../libthriftnb.1.0.0.dylib CMakeFiles/thriftnb.dir/src/thrift/server/TNonblockingServer.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TAsyncProtocolProcessor.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TEvhttpServer.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TEvhttpClientChannel.cpp.o /opt/local/lib/libssl.dylib /opt/local/lib/libcrypto.dylib -lpthread /opt/local/lib/libevent.dylib Undefined symbols for architecture x86_64: apache::thrift::concurrency::PosixThreadFactory::PosixThreadFactory(apache::thrift::concurrency::PosixThreadFactory::POLICY, apache::thrift::concurrency::PosixThreadFactory::PRIORITY, int, bool), referenced from: apache::thrift::server::TNonblockingServer::registerEvents(event_base*) in TNonblockingServer.cpp.o {noformat} h4. thriftqt {noformat} Linking CXX shared library ../libthriftqt.dylib Undefined symbols for architecture x86_64: apache::thrift::TOutput::strerror_s(int), referenced from: apache::thrift::transport::TTransportException::TTransportException(apache::thrift::transport::TTransportException::TTransportExceptionType, std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const, int) in TQIODeviceTransport.cpp.o {noformat} h4. thriftz {noformat} Linking CXX shared library ../libthriftz.dylib Undefined symbols for architecture x86_64: apache::thrift::GlobalOutput, referenced from: apache::thrift::transport::TZlibTransport::initZlib() in TZlibTransport.cpp.o {noformat} was (Author: marco.molteni): Updated pull request https://github.com/apache/thrift/pull/434. Kept as small as possible, and enables the build on MacOSX :-) The MacOSX linker wants to resolve all symbols at shared library creation time, while the Linux and FreeBSD linkers are happy to delay resolving until linking an executable with the given shared library. Although it might be possible to ask the MacOSX linker to behave like the FreeBSD one (both are using Clang), I don't see a problem in providing all symbols at shared library creation time. h4. thriftnb {noformat} Linking CXX shared library ../libthriftnb.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++11 -O2 -Wall -Wextra -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.0.0 -install_name /Users/mmolteni/src/thrift.marco.hggit/thebuild/lib/libthriftnb.1.0.0.dylib -o ../libthriftnb.1.0.0.dylib CMakeFiles/thriftnb.dir/src/thrift/server/TNonblockingServer.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TAsyncProtocolProcessor.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TEvhttpServer.cpp.o CMakeFiles/thriftnb.dir/src/thrift/async/TEvhttpClientChannel.cpp.o /opt/local/lib/libssl.dylib /opt/local/lib/libcrypto.dylib -lpthread /opt/local/lib/libevent.dylib Undefined symbols for architecture x86_64: apache::thrift::concurrency::PosixThreadFactory::PosixThreadFactory(apache::thrift::concurrency::PosixThreadFactory::POLICY, apache::thrift::concurrency::PosixThreadFactory::PRIORITY, int, bool), referenced from: apache::thrift::server::TNonblockingServer::registerEvents(event_base*) in TNonblockingServer.cpp.o {noformat} h4. thriftqt {noformat} Linking CXX shared library ../libthriftqt.dylib Undefined symbols for architecture x86_64: apache::thrift::TOutput::strerror_s(int), referenced from:
[jira] [Commented] (THRIFT-3103) cmake is missing RPATH on MacOSX
[ https://issues.apache.org/jira/browse/THRIFT-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14500068#comment-14500068 ] ASF GitHub Bot commented on THRIFT-3103: GitHub user marco-m opened a pull request: https://github.com/apache/thrift/pull/449 Thrift 3103 See https://issues.apache.org/jira/browse/THRIFT-3103 You can merge this pull request into a Git repository by running: $ git pull https://github.com/marco-m/thrift THRIFT-3103 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/449.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 #449 commit fe299785ad3971b076cd3c5a160d916e4b488bca Author: Marco Molteni marco.molt...@laposte.net Date: 2015-04-17T08:18:35Z THRIFT-3090 cmake build is broken on MacOSX. commit 29b1304d663b4a8344ad1d681752ecd48c32351a Author: Marco Molteni marco.molt...@laposte.net Date: 2015-04-17T11:48:36Z THRIFT-3103 cmake is missing RPATH on MacOSX. cmake is missing RPATH on MacOSX Key: THRIFT-3103 URL: https://issues.apache.org/jira/browse/THRIFT-3103 Project: Thrift Issue Type: Bug Affects Versions: 1.0 Environment: MacOSX specific Reporter: Marco Molteni The Thrift CMakefiles do not enable RPATH handling for MacOSX. This means that if the Thrift shared libraries are installed in a non-system directory (i.e. a directory not known by the dynamic linker), any executable linked against them will fail to run, unless the {{DYLD_LIBRARY_PATH}} environment variable (Unix equivalent: {{LD_LIBRARY_PATH}}) is set to the appropriate value. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-2441) Cannot shutdown TThreadedServer when clients are still connected
[ https://issues.apache.org/jira/browse/THRIFT-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14501092#comment-14501092 ] James E. King, III commented on THRIFT-2441: I got a little further using the development tip and cmake 3.2.2 on Windows. I build boost-1.58 and got libevent, zlib, openssl built and found by the cmake build environment. I guess if I keep going I can run tests, so I will do that. Right now I'm running into multiply defined boost symbols at link time. The static and dynamic boost libraries seem to be linking into libthrift even though I specifically did a cmake with -DWITH_STATIC_LIB=OFF. Cannot shutdown TThreadedServer when clients are still connected Key: THRIFT-2441 URL: https://issues.apache.org/jira/browse/THRIFT-2441 Project: Thrift Issue Type: Bug Components: C++ - Library Affects Versions: 0.9.1 Reporter: Chris Stylianou Assignee: Ben Craig Attachments: THRIFT-2441-prelim.patch When calling stop() on the TThreadedServer no interrupts are sent to the client threads. This means the stop() call blocks on tasksMonitor.wait() until all client naturally disconnect. How can we tell the client thread connections to close/exit during the TThreadedServer::stop() call? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
method names sent as strings
Thrift dev, I was wondering why the decision was made to serialize method names as strings. A helpful thrifter on IRC (JensG) pointed me to https://thrift.apache.org/static/files/thrift-20070401.pdf, which states that hashing method names was considered, but was found to be problematic. I can't argue with that, but I do wonder why we can't simply tag each method with a : 1, : 2, etc. like we do with struct members and method arguments. I've also been using service multiplexing and noticed that service names are sent as strings with each method call as well. It would seem that tagging services with integers could be a good feature as well, given that varint encoding would then take the (service name, method name) tuple down to two bytes in many cases. The reason I ask is that I'm using thrift over BLE (bluetooth low energy), so my MTUs are small enough that a few extra bytes leads to extra packets, which increases latency. Thanks, David