Repository navigation
docs: Update conditional code/Xaml to include Skia - #4210
Conversation
|
Thanks @robloo ! |
| | Prefix | Included platforms | Excluded platforms | Namespace | Put in `mc:Ignorable`? | | ||
| |---------------|------------------------------------|------------------------------------|-------------------------------------------------------------|------------------------| | ||
| | `win` | Windows | Android, iOS, web, macOS, Skia | `http://schemas.microsoft.com/winfx/2006/xaml/presentation` | no | | ||
| | `xamarin` | Android, iOS, web, macOS | Windows, Skia | `http:/uno.ui/xamarin` | yes | |
There was a problem hiding this comment.
Are you sure about this? The xamarin prefix includes Wasm, I would assume it also includes Skia. (Whether it should include them is another subject.)
There was a problem hiding this comment.
No, not sure about that and it was the main assumption I mentioned in other information of the PR. It doesnt make sense for Xamarin to include skia (wasm still uses mono), if that is how it is implemented I can change it though.
There was a problem hiding this comment.
Right, I didn't check the PR description properly.
I checked and the definition for "xamarin" hasn't changed, it's a blanket include that's synonymous with "not_win":
https://github.com/unoplatform/uno/blob/master/src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props#L41
You're right that it doesn't make sense that it includes Skia, and really IMO it shouldn't include Wasm either (Mono != Xamarin). It'd be a significant breaking change to adjust it, though. (And worse, a silent breaking change in many cases.)
There was a problem hiding this comment.
Yea, you're right that this doesn't make sense but needs to stay for compatibility. I'll adjust so xamarin is the same as not_win.
There was a problem hiding this comment.
I realize skia has just been released a few months ago and isn't documented yet. While we can't really fix Wasm, it is possible to fix Skia in this case to exclude it from Xamarin. If that broke any existing code it would be a very, very small amount using technically undocumented assumptions. It's kind-of now or never to fix this.
Otherwise, I made the updates so xamarin = non_win
There was a problem hiding this comment.
The problem is that 'existing code' includes Uno code that was not specifically written for Skia (or even Wasm), where xamarin was used as a synonym for 'not UWP'.
In the medium term it's just as likely that we move toward a different mechanism for conditional Xaml, in any case, because this approach is quite limited in certain use cases (eg when you want to prefix a type that's not coming from one of the default namespaces; when you want to include >1 and exclude >1 targets, eg iOS && macOS but not Android or WASM).
| | `wasm` | ✖ | ✖ | ✖ | ✔ | ✖ | ✖ | | ||
| | `macos` | ✖ | ✖ | ✖ | ✖ | ✔ | ✖ | | ||
| | `skia` | ✖ | ✖ | ✖ | ✖ | ✖ | ✔ | | ||
| | `xamarin` | ✖ | ✔ | ✔ | ✔ | ✔ | ✖ | |
GitHub Issue (If applicable): #
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Skia is excluded from condition code and Xaml docs.
What is the new behavior?
Skia is included.
PR Checklist
Please check if your PR fulfills the following requirements:
Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)Validated PRScreenshots Compare Test Runresults.Associated with an issue (GitHub or internal) and uses the [automatic close keywords](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue).Other information
xamarinshould exclude Skia).