New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Core 2.1 #1650
Comments
Unit tests should be runnable, they are runnable with nunit on mono without issue. What problems are you running into? "What do we need to do about Mono support? Can we drop it if this path is chosen?" |
Hi @megakid! I've had a look at your repo, this definitely looks like promising work. .NET Core is something we've been interested in for a while, and @jageall has done a lot of work around porting (including the pre-1.0 days when attempting to build led to something like 700k build errors...) There are a few things that are important in the list of things there that I think will need more attention:
We cannot drop Mono support any time soon. Apart from the fact that it's in production in a lot of places, .NET Core does not yet appear to offer an equivalent of
We need to be able to build any commit of Event Store without relying on a third party (including NuGet) - so we need to find some way of committing all of the necessary dependencies to the repository. I don't know enough about .NET Core to know what is common practice there, but we deliberately take very few external dependencies so it shouldn't be too bad.
A large part of the work that @jageall did was to port the unit tests from NUnit to XUnit, which I still probably think is a reasonable path. They will definitely need to run via
This will need investigation as to the licensing implications. |
Thanks for looking it over- very early days but appreciate the assistance. I don’t know enough about Mono or We can definitely check in the dependencies, I’m thinking we could have a Since updating the NUnit test runner to the latest version, I’ve had more success running them within Rider & Visual Studio but it’s interesting you say converting them to xUnit as it seems much more mature in the .NET Core world. I wrote a NUnit to XUnit project converter so could run that over the test projects if that is something that would be accepted. Licensing did cross my mind when porting Sometime down the road if we’re on .NET Core, there should be some nice performance improvements waiting for us, I’m thinking in particular |
mkbundle releases a full binary (including the runtime etc)! |
Nice, |
yes its a single native binary that gets released. Try this: pull the ubuntu package of eventstore and look what gets installed. |
CoreRT is what you need to replace |
I spent half a day on Core 2.0 in parallel.. as I am looking at running it on Android. Its compiling and tests are running but a few issues.. See below.. I just spend 20min writing a new post for some help but chrome died on me, so this will be more brief, First comments on original. BK> I copied it from Mono since that was being used already. Converted all EventStore.sln csprojs to the new VS2017 format - this mean dropping < VS2017 support Fixed up FlushSafe to work across .NET Core on Windows and Full Framework builds - it seems FileStream now exposes the SafeFileHandle instead of having to use reflection to find it. Rest op not done.. https://github.com/bklooste/EventStore I got issues around http returning not found all the time looks like its around routing / httplistener which isn't the fastest area to debug.. Im comparing to @megakid atm and will keep people posted. |
"We need to be able to build any commit of Event Store without relying on a third party (including NuGet) - so we need to find some way of committing all of the necessary dependencies to the repository. I don't know enough about .NET Core to know what is common practice there, but we deliberately take very few external dependencies so it shouldn't be too bad." This is a big issue because the key concept of core is a minimal framework and delivers the rest through small nugets eg ComponentModel , System.Http , even the compiler parts (Microsoft.Csharp) etc etc - think js-npm /go / rust cargo/ C includes in a large project. What is even worse is nuget packages are no longer just dlls but have scripts they run , the good thing is it solves most of the 64bit/32 bit dll pain eg libuv . You can however build against specific versions of the nuget package but your no longer looking at 4-5 externals but a few hundred each with its own dependencies - I don't think dropping a dll and dealing with its dependencies is manageable by a person without tools.. See attached If its that critical you will need to setup your own nuget server , I have seen some companies do this ( we do it for our own stuff but we trust the Microsoft rep) Also suggest get the basics / minimal set working well before nice to haves like xunit , perf improvements, Kestrel , pulling out mono , scripts changes etc. Don't want to make it bigger than it already will be . Obviously if your most of the way with xunit |
We can still use nuget for framework dependencies (eg:micrisoft) and use a local directory for other nuget package. |
@bklooste nice work - I am happy to help out if you have a list of outstanding tasks? |
@megakid I saw your work with ServceModel it works.. The mono one I tried is less coupled just 2 files but does not work.. We can start with the ServiceModel classes and later look at the mono one. Core has tons of stuff around routing which someone will likely look at in future. @latop2604 yes you can there is only a few things outside of there but note the version you use must be compatible with the Microsoft libs you pull in..so it does mean bumping version of externals a bit more , especially initially.. I don't have a huge amount of time and a bit new to the project , but we need
|
Assuming v5 approach v1 Core Milestone- Smallest bite
v2 Core Milestone - Move key store functionality accross
v3 Core Milestone - Core release
Then we can make separate improvements .. eg
|
That smallest bite is the smallest coherent milestone I can think of it has quite a bit of risk still due to all the versions bumps ( eg small http handling and json changes ) ..but will provide a solid platform to move forward from.. note its not even using Core ( eg its net461 ) but it is using the newer msbuild tooling, project files and shared libs. You could do a bump to 4.61 first. A pull for that should not take long verifying the mono parts will be the biggest issue. A PR for v1 Core Milestone- Smallest bite would take a few hours ., |
@latop2604 CoreRT is a bit different than mkbundle ( which is just mono + code) as it removes the jit/.net its fully AOT compiled using .NET native.. To get a self contained exe like mkbundle ( sans native libs like js1.dll) See https://ianqvist.blogspot.com/2018/01/reducing-size-of-self-contained-net.html ( make 55Meg Hello world 14 Meg) . This is how you make a binary for Android as well. |
@megakid @latop2604 Thank you very much for your contributions. @bklooste Thank you very much for handling this with an open mind. |
@IvanFarkas regarding the client part, #1664 (comment) may be of interest |
Thx @bartelink. Multitarget is great. |
@megakid I think with 5.x released, this can be closed now ? |
Closing this issue in favour of #1716 |
I don't want to do a PR for this as there is clearly a lot of considerations to be discussed and debated. I spent a few hours yesterday getting a working .NET Core 2.1 build - I used Jetbrains Rider 2018.1.2 but looks to be buildable from VS2017 as well.
https://github.com/BlizardPuppet/EventStore/tree/netcore21
Some of my initial changes/observations/questions:
UrlTemplate
- Copied it verbatim from .net framework source with very small edits (e.g. delocalization of Exception messages) - probably needs a clean upprotobuf-net
2.0.X -> 2.2.X,Newtonsoft.Json
6.X -> 11.X, both didn't require any code changes)FlushSafe
to work across .NET Core on Windows and Full Framework builds - it seemsFileStream
now exposes theSafeFileHandle
instead of having to use reflection to find it.dotnet
, 1 nodenet46
- manual smoke testing passed)dotnet test
Mono
support? Can we drop it (eventually) if this path is chosen?The text was updated successfully, but these errors were encountered: