Skip to content

Enable nullable, cleanup#20

Closed
RJohnsonPGH wants to merge 2 commits intoskalahonza:masterfrom
RJohnsonPGH:master
Closed

Enable nullable, cleanup#20
RJohnsonPGH wants to merge 2 commits intoskalahonza:masterfrom
RJohnsonPGH:master

Conversation

@RJohnsonPGH
Copy link

Migrate to .net 8. Note that end of support for 8 is approx 1 year away, but the code functions as is in .net 10 as well.
Move to a more traditional folder structure.
Remove nuget/build scripts and executables.
Enable nullable.
Fix nullability warnings.
Change to file scoped namespaces.

Goal

Eliminate potential NullReferenceException exceptions.

Background

Widespread use of null is ripe for NRE issues, enabling nullable and adding proper null check safeguards prevents this.

Implementation

Enabled nullable in projects, and fixed compiler generated warnings with null checks.

Testing

Ran unit tests. One test does fail (CustomSerializationTest2) however I think that test should fail, as it is attempting to parse a property that does not exist in the INF file. Previously it would return null, however with nullable enabled that was generating a compiler warning.

Remove nuget/build scripts and executables
Enable nullable
Fix nullability warnings
Change to file scoped namespaces
@skalahonza
Copy link
Owner

Thank you for this contribution. I will try to give you a review this week.

@RJohnsonPGH
Copy link
Author

Thanks.

Apologies, but I did not mean for that second commit on this branch, that was intended for #21

Additionally, best guess as to the builds failing is the CI/CD being configured to use net6 which went end of support in Nov 2024. This PR was written w/ language features and compiled for net8 and net10

@RJohnsonPGH
Copy link
Author

Sure thing, I should be able to tackle that some time today.

Copy link
Owner

@skalahonza skalahonza left a comment

Choose a reason for hiding this comment

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

i am only confused by this commented file

Copy link
Owner

Choose a reason for hiding this comment

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

what is this commented file for?

@RJohnsonPGH
Copy link
Author

I'm going to close this for now, I'm working on a different approach that should make this PR obsolete

@RJohnsonPGH RJohnsonPGH closed this Dec 7, 2025
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