KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.41k stars 188 forks source link

Update Avalonia to latest version, enable basic PublishAot scenario #782

Open filipnavara opened 1 month ago

filipnavara commented 1 month ago

Unlike #645 this takes a very minimalistic approach to the Avalonia upgrade. It updates all code to compile and run but it doesn't add Browser support or any optimizations.

For the AOT part, .NET 8 TFM build is added to StructuredLogger with couple of annotations. Additionally, the TinyJSON parser is replaced with source generated System.Text.Json deserializer. I didn't update this for the netstandard2.0 build since I don't want to add dependency on out-of-the-box package.

filipnavara commented 1 month ago

For reference, on macOS ARM64 this produces 30Mb self-contained executable and about 20Mb of native libraries:

-rw-r--r--  1 filipnavara  staff       758 Jan 31 13:48 Info.plist
-rwxr-xr-x  1 filipnavara  staff  31278800 May 26 23:51 StructuredLogViewer.Avalonia
drwxr-xr-x  3 filipnavara  staff        96 May 26 23:52 StructuredLogViewer.Avalonia.dsym
-rw-r--r--  1 filipnavara  staff     30924 May 26 23:45 StructuredLogViewer.Core.pdb
-rw-r--r--  1 filipnavara  staff      1702 Jan 31 13:48 StructuredLogViewer.icns
-rw-r--r--  1 filipnavara  staff    174512 May 26 23:51 StructuredLogger.pdb
-rwxr--r--  1 filipnavara  staff   1341120 Apr 25 09:03 libAvaloniaNative.dylib
-rwxr--r--  1 filipnavara  staff   2683424 Apr  9 18:58 libHarfBuzzSharp.dylib
-rwxr--r--  1 filipnavara  staff  15084640 Apr  9 18:58 libSkiaSharp.dylib