-
-
Notifications
You must be signed in to change notification settings - Fork 764
GH4627: Add explicit path type support for .NET 10+ compatibility #4633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…tibility Adds DotNetTestPathType enum and PathType property to DotNetTestSettings to support explicit --project and --solution parameters required by .NET 10+. Changes: - Add DotNetTestPathType enum with None, Auto, Project, and Solution values - Add PathType property to DotNetTestSettings (defaults to None for backward compatibility) - Update DotNetTester to handle path type logic with switch expressions - Add comprehensive unit tests covering all path type scenarios - Support auto-detection based on file extensions (.sln, .csproj, .vbproj, .fsproj, .vcxproj) Resolves cake-build#4627
jarlehjortland
pushed a commit
to WebMed-EPJ/cake
that referenced
this pull request
Oct 31, 2025
(cake-buildGH-4629) Update Verify.XunitV3 to 31.0.4 * fixes cake-build#4629 GH4631: GitHub Actions Workflow Updates (cake-build#4632) * (cake-buildGH-4631) GitHub Actions Workflow Updates ### Action Version Updates - `actions/checkout`: v4 → v5 - `actions/setup-dotnet`: v4 → v5 - `cake-build/cake-action`: master → v3.0.1 - CodeQL actions: v2 → v4 ### Build Matrix Changes - **Removed**: `macos-13` (deprecated) - **Added**: `macos-15-intel` and `macos-latest` runners - Maintained existing `windows-latest` and `ubuntu-latest` ### CodeQL Improvements - Added explicit `build-mode: 'autobuild'` - Added .NET SDK 8.0.x/9.0.x setup steps - Added `CAKE_INSTALL_SUPPORTED_SDKS: true` env var (to implicit install all SDKs for build script phase) ### New .NET Support - Added .NET 10.0 validation: `CAKE_NETCOREAPP_10_0_VERSION_OS` - fixes cake-build#4631 * feat: Improve GitHub Actions integration and test coverage - Include runner architecture in artifact naming and validation - Update BuildData record to include Architecture field - Add .NET 10.0 path validation in integration tests - Update Cake.Git addin version from 4.0.0 to 5.0.1 - Skip native assembly loading tests on ARM64 runners * feat: Include runner architecture in GitHub Actions artifact naming - Add runner architecture to artifact name for better identification - Ensures unique artifact names across different runner architectures GH4627: Add explicit path type support for .NET 10+ compatibility (cake-build#4633) (cake-buildGH-4627) Add explicit path type support for .NET 10+ compatibility Adds DotNetTestPathType enum and PathType property to DotNetTestSettings to support explicit --project and --solution parameters required by .NET 10+. Changes: - Add DotNetTestPathType enum with None, Auto, Project, and Solution values - Add PathType property to DotNetTestSettings (defaults to None for backward compatibility) - Update DotNetTester to handle path type logic with switch expressions - Add comprehensive unit tests covering all path type scenarios - Support auto-detection based on file extensions (.sln, .csproj, .vbproj, .fsproj, .vcxproj) Resolves cake-build#4627 (cake-buildGH-4638) Update Spectre.Console to 0.53.0 - fixes cake-build#4638 cake-buildGH-4639: Enable Spectre.Console report printer by default Also fixes some bugs with the initial implementation, as well as making sure that the borders have a safe (non-unicode) fallback. Closes cake-build#4639 (cake-buildGH-4636) Enhance FileSystem Abstractions & tests Added timestamps, Unix modes, performance improvements and dedicated for Fake File/Directory. - Add comprehensive timestamp and Unix file mode support across IFile/IDirectory interfaces - Implement LastWriteTimeUtc, CreationTimeUtc, LastAccessTimeUtc, and UnixFileMode properties - Add Set* methods for timestamp and Unix file mode manipulation - Improve performance by replacing GetFiles/GetDirectories with EnumerateFiles/EnumerateDirectories - Create dedicated Cake.Testing.Tests project with comprehensive unit test coverage - Add snapshot testing with Verify for FakeFile and FakeDirectory operations - Fill gaps in file system abstraction with cross-platform Unix file mode support - Integrate Microsoft.Extensions.TimeProvider.Testing for reliable time handling in tests - Refactor FakeDirectory to use yield return for lazy evaluation performance benefits - Add extensive test coverage for Create, Move, Delete, GetDirectories, and GetFiles operations - fixes cake-build#4636 ### Breaking Changes - [x] There shouldn't be any breaking changes identified, all new interface members have default implementations / values. #### IFileSystemInfo Interface (Base interface) - [x] `DateTime? LastWriteTimeUtc` - Default: `null` - [x] `DateTime? CreationTimeUtc` - Default: `null` - [x] `DateTime? LastAccessTimeUtc` - Default: `null` - [x] `UnixFileMode? UnixFileMode` - Default: `null` #### IDirectory Interface - [x] `IDirectory SetCreationTime(DateTime creationTime)` - Default: `return this` - [x] `IDirectory SetCreationTimeUtc(DateTime creationTimeUtc)` - Default: `return this` - [x] `IDirectory SetLastAccessTime(DateTime lastAccessTime)` - Default: `return this` - [x] `IDirectory SetLastAccessTimeUtc(DateTime lastAccessTimeUtc)` - Default: `return this` - [x] `IDirectory SetLastWriteTime(DateTime lastWriteTime)` - Default: `return this` - [x] `IDirectory SetLastWriteTimeUtc(DateTime lastWriteTimeUtc)` - Default: `return this` - [x] `IDirectory SetUnixFileMode(UnixFileMode unixFileMode)` - Default: `return this` #### IFile Interface - [x] `IFile SetUnixFileMode(UnixFileMode unixFileMode)` - Default: `return this` ### Key Changes Made - [x] Added UTC time properties to IFileSystemInfo with default null values - [x] Added Unix file mode support with UnixFileMode property and setter methods - [x] Added time setter methods for both IDirectory and IFile interfaces - [x] Performance improvement: Changed from GetDirectories()/GetFiles() to EnumerateDirectories()/EnumerateFiles() - [x] Added _file.Refresh() calls after time-setting operations to ensure consistency - [x] Added platform-specific attributes ([UnsupportedOSPlatform("windows")]) for Unix-specific methods
This was referenced Nov 11, 2025
This was referenced Nov 11, 2025
This was referenced Nov 12, 2025
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.
Adds DotNetTestPathType enum and PathType property to DotNetTestSettings to support explicit --project and --solution parameters required by .NET 10+.
Changes:
fixes #4627