nguyenqthai / Algs4Net

A .NET library and tool to use with the Algorithms, 4th Edition textbook by Robert Sedgewick and Kevin Wayne
168 stars 57 forks source link

dotnet update? #2

Open piotrsrodka opened 1 year ago

piotrsrodka commented 1 year ago

Hello,

I was wondering if You are interested in updating from .Net 4 to dotnet 6? OR even to netstandard2.0 to be compatible with .Net 4 and dotnet6 Both are multiplatform (Linux, MacOS, Windows)

Kind regards, Piotr

nguyenqthai commented 1 year ago

Hello Piotr,

Yes, I can get an update to Net Core some time. Hopefully this year. If you already have the updated code. I can take and merge your PR.

Regards,

Thai

nguyenqthai commented 1 year ago

@piotrsrodka the new branch net-core-6-port is work-in-progress.

piotrsrodka commented 1 year ago

Hello @nguyenqthai,

Thank you for doing that, I have downloaded the branch to look at it. Looks awesome :)

I have one fix - so will PR.

nguyenqthai commented 1 year ago

Hi @piotrsrodka , you may have noticed by now that all Window-specific features are not available. WPF and Win32 are not cross-platform. Also, there are C# 10 compiler warnings. Good to know you from Poland. God bless your country and people during this time. Happy New Year.

piotrsrodka commented 1 year ago

I am using VS 17.3 with dotnet 6. When I updated to 17.4 I have noticed that it automatically switched to dotnet 7 and removed dotnet 6. After a little googling I downgraded to 17.3 and I keep it for now. I don't know if it helps in Your case, but maybe?

As for WPF and Win32 - Algs4 don't rely on them luckily.

And about C# 10 warnings, there is one easy fix - just get rid of nullable types by:

enable changed to disable - I can PR it is small fix and in this scenario better as it will be in sync with Java version of Algs4. Thank you Thai for wishes, certainly are needed. Happy New Year
piotrsrodka commented 1 year ago

Also, checked branch net-core-6-port under Linux Ubuntu 20.04 - it works :) So it is now multi platform!

nguyenqthai commented 1 year ago

Great. Thanks for the Linux test.