Skip to content
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

Update SkiaSharp and add pdb files #2195

Merged
merged 6 commits into from
Aug 25, 2021
Merged

Update SkiaSharp and add pdb files #2195

merged 6 commits into from
Aug 25, 2021

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Aug 21, 2021

Description of Change

Adds the .pdb files to the build tasks in case of exceptions. This also updates SkiaSharp to the latest version.

Additions made

  • Updates SkiaSharp
  • Adds pdb files
  • Cecil the version of SkiaSharp used by Svg.Skia using a custom task

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

Does this PR touch anything that might affect accessibility?

  • Does this PR introduce a new control? (If yes, add an example using SemanticProperties to the SemanticsPage)
  • APIs that modify focusability?
  • APIs that modify any text property on a control?
  • Does this PR modify view nesting or view arrangement in anyway?
  • Is there the smallest possibility that your PR will change accessibility?
  • I'm not sure, please help me

If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.

Also include the .pdb files in the packages
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some failures are happening:

D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1102: Unable to find package SkiaSharp.HarfBuzz with version (>= 2.88.0-preview.127) [D:\agent\1\s\Microsoft.Maui.BuildTasks-net6.slnf]
D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1102:   - Found 53 version(s) in dotnet-public [ Nearest version: 2.88.0-preview.120 ] [D:\agent\1\s\Microsoft.Maui.BuildTasks-net6.slnf]
D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1102:   - Found 0 version(s) in xamarin [D:\agent\1\s\Microsoft.Maui.BuildTasks-net6.slnf]
D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1102:   - Found 0 version(s) in dotnet-eng [D:\agent\1\s\Microsoft.Maui.BuildTasks-net6.slnf]
D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1102:   - Found 0 version(s) in dotnet6 [D:\agent\1\s\Microsoft.Maui.BuildTasks-net6.slnf]
D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1101: Unable to find package SkiaSharp.NativeAssets.Win32. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet6, xamarin [D:\agent\1\s\Microsoft.Maui.BuildTasks-net6.slnf]
D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1101: Unable to find package SkiaSharp.NativeAssets.macOS. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet6, xamarin [D:\agent\1\s\Microsoft.Maui.BuildTasks-net6.slnf]

@mattleibow
Copy link
Member Author

Ah, it is not in the devops feed yet... We gotta wait a few hours? 2 maybe?

Let me check and retry...

@mattleibow
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@mattleibow
Copy link
Member Author

While we wait for the new packages to reach the feed, I notice something uncool... Some libraries depended on SkiaSharp with assembly version 2.80 and the new ones have SkiaSharp 2.88. The SkiaSharp assemblies are strong named.

I don't know how to set up the binding redirects for this.

And this issue makes me cry: dotnet/msbuild#1309

@mattleibow
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Redth Redth added this to the 6.0.100-rc.1 milestone Aug 23, 2021
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails with:

D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000: System.IO.FileNotFoundException: Could not load file or assembly 'SkiaSharp, Version=2.80.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified. [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000: File name: 'SkiaSharp, Version=2.80.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 tintColor, ILogger logger) [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 tintColor, ILogger logger) [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.Resizer.Resize(DpiPath dpi, String inputsFile) [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessImageResize(ResizeImageInfo img, DpiPath[] dpis, ConcurrentBag`1 resizedImages) [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass26_0.<ExecuteAsync>b__0(ResizeImageInfo img) [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.AsyncTaskExtensions.<>c__DisplayClass0_0`1.<ParallelForEach>b__0(TSource s) [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:  [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000: WRN: Assembly binding logging is turned OFF. [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000: Note: There is some performance penalty associated with assembly bind failure logging. [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]
D:\agent\1\s\bin\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.100-rc.1.6394\targets\Microsoft.Maui.Resizetizer.targets(450,9): error MAUI0000:  [D:\agent\1\s\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj]

There seems to only be two options here:

  1. Is there a library that depends on SkiaSharp we can remove here? And write our own equivalent?
  2. "IL merge" some assemblies to work around the binding conflict. This might not work either, depending on how many APIs changed in the newer SkiaSharp.

@mattleibow
Copy link
Member Author

We will have to use ILMerge, because we can't write our own since the bit we use is the SVG stuff, and that is a big puppy.

I believe the APIs we use are available in the new SkiaSharp, so it might be fine to just edit the dlls of the SVG library to use the new skia version. I have done worse :)

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe try again, when they get this on the feed:

  D:\agent\1\s\src\Workload\Microsoft.Maui.Resizetizer.Sdk\Microsoft.Maui.Resizetizer.Sdk.csproj : error NU1101: Unable to find package Mono.ApiTools.MSBuildTasks. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet6, xamarin [D:\agent\1\s\Microsoft.Maui.Packages-net6.slnf]
  D:\agent\1\s\src\SingleProject\Resizetizer\src\Resizetizer.csproj : error NU1101: Unable to find package Mono.ApiTools.MSBuildTasks. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet6, xamarin [D:\agent\1\s\Microsoft.Maui.Packages-net6.slnf]

Another option might be to make a Microsoft.Maui.BootstrapTasks.csproj and just put the code for these tasks in dotnet/maui.

@mattleibow
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@mattleibow mattleibow merged commit 57bf069 into main Aug 25, 2021
@mattleibow mattleibow deleted the dev/update-skia branch August 25, 2021 00:20
@Eilon Eilon added area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions labels Sep 30, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@samhouts samhouts added the fixed-in-6.0.100-rc.1.7 Look for this fix in 6.0.100-rc.1.7! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions fixed-in-6.0.100-rc.1.7 Look for this fix in 6.0.100-rc.1.7!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants