Skip to content

Bump version to 1.3.2 and refactor nullable handling across core files#7

Merged
temonk merged 1 commit intomainfrom
bugfix/nullablewarningsForImplicitOperators
Jul 11, 2025
Merged

Bump version to 1.3.2 and refactor nullable handling across core files#7
temonk merged 1 commit intomainfrom
bugfix/nullablewarningsForImplicitOperators

Conversation

@temonk
Copy link
Copy Markdown
Contributor

@temonk temonk commented Jul 11, 2025

No description provided.

@temonk temonk requested a review from Copilot July 11, 2025 07:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR bumps the package version and enhances nullable handling by refactoring how implicit conversion operators and nullability annotations are generated across core files, as well as cleaning up and reformatting related helper and extension code.

  • Bumped project version to 1.3.2.
  • Replaced non-nullable implicit conversions with nullable overloads decorated with NotNullIfNotNull.
  • Moved and adjusted [DisallowNull] placement and cleaned up deprecated/commented code.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Directory.Build.props Updated <Version> from 1.3.1 to 1.3.2
src/AltaSoft.Choice.Generator/Executor.cs Refactored generation of implicit operators to nullable overloads and repositioned [DisallowNull]
src/AltaSoft.Choice.Generator/Helpers/SourceCodeBuilder.cs Merged else and if into else if for header-line handling
src/AltaSoft.Choice.Generator/Extensions/RoslynExt.cs Removed obsolete commented-out extension methods
src/AltaSoft.Choice.Generator/Extensions/CompilationExt.cs Wrapped GetFullName in #pragma warning disable S1643/restore block
tests/AltaSoft.Choice.Generator.SnapshotTests/Snapshots/...Authorisation1Choice*.verified.cs Regenerated snapshots to reflect nullable implicit operator changes
tests/AltaSoft.ChoiceGenerator.Tests/ChoiceGeneratorTests.cs Added trailing newline
Comments suppressed due to low confidence (3)

src/AltaSoft.Choice.Generator/Executor.cs:114

  • The generator now only emits nullable implicit operators and removes the original non-nullable overload, which is a breaking change; consider retaining both a non-nullable operator (for backward compatibility) and the new nullable overload.
                sb.AppendLine("[DisallowNull]");

tests/AltaSoft.ChoiceGenerator.Tests/ChoiceGeneratorTests.cs:301

  • Add unit tests for the new nullable implicit operators, specifically scenarios where the input is null, to verify that the operator returns null as expected.
    }

src/AltaSoft.Choice.Generator/Executor.cs:110

  • [DisallowNull] is only applied in the else branch and omitted for DateOnly properties; you may want to add [DisallowNull] after XmlIgnore to ensure consistent null-disallow behavior for all generated properties.
                sb.AppendLine("[XmlIgnore]");

@temonk temonk merged commit f4d8cb9 into main Jul 11, 2025
1 check passed
@temonk temonk deleted the bugfix/nullablewarningsForImplicitOperators branch July 11, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants