-
Notifications
You must be signed in to change notification settings - Fork 65
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
Uno Platform Support #121
base: master
Are you sure you want to change the base?
Uno Platform Support #121
Conversation
@Happypig375 Does not build properly yet, need to resolve some WASM issues, plus add some samples :-) |
I read through the list of changed files.
This is definitely a valuable spike if only to test that CSharpMath works with Uno. Main issue with merging IMO is
The aim of this PR, as clarified in the linked issue, is to allow usage from CSharpMath in a way that doesn't require writing the 10 lines of code needed to interface with CSharpMath.SkiaSharp. Adding 3400 lines to the repo in order to save perhaps 1-3 end-users having to write 10 lines of code each doesn't seem like good arithmetic to me. If there were hundreds of projects dependent on CSharpMath it would be a different story. An ultra-clean extreme would be: it's SkiaSharp's responsibility to show people how to install a SkiaSharp view in any .net platform, and CSharpMath's responsibility to inject manage latex rendering in this view: then we'd only need to maintain one example project. |
@charlesroddie Most of it is for an example project. It is a |
Understood that it is example projects but example projects still take maintenance (e.g. having to make updates, and adding to build times for the solution). As mentioned the my paragraph it doesn't need to be CSharpMath's responsibility to maintain a lot of example projects and have them build and work. |
@charlesroddie so the suggestion would be to remove the example project or to create a completely separate repository for Uno support? Most of the added code are the samples, which are helpful, but I can provide them separately in my own repo if they do not fit here well. The goal of the SkiaSharp.Wasm going forward is to be the official first-party solution for WebAssembly (not just Uno specific) |
@charlesroddie Not really. Each platform make minimal breaking changes and maintenance is low-cost. Build times of one front end do not affect other front ends. |
@MartinZikmund I don't like separating repos after what I saw with https://github.com/oxyplot: repos other than the main one get little maintenance. |
First party support is better, but if you preferred not to have here directly, I would create a Uno fork separately (this was my original plan, until I noticed Uno was among the ideas for a future update) |
As long as we don't require platform example builds to succeed for PRs, and for @Happypig375 and @MartinZikmund to maintain the additional projects then it's OK for then another examples project can go through. We'll definitely need to tidy up the repo - inlcuding creating a folder structure for examples, platforms, etc.. And creating a solution without the peripheral projects would be a good idea too. My note on CSharpMath.SkiaSharp.Wasm should be addressed as even if
, it's not at the moment as is clear from the naming, and when it becomes official it would probably be merged into SkiaSharp anyway so that part of this PR would be deleted at that point. |
Why? The whole solution should be buildable, updates should come in via PRs. |
It could hold back PRs. Currently you are fast at fixing issues so not a problem if you are happy to fix PRs where any online builds are failing. But contributors shouldn't have to have all the build tooling needed to build all the example platforms, so should not be expected to confirm that the entire solution builds if it contains all of these. |
If they can't build all the platforms, then PR checks will do it for them. The errors are publicly visible. |
@MartinZikmund at this point, building on GitHub actions or Azure Devops using a WebAssembly dependencies (Uno.SkiaSharp being one) is not supported. The only way to create a valid binary in CI is to use this docker image I've made a change in the bootstrapper to provide the ability to get non-failing windows builds (unoplatform/Uno.Wasm.Bootstrap#216), but the resulting binary will be invalid, as the WebAssembly static linking step will be disabled. In your case, once the bootstrapper PR will be published, you'll need to add the following: <WasmShellForceDisableWSL Condition="'$(CI)'=='true'">true</WasmShellForceDisableWSL> using the GitHub actions default variables. This will allow you to make your Windows build pass, and add another job that will run on Linux to have a proper application. |
@charlesroddie Indeed, |
@jeromelaban I am getting the issue I mentioned when building locally as well, is there something I am missing to get it working there? Thanks :-) |
If you're getting this error locally, it means you have not setup WSL. You can set it up using this. |
Would support for just UWP (not tested on Uno Platform) be helpful? |
Uno runs on UWP just fine. What's the problem? |
What I mean to ask is if |
There was never a |
I know, I've just started working on it. |
You can probably just reference |
Sorry for the delay on commits, I am currently slowed down with several other commitments, but I will definitely get back to this :-) |
2185c89
to
ca1dbdd
Compare
@Happypig375 @charlesroddie What about putting the sample projects in a separate solution (under |
I suggest waiting for MSBuild 16.7 and using a solution filter: dotnet/msbuild#4097 |
So far I have found out one blocker - the controls in CsharpMath.XAML use |
@MartinZikmund You can apply breaking changes to |
@MartinZikmund Visual Studio 16.7 has been out and I think Solution Filters can be tried. |
I'm finally back to this PR, so I will be rebasing this and fixing the problems. SkiaSharp now has first-party support for Uno, so that will be part of the changes as well. |
Started bringing this up to date, now includes macOS support, will wait a while before the SkiaSharp Uno 3.0 update is on NuGet too (mono/SkiaSharp#1489). |
4a4a40d
to
114bfce
Compare
Support for Uno Platform/non-XF UWP
Draft for #120
TODOs:
float
->double
dependency properties