You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by aloneguid <gi...@git.apache.org> on 2017/09/12 14:57:59 UTC

[GitHub] thrift pull request #1355: Minimal C# library version for .NET Standard 1.4,...

GitHub user aloneguid opened a pull request:

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

    Minimal C# library version for .NET Standard 1.4, 1.6, .NET 4.5.1

    This adds another project type to C# library which allows it to be build for .NET Standard 1.4, 1.6 and .NET 4.5.1. The project turns off all dependencies (only the new project, existing ones are untouched) to build the core thrift library.

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

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

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

    https://github.com/apache/thrift/pull/1355.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 #1355
    
----
commit 6f46cdd2379eaf128108f5caad731ceb30e352d0
Author: Ivan Gavryliuk <iv...@outlook.com>
Date:   2017-09-12T14:52:41Z

    Create a minimal C# library version for .NET Standard 1.4, 1.6 and .NET 4.5.1

----


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by gideonkorir <gi...@git.apache.org>.
Github user gideonkorir commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    I'm also interested in a .net core lib can we upgrade the netcore project to netstandard?


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by aloneguid <gi...@git.apache.org>.
Github user aloneguid commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    I'm more than happy to do that. @Jens-G in .net ecosystem nuget package manager is quite popular, do you have any guidance how we can automatically publish this as you do with Maven?


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by gideonkorir <gi...@git.apache.org>.
Github user gideonkorir commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    @jeking3 netstandard 2.0 only targets .net framework 461 and .net core 2.0 only [see](https://github.com/dotnet/standard/blob/master/docs/versions.md). Targeting 1.1 targets a bigger audience also I think (unless I got you wrong) there is a difference between netstandard (which is a versioned set of APIs) and .net core (with is the cross platform runtime). 


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by aloneguid <gi...@git.apache.org>.
Github user aloneguid commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    @gideonkorir 1.1 is fine unless we hit some limitations. Generally 1.4 is the "safe" version of .net standard, which can be  used on embedded devices, clusters, desktops etc. However, it's not compatible with .NET 4.5, which by itself reached end of support stage, and is a pain in the neck in terms of security and compatibility. If you need to support .NET 4.5 it's generally better to cross-compile to .net standard and .net 4.5 instead of just targeting .net standard, currently I do this in https://github.com/elastacloud/parquet-dotnet


---

[GitHub] thrift pull request #1355: Minimal C# library version for .NET Standard 1.4,...

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1355#discussion_r138436653
  
    --- Diff: lib/csharp/src/Thrift.sln ---
    @@ -1,6 +1,8 @@
     
    -Microsoft Visual Studio Solution File, Format Version 11.00
    -# Visual Studio 2010
    +Microsoft Visual Studio Solution File, Format Version 12.00
    +# Visual Studio 15
    --- End diff --
    
    Note that sometime in the future we're going to remove all provided static solution files and rely solely on project creation that comes with cmake, at which point you'll pick what you want at cmake generation time.


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by aloneguid <gi...@git.apache.org>.
Github user aloneguid commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    @Jens-G THRIFTCORE is a simple pre-processor directive which when set excludes files which require dependency on external libraries in .NET Standard, essentially producing a minimal library of Thrift.
    
    At the moment you have csharp library for .NET 3.5 and 4.5. Then, there is another library for .NET Core which to be honest is completely useless as it downloads so many dependencies that it's impossible to use in any web project as they quickly become conflicting. Ideally there must be just one single .NET project which cross-compiles to both .NET classic and .NET Standard. There is no need for .NET Core as .NET Standard covers it (is it maybe coming from misunderstanding of library creators in differences between .net core and .net standard?).
    
    All I'm adding is a new project referencing all existing files. The project simply excludes stuff which is not covered by least common denominator of .NET Standard 1.4, 1.6 and .NET 4.5, but allows you to use Thrift on any device. This can be carefully extended further to support all Thrift features. however it's more complicated with .NET Standard as unlike .NET it doesn't have all socketing, networking etc. built in and needs external references.
    
    I would suggest though having 1 main package with core functionality as I just did, and adding more libraries which implement specific features (sockets, web http etc.) as they require specific dependencies.


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by aloneguid <gi...@git.apache.org>.
Github user aloneguid commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    @gideonkorir from what I can see .net core lib was created in times when .net core was in early stages, has some classes renamed and doesn't align with existing csharp project. There is no need to have that library, just cross-compile csharp library with modern .net core sdk.


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    What is THRIFTCORE? Is this intended tom become another netcore library? What about the existing one? Please explain.


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by gideonkorir <gi...@git.apache.org>.
Github user gideonkorir commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    @aloneguid I actually need 1.4 so if  the rest of the guys here agree then we can target 1.4 as the minumum. I suggested 1.1 do that you wouldn't need to cross compile


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    Is there a Jira ticket for this work?
    https://thrift.apache.org/docs/HowToContribute


---

[GitHub] thrift pull request #1355: Minimal C# library version for .NET Standard 1.4,...

Posted by aloneguid <gi...@git.apache.org>.
Github user aloneguid commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1355#discussion_r138439390
  
    --- Diff: lib/csharp/src/Thrift.sln ---
    @@ -1,6 +1,8 @@
     
    -Microsoft Visual Studio Solution File, Format Version 11.00
    -# Visual Studio 2010
    +Microsoft Visual Studio Solution File, Format Version 12.00
    +# Visual Studio 15
    --- End diff --
    
    is there any strong reason for this?


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    Jake does that.


---

[GitHub] thrift pull request #1355: Minimal C# library version for .NET Standard 1.4,...

Posted by aloneguid <gi...@git.apache.org>.
Github user aloneguid closed the pull request at:

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


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    I'm fine with combining both flavours into one single c# library etc, as long as you don't break the c# library. The netcore lib is quite new and there's a lot of movement so we surely can throw it out and replace it by sth else. I don't see any conflicts here. Would you say that you two guys able to do that as a team and provide a suitable PR that meets that goal? 


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by aloneguid <gi...@git.apache.org>.
Github user aloneguid commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    Sorry guys I'm giving up. Personally I think getting a real value from contributing to main repo is not worth the effort due to many showstoppers. This may be a reason why there are so many forked versions exist. I don't mean to offend anyone here.


---

[GitHub] thrift issue #1355: Minimal C# library version for .NET Standard 1.4, 1.6, ....

Posted by gideonkorir <gi...@git.apache.org>.
Github user gideonkorir commented on the issue:

    https://github.com/apache/thrift/pull/1355
  
    @aloneguid can we target [netstandard 1.1](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.1.md)? it covers .net 4.5


---