Repository navigation
Upgrade to Avalonia 12 and enable native Wayland - #2768
Closed
VirgilMing wants to merge 3 commits into
Closed
VirgilMing wants to merge 3 commits into
VirgilMing wants to merge 3 commits into
Conversation
Upgrade Avalonia and DataGrid, update the AvaloniaEdit submodule to its Avalonia 12 compatibility commit, and migrate the affected input, window, text rendering, clipboard, binding and XAML APIs. Use compiled bindings for the code-defined bindings to preserve Native AOT support. Keep platform detection on X11 in this commit. Preserve undecorated Linux custom windows and pin a valid .NET 10 SDK feature-band version. Validation: offline restore, Release Native AOT publish, formatter and whitespace checks, and an isolated X11 startup opening the local repository.
Add Avalonia.Wayland 12.1.3 and select it explicitly when WAYLAND_DISPLAY is present in a Linux session. Preserve platform detection for X11 and other operating systems.
Collaborator
|
Author
|
Understood. Thx for providing history context.
I'll close this PR for now.
|
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
中文
SourceGit 当前使用 Avalonia 11,Linux 桌面默认通过 X11 运行。本 PR 将应用迁移到 Avalonia 12.1.3,并在 Linux 会话存在
WAYLAND_DISPLAY时显式启用原生 Wayland 后端;X11 会话和其他操作系统继续使用平台检测。主要变更
patch-on-12.x提交358f2c9e4ac57667c0183bf68f8869b110a69b1e。保持现有.gitmodulesURL,干净 checkout 可以从配置的远端获取该提交。Avalonia.Wayland和按会话环境选择后端的逻辑。提交按“框架迁移 → Wayland 启用 → AOT 文档”分开,目标分支为
develop。验证
dotnet format --verify-no-changes和 Git 空白检查通过。DISPLAY后,原生 Wayland 仓库窗口和 Blame 编辑器均能启动;协议日志记录了xdg_toplevel创建和配置,没有对应的 X11 窗口或崩溃日志。已知限制
Avalonia 的 Wayland 后端仍处于早期实现阶段。Windows、macOS 和 arm64 尚未在本地进行运行验证;中文输入、应用间剪贴板和拖放也尚未在最终子模块版本上完整复测。
DataGrid 12.1.2 仍产生已审计的
IL3053汇总警告,展开后为索引器泛型回退的两条IL3050和自动生成列的反射 Binding 警告。SourceGit 使用手写模板列,并关闭自动生成列和用户列排序;但我还没找到让这些使用约束被AOT编译器消费以消除上述警告的方法。
细节及复查命令见
build/README.md。English
SourceGit currently uses Avalonia 11 and the X11 backend on Linux. This PR migrates the application to Avalonia 12.1.3 and explicitly selects native Wayland when
WAYLAND_DISPLAYis present in a Linux session. X11 sessions and other operating systems retain platform detection.Changes
patch-on-12.xcommit,358f2c9e4ac57667c0183bf68f8869b110a69b1e. The submodule URL is unchanged, and a fresh checkout can fetch the commit from the configured remote.Avalonia.Waylandand session-dependent backend selection.The commits separate framework migration, Wayland activation, and AOT documentation. The PR targets
develop.Validation
dotnet format --verify-no-changes, and whitespace checks passed.DISPLAYunset, the native Wayland repository window and Blame editor started successfully. Protocol logs confirmedxdg_toplevelcreation/configuration, with no corresponding X11 window or crash logs.Known limitations
Avalonia's Wayland backend is still at an early stage. Windows, macOS, and arm64 runtime behavior has not been validated locally. Chinese input, cross-application clipboard, and drag-and-drop have not yet been fully retested with the final submodule version.
DataGrid 12.1.2 still reports the audited
IL3053aggregate. Expanded diagnostics contain twoIL3050warnings for the indexer generic fallback and one for reflection Binding in automatic column generation.SourceGit uses explicit template columns and disables automatic columns and user column sorting; but I still haven't found a way to make AOT compiler understand these constraints and eliminate the warning.
build/README.mdrecords the details and reproduction command.