* [Text] Move Unicode trie generation to a dedicated Nuke-driven tool
The trie and enum generators used to live as [Fact(Skip = ...)] tests in
Avalonia.Base.UnitTests, writing to a local Generated/ folder that had to
be hand-copied into src/Avalonia.Base/Media/TextFormatting/Unicode/. Move
them into a standalone tool project invoked by a new GenerateUnicodeData
Nuke target that writes the canonical files in place.
- New src/tools/Avalonia.UnicodeTrieGenerator console app (mirrors the
GenerateCppHeaders pattern), signed via SharedVersion.props and added
to Avalonia.Base's InternalsVisibleTo for UnicodeTrieBuilder access.
- UCD downloads are cached under artifacts/ucd-cache/<version>/ so
reruns work offline; the target accepts --output and --cache args.
- LineBreakClass and WordBreakClass orderings now come from
PropertyValueAliases (with hot-path tags seeded at the front for
cache density), removing the BreakPairTable.txt resource and the
dead BreakPairTable.cs writer that nothing in src/ referenced.
- ParseDataEntries dedupes by Name OR Tag so seeds can use friendlier
names (Carriage_Return) than UCD's WB primaries (CR).
- Deprecated WB classes (E_Base, E_Modifier, Glue_After_Zwj,
E_Base_GAZ) are filtered out — they have no codepoint mappings.
- Conformance tests stay in the test project, repointed at a small
UnicodeTestData.Ucd constant.
Regenerating into the canonical Unicode directory produces a zero diff
against the previously committed enums and tries, confirming the port
preserves output byte-for-byte. Invoke with `./build.cmd GenerateUnicodeData`.
* Align generated file names
Validate all tries
Unify UCD path
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Make the trie generation standalone
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Onboard onto Central Package Management
* Remove SharpDX
* Add back <clear /> to NuGet.config package source mapping
* Package mapping
* Inline props where appropriate
* Lost a space
* Update to xunit.v3
* Little more progress
* More fixes
* Keep VSTest supported
* Adjust Nuke
* Few fixes
* Fix for xunit 2
* Fix GetData override
* Adjust
* Use MTP for xunit 2
* Fix test
* Better fix
* --no-progress
* Few more fixes
* no progress
* Fix test
* Better fix
* TRX
* Move to Directory.Build.props
* Unify on MTP v2
* Update
* Update to stable
* 1.0.1
* 1.0.2
* Fix some warnings
* Fix more warnings
* Fix more warnings
* Enable nullability in UnitTests
* Enable nullability in Base.UnitTests
* Enable nullability in Markup.UnitTests
* Enable nullability in Markup.Xaml.UnitTests
* Add .NET 8 target to packable projects
* Update test projects
* Update sample projects to target .NET 8
* Update main Avalonia package to target .NET 8 as well
* Remove MSBuildEnableWorkloadResolver hack and some minor change
* Use net8.0 in nuke build as well
* Pin 8.0.0 SDK
* Adjust API validation
* Pin a valid version
* Remove net461 target from Avalonia package
* Remove unused net6.0 target from Avalonia.Designer.HostApp
* Adjust API diff
* Update ControlCatalog.Android.csproj
* Remove MSBuildEnableWorkloadResolver
* Fix Browser issues on .NET 8
* Fix .NET 8 error
* Fix merge conflicts
* Replace explicit TFMs in .csproj files with a centralized registry
* Fix merge conflict
* Fix AvsLegacyWindowsTargetFrameworks and add hacks for the tests
* Update XCode project CommandLineArgument
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
* Merge core libraries.
Everything below `Avalonia.Controls` into `Avalonia.Base`.
* Move new files to correct place.
* Removed unused dirs/projects,
* Removed outdated references from theme assemblies.
* Merge unit tests to match new assembly layout.
* Fixup test namespaces.
* Make directory match namespace.
* Move files to match namespace.
* Move files to match namespace.
* Fix up incorrect namespace.
`Avalonia.Visuals.Media.Imaging` -> `Avalonia.Media.Imaging`.
* Fix resource URL.
* Removed outdated dependencies.
* Added missing project reference.
* Update test namespaces.
* Fix merge error.
* Fix merge errors.
* Fix bad merge in WindowsInteropTest.csproj.
* Fix up merge errors in csprojs.
* Remove merged tests from nuke.
* Fix up namespace.
* Fix compile error.
* Fix failing tests.
Now that more unit tests are present in Avalonia.Base.UnitTests, general `AvaloniaObject` properties are getting registered. Ignore those.
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
And no longer target net461 in unit tests as we've not had a test pass in net core and fail in netfx in years, and it bloats our CI time; EXCEPT Avalonia.Markup.Xaml.UnitTests where we're still testing against net4.7 as MSIL generation is runtime-sensitive.
Previously we ensured that `AvaloniaObject.SetValue` was run on the main
thread. This makes sure that `GetValue`, `IsSet` and `ClearValue` are
also run on the main thread. Unit testing this turned out to be more
complicated than expected, because `Dispatcher` keeps a hold of a
reference to the first `IPlatformThreadingInterface` it sees, so made
`UnitTestApplication` able to notify `Dispatcher` that it should update
its services.
Rather than adding a TakeUntil(control.StyleDetach) to each applied
style, keep track of the applied styles in a static list. This
dramatically reduces memory usage.
This is needed so that things like the following can be done:
<TreeView>
<TreeView.Styles>
<Style Selector="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}"/>
</Style>
</TreeView.Styles>
<TreeView>
(At the moment we have TreeDataTemplate.IsExpanded but this isn't good
enough: it only supports setting IsExpanded on creation of the item with
no binding.)
With this commit, setters can now contain bindings, but they aren't yet
applied correctly. As part of this commit, classes related to binding
have been moved to the Perspex.Data namespace.