Skip to content

Add breaking change documentation for FilePatternMatch.Stem nullability change#48285

Merged
gewarren merged 4 commits intomainfrom
copilot/fix-47914
Sep 8, 2025
Merged

Add breaking change documentation for FilePatternMatch.Stem nullability change#48285
gewarren merged 4 commits intomainfrom
copilot/fix-47914

Conversation

Copy link
Contributor

Copilot AI commented Sep 6, 2025

This PR adds comprehensive breaking change documentation for the FilePatternMatch.Stem property nullability change in .NET 10 RC 1.

What changed

The Microsoft.Extensions.FileSystemGlobbing.FilePatternMatch.Stem property was changed from nullable (string?) to non-nullable (string) in .NET 10 RC 1. Additionally, the constructor now throws ArgumentNullException when a null value is passed for the stem parameter.

Documentation added

  • New breaking change document: docs/core/compatibility/core-libraries/10.0/filepatternmatch-stem-nonnullable.md

    • Follows the official breaking change template structure
    • Includes before/after code examples showing the impact
    • Categorizes as both source incompatible and behavioral change
    • Provides clear recommended actions for affected code
  • Updated index: Added entry to docs/core/compatibility/10.0.md under Core .NET libraries section

  • Updated TOC: Added navigation entry to docs/core/compatibility/toc.yml

Key details covered

  • Previous behavior: Constructor accepted null for stem parameter without warnings/errors
  • New behavior: Constructor throws ArgumentNullException for null values, property is non-nullable
  • Reason: Improves nullability accuracy since FilePatternMatch is only constructed when PatternTestResult is successful
  • Recommended action: Review call sites to ensure stem cannot be null, remove unnecessary null checks

The documentation includes proper xref links to affected APIs and follows Microsoft's writing style guidelines for breaking change documentation.

Fixes #47914.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/10.0.md Breaking changes in .NET 10
docs/core/compatibility/core-libraries/10.0/filepatternmatch-stem-nonnullable.md FilePatternMatch.Stem changed to non-nullable
docs/core/compatibility/toc.yml docs/core/compatibility/toc

Copilot AI changed the title [WIP] [Breaking change]: FilePatternMatch.Stem changed to non-nullable Add breaking change documentation for FilePatternMatch.Stem nullability change Sep 6, 2025
Copilot AI requested a review from gewarren September 6, 2025 02:45
@gewarren gewarren marked this pull request as ready for review September 8, 2025 17:31
@gewarren gewarren requested a review from a team as a code owner September 8, 2025 17:31
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. Let's :shipit:

@gewarren gewarren merged commit 965e56e into main Sep 8, 2025
10 checks passed
@gewarren gewarren deleted the copilot/fix-47914 branch September 8, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Breaking change]: FilePatternMatch.Stem changed to non-nullable

3 participants