-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
[Feature] Refactor CKAN-core to use .NET standard 2.0 #2799
Comments
At a high level (I'll leave the .NET commentary to those with that expertise) anything that makes KSP-CKAN better will accepted, you can see more in our Developers Guide. Some things we should add to that:
On the last point, that's not to say we can't make a huge GUI/architecture change. Rather maybe put it behind a separate feature flag or different build. As in say continue to build CKAN 1 + CKAN 2 for a period of time, but those are just implementation details :-) |
Would this be platform independent? I agree with @techman83, best would be to ship both separately in the beginning. Maybe keep it even as a separate branch? Or just as separate projects.
That linked software is licensed under a customized Open Software License. That's a copyleft license:
If we use those linked commits as guide, we end up with the same problem as in #2027 (with my understanding that 'Derivative Work' only means our implementation of it, not the full CKAN project):
it's not possible at all fur us to include something licensed under OSL/VCOSL. |
The second component is a platform dependent shim. One of these would be made for each supported platform, and is responsible for starting the Xamarin.Forms GUI as well as maintaining any platform-specific quirks. I intend to just make a Xamarin.Mac project at first, but if that goes well, I will look into making a Xamarin.UWP project bringing the GUI to windows and a Xamarin.Gtk# project bringing the GUI to Linux. Adding these extra platforms should be require relatively little work after the Mac GUI is fully operational.
Furthermore, I just looked into the Mono target. Mono 4.0 supports .NET 4.5 and .NET Standard 1.1. Since .NET Standard is forward compatible, if I refactor CKAN-core for .NET Standard 1.1 instead of 2.0, this should allow the rest of the project to remain more or less unchanged, while still allowing CKAN-core to be used in Xamarin.Mac. I will do more research over the next few days to see what changes will be needed to refactor for .NET Standard 1.1 instead of 2.0, and then report back to see if it seems reasonable. |
Ohhh, I misread that, I didn't read the |
I've done some more research, and I've conclude that CKAN-core cannot be converted to .NET Standard 1.1 because .NET Standard 1.1 doesn't support several APIs CKAN uses. However, as discussed earlier, to convert CKAN-core to .NET Standard 2.0 requires relatively few changes: the Sha1 provider needs to be swapped out, and the TxFileManager classes would need to be brought into the project, as the package on NuGet does not support .NET Standard 2.0. I've found a blog post here which describes how to set up a project which can be built for both .NET Framework 4.5 and .NET Standard 2.0. Fortunately, the code linked in the blog post (https://github.com/RickStrahl/Westwind.Utilities) is MIT licensed. So, my current proposal is to modify CKAN-core so that it can be compiled both for .NET Framework 4.5, maintaining compatibility with Mono 4.0, but also allow it to be compiled for .NET Standard 2.0 so that I can use it with Xamarin.Mac. With respect to the licensing issues of https://github.com/VirtoCommerce/vc-platform-core, I will just not adapt any of the code found there. Instead, I will adapt the relevant portions from the original source at https://github.com/rsevil/Transactions, which is MIT licensed. |
I have one primary concern here, Xamarin is not and will never be usable on linux. I'm very much not in favour in moving in a direction that puts cross platform last. If the project can be cleaned up so that it will compile for .NET Standard without introducing any technical debt and has good test coverage, that would be an ok middle ground. As for the client, personally I would need convincing that producing platform specific clients are a good idea. But I'm also conscious that WinForms + Mac = Pain. |
The situation with respect to Xamarin and Linux has actually changed in the past two years. Xamarin now has a GTK# client which directly supports making GNOME GUIs. Ideally, a Xamarin GUI will allow for a native Windows, Linux, and Mac OS GUI to be made with minimal platform-specific code, which I would not describe as putting cross-platform last. However, I do acknowledge that skepticism for cross-platform products from Microsoft is well warranted, and I completely understand your concerns. |
Done in #2820. |
I am considering creating a new GUI for CKAN which is native to macOS. I would like to make the GUI using Xamarin.Mac and Xamarin.Forms. In order to compile CKAN for Xamarin.Mac, CKAN-core must be moved to .NET Standard 2.0 (instead of .NET Framework 4.5).
If I make a pull request refactoring CKAN-core, would the project be open to accepting it? Furthermore, if I were to go further and actually create the Xamarin GUI, would the project be open to accepting that as well?
I have done some preliminary work towards such a refactor already, and so my understanding is that the refactor involves the following changes:
The text was updated successfully, but these errors were encountered: