Add aot functionality to vNext#230
Merged
DecSmith42 merged 28 commits intofeature/v-nextfrom Oct 14, 2025
Merged
Conversation
…ime targets Enhanced `DecSm.Atom.Tool` to support Native AOT builds with additional runtime configurations targeting `win-x64`. Added support for multiple `ToolCommandNames` and fine-tuned size optimization through project settings. BREAKING CHANGE: Updated SDK to target .NET 10.0 for certain AOT configurations; older runtime compatibility requires explicit consideration.
Added logging for errors when a NuGet package push fails. This captures the `ProcessRunResult` error details, ensuring better traceability for push failures. Removed unused `ConsumesVariable` for build version in deploy targets.
Added `MaskingAnsiConsoleOutput` to ensure sensitive values are masked before being rendered to the console. This feature seamlessly integrates with Spectre.Console by wrapping its `IAnsiConsoleOutput`. Updated dependency injection in `HostExtensions` to leverage the new masking implementation when creating an `IAnsiConsole` instance. Modified `SpectreLogger` to remove redundant secret masking logic. Added tests for masking behavior under various scenarios.
Updated `PackageId` in `DecSm.Atom.Tool.csproj` to use `DecSm.Atom.Tool` instead of `atomtool`. Removed redundant `CustomPackageId` settings from build and pack targets in `IBuildTargets`.
Updated `ToolCommandNames` to `ToolCommandName` in `DecSm.Atom.Tool.csproj`, ensuring alignment with the expected MSBuild property for single tool command scenarios.
Replaced System.CommandLine with ConsoleAppFramework for better compatibility and reduced complexity. Introduced `CommandModel` and `RunArgsFilter` to streamline command management. Refactored `RunCommand` and `NugetAddCommand` to improve readability and parameter handling. Removed redundant extensions and adjusted project settings for dependency updates, including the removal of `System.CommandLine` and the addition of `ConsoleAppFramework` and `JetBrains.Annotations`.
Improved message formatting for default and configured parameter outputs to enhance readability. Updated color scheme for cases where a required secret is missing, replacing yellow with blue for better distinction. Added comments to suppress ReSharper's query refactoring suggestions for relevant foreach loops.
Simplified code expressions by removing redundant `public` modifiers on interface members and properties. Replaced multi-line conditional statements with concise expressions. Improved test readability by restructuring constants and minor refactoring. Included comments to disable and restore specific ReSharper suggestions for enhanced performance considerations. Made minor updates to JSON formatting for consistency.
Enabled runtime matrix support in CI workflows for `DecSm.Atom.Tool` to target `windows-latest`, `ubuntu-latest`, and `macos-latest`. Enhanced AOT packing by dynamically resolving runtime identifiers and optimizing non-native builds for Linux. Refactored `PushToNuget` to include dynamic build variables and streamline artifact retrieval. Updated workflows and targets configuration for better runtime compatibility and artifact handling.
… file Adjusted the formatting for `--secret-param` in the verification file for better consistency. Replaced the warning symbol with a placeholder (`? None`) to reflect the latest expected output.
Upgraded the `SetupDotnetStep` from `9.0.x` to `10.0.x` in the build workflow configuration. This ensures compatibility with the latest .NET SDK improvements and features. Planning adjustments may be needed for workflows requiring older versions.
…o 10.0.x Introduced the `DotnetQuality` option in `SetupDotnetStep`, allowing for customization of SDK quality levels (e.g., preview, daily). Updated workflows to utilize `dotnet-quality: 'preview'` alongside the `dotnet-version` parameter for precise control over SDK configuration. This ensures compatibility with the latest SDK features while enabling finer-grained control over runtime environments. Enhanced workflow generation logic in both GitHub and DevOps writers to optionally include quality level configuration.
Introduced the `Quality` parameter in `SetupDotnetStep` to allow customization of .NET SDK version quality levels. This parameter provides finer control over the SDK version installed, supporting different quality tiers such as `preview` or `stable`. Updated documentation to reflect the new parameter usage. This enhancement simplifies the workflow configuration for cases requiring specific SDK qualities.
Moved `JetBrains.Annotations` from direct usage in `CommandModel` to `_usings.cs`. Simplifies code structure and ensures consistency in the usage of shared dependencies.
Added support for retrieving artifacts for Windows, Ubuntu, and MacOS runtime environments in `PushAtomTool`. This enables better handling and distribution of environment-specific builds for `AtomTool`. Refactored the `RetrieveArtifacts` logic to include the latest runtime tags: `WindowsLatestTag`, `UbuntuLatestTag`, and `MacOsLatestTag`.
Updated `FileSystem.Directory.GetFiles` to search for `.nupkg` files in all subdirectories under `AtomPublishDirectory`. This resolves an issue where packages located in nested directories were not being detected and pushed to NuGet.
Updated `RetrieveArtifacts` calls to use `AtomToolProjectName` instead of `PackAtomTool`. This ensures the correct project name is used for artifact retrieval across runtime environments.
… path Updated `Build` triggers to include `feat/**` branches for improved workflow flexibility. Fixed the artifact directory path in `IDeployTargets` from `AtomPublishDirectory` to `AtomArtifactsDirectory`, ensuring consistency and correctness during artifact retrieval.
…act acquisition Centralized runtime matrix definitions into `IBuildTargets.BuildPlatformNames` for better reusability and maintainability across the codebase. Updated workflows and build targets to use the new centralized definitions. Enhanced artifact handling in `PushToNuget` by adding explicit artifact consumption for environment-specific builds (`Windows`, `Ubuntu`, and `MacOS`). Simplified `TestAtom` and `PackAtomTool` configurations to utilize the new runtime matrix logic, reducing duplication. Streamlined artifact retrieval logic in `PushAtomTool` for consistent processing.
Introduced `TaskExtensions` providing retry mechanisms for `Task` and `Task<T>` with customizable retry count, delays, and cancellation support. Added overloads to handle faulted tasks, cancellation exceptions, and retrying operations via task factories. Exceptions from multiple attempts are aggregated and surfaced after the final attempt. Included comprehensive unit tests to validate correct behavior across various scenarios, including retries, exception handling, and cancellation cases.
Updated all project and test targets to support .NET 10.0 alongside .NET 9.0 and 8.0. Upgraded default language version to C# 14 across the codebase. Updated supporting libraries, including Roslynator to 4.14.1, Azure.Identity to 1.17.0, and other dependencies to their latest versions. Modified test configurations to include .NET 10.0 reference assemblies and updated language version for parsing options to C# 14. Introduced fixes ensuring consistency in artifact handling and improved compatibility with .NET 10.0 workflows.
…able fields Enhanced `GitVersionBuildIdProvider` and `GitVersionBuildVersionProvider` to utilize `[AllowNull]` and `[MaybeNull]` attributes for their fields, improving nullability handling and aligning with updated nullable reference type guidelines. Updated related usings and adjusted logic for better consistency and clarity. Included global using directives for `System.Diagnostics.CodeAnalysis`, simplifying declarations. Added `CA1873` to suppressed warnings in the project configuration. Adjusted test cases for improved readability and maintainability.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds native Ahead-of-Time (AOT) compilation functionality to the vNext build system, introducing support for .NET 10.0 and enabling AOT builds for the Atom Tool. The changes modernize the build infrastructure while implementing comprehensive AOT capabilities for improved performance.
- Upgrades framework from .NET 9.0 to .NET 10.0 across all projects and build configurations
- Implements native AOT compilation for the DecSm.Atom.Tool with runtime-specific builds
- Refactors command-line processing from System.CommandLine to ConsoleAppFramework for AOT compatibility
Reviewed Changes
Copilot reviewed 60 out of 62 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| global.json | Removes .NET SDK version specification allowing flexible version usage |
| _atom/_atom.csproj | Updates to .NET 10.0 and Roslynator analyzer versions |
| _atom/Targets/IBuildTargets.cs | Adds AOT compilation logic for the Atom Tool with platform-specific builds |
| _atom/Build.cs | Updates .NET version to 10.0.x preview and refactors trigger configurations |
| DecSm.Atom.Tool/DecSm.Atom.Tool.csproj | Implements conditional AOT builds and framework targeting |
| DecSm.Atom.Tool/CommandModel.cs | Replaces System.CommandLine with ConsoleAppFramework implementation |
| DecSm.Atom/Util/TaskExtensions.cs | Adds robust retry functionality for task operations |
| DecSm.Atom/Logging/MaskingAnsiConsoleOutput.cs | Implements secret masking at the console output level |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Enhanced workflows and test configurations to include .NET 8.0 and 9.0, alongside existing .NET 10.0 support. Updated `TestAtom` to run unit tests against multiple frameworks (`net8.0`, `net9.0`, `net10.0`) using a matrix approach. Refactored `DotnetTestOptions` to include optional `Framework` and `Configuration` properties, improving flexibility during test execution. Adjusted test reporting and coverage generation to reflect framework-specific contexts in their output. Modified `ProcessRunOptions` to handle empty arguments gracefully, ensuring robust command construction. Streamlined artifact consumption logic in `TestAtom` and improved workflow definitions (`Build.yml`, `Validate.yml`, and others) with proper setup for multi-framework support.
Extended `RuntimeIdentifiers` in the project file to include `linux-x64` and `osx-x64` alongside `win-x64`, enabling multi-platform support for Native AOT builds. Ensures compatibility with Linux and macOS environments in addition to Windows.
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.
No description provided.