Settings AOT#47794
Conversation
| var serverTaskCancellationSource = new CancellationTokenSource(); | ||
| CancellationToken cancellationToken = serverTaskCancellationSource.Token; | ||
|
|
||
| // Use AOT-compatible IPC server if available, otherwise use StreamJsonRpc |
| <!-- Preserve all of Newtonsoft.Json --> | ||
| <assembly fullname="Newtonsoft.Json" preserve="all" /> | ||
|
|
||
| <!-- Preserve all of Nerdbank.Streams --> |
| <assembly fullname="Newtonsoft.Json" preserve="all" /> | ||
|
|
||
| <!-- Preserve all of Nerdbank.Streams --> | ||
| <assembly fullname="Nerdbank.Streams" preserve="all" /> |
| <TieredCompilation>true</TieredCompilation> | ||
| <TieredCompilationQuickJit>true</TieredCompilationQuickJit> | ||
| <PublishReadyToRun>true</PublishReadyToRun> | ||
| <ReadyToRunUseCrossgen2>true</ReadyToRunUseCrossgen2> |
| <TieredCompilation>true</TieredCompilation> | ||
| <TieredCompilationQuickJit>true</TieredCompilationQuickJit> | ||
| <PublishReadyToRun>true</PublishReadyToRun> | ||
| <ReadyToRunUseCrossgen2>true</ReadyToRunUseCrossgen2> |
|
|
||
| <!-- Additional optimizations for Release builds --> | ||
| <PropertyGroup Condition="'$(Configuration)' == 'Release'"> | ||
| <IlcOptimizationPreference>Speed</IlcOptimizationPreference> |
| </PropertyGroup> | ||
|
|
||
| <!-- For debugging purposes, uncomment this block to enable AOT builds --> | ||
| <PropertyGroup> |
| <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> | ||
| <PublishDir>$(PowerToysRoot)\$(Platform)\$(Configuration)\WinUI3Apps</PublishDir> | ||
| <RuntimeIdentifier>win-$(Platform)</RuntimeIdentifier> | ||
| <PublishDir>C:\Users\shuaiyuan\source\repos\PowerToys\x64\Release\WinUI3Apps\Publish</PublishDir> |
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.Unrecognized words (4)Crossgen These words are not needed and should be removedDEFAULTTONEARESTTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:microsoft/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/25657438634/attempts/1' &&
git commit -m 'Update check-spelling metadata'OR To have the bot accept them for you, comment in the PR quoting the following line: Forbidden patterns 🙅 (1)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: Should be
|
| ❌ Errors | Count |
|---|---|
| ❌ forbidden-pattern | 1 |
See ❌ Event descriptions for more information.
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
This pull request introduces significant improvements to AOT (Ahead-Of-Time) compatibility, especially for the MouseWithoutBorders module and the Settings UI. The main changes include replacing StreamJsonRpc-based IPC with a new AOT-friendly named pipe protocol, updating type annotations for trimming safety, and ensuring shared models for cross-process communication. There are also updates to build scripts and project files to support these changes.
AOT Compatibility and IPC Overhaul:
MouseWithoutBordersIpcServerclass, a corresponding handler interface, and a serializableMachineSocketStatestruct for communication. (src/modules/MouseWithoutBorders/App/Class/MouseWithoutBordersIpcServer.cs,src/modules/MouseWithoutBorders/App/Class/Program.cs) [1] [2] [3] [4]SocketStatusenum to be public for serialization, ensuring it matches between the service and the Settings UI. (src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs)SocketStatusandMachineSocketStatein the Settings UI library for consistent IPC communication. (src/settings-ui/Settings.UI.Library/MouseWithoutBordersIpcModels.cs)AOT/Trimming Safety Improvements:
[DynamicallyAccessedMembers]to ensure correct behavior under trimming/AOT. This includes updates toGenericProperty<T>and methods inICmdLineRepresentable. (src/settings-ui/Settings.UI.Library/GenericProperty1.cs,src/settings-ui/Settings.UI.Library/Interfaces/ICmdLineRepresentable.cs`) [1] [2] [3] [4] [5]src/Common.Dotnet.AotCompatibility.props)Build and Project File Updates:
src/settings-ui/Settings.UI.Library/Settings.UI.Library.csproj,src/settings-ui/QuickAccess.UI/PowerToys.QuickAccess.csproj) [1] [2]publish-settings-dependencies.ps1)Infrastructure and Solution Tweaks:
Microsoft.CmdPal.Ext.Shellfrom Release|x64 builds, possibly for AOT build streamlining. (PowerToys.slnx)Minor Internal Refactors:
src/modules/MouseWithoutBorders/App/Core/Common.cs,src/modules/MouseWithoutBorders/App/Class/Program.cs,src/settings-ui/Settings.UI.Library/Interfaces/ICmdLineRepresentable.cs) [1] [2] [3]