Skip to content
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

Adds NullOrOutOfRange clauses, adding support for nullable classes/structs to OutOfRange #143

Merged
merged 35 commits into from
Jul 31, 2023

Conversation

rafaelsc
Copy link
Contributor

@rafaelsc rafaelsc commented Oct 25, 2021

@ardalis
Copy link
Owner

ardalis commented Oct 30, 2021

Can you fix the build?

@rafaelsc
Copy link
Contributor Author

rafaelsc commented Oct 31, 2021

Yes. I just solved the Merge Conflicts.

@ardalis
Copy link
Owner

ardalis commented Oct 31, 2021

Thanks, can you look at the build failure?

Build FAILED.

Error: GuardClauseExtensions.cs(200,143): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
Error: GuardClauseExtensions.cs(229,150): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
Error: GuardClauseExtensions.cs(229,278): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
Error: GuardClauseExtensions.cs(229,338): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
Error: GuardClauseExtensions.cs(200,143): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
Error: GuardClauseExtensions.cs(229,150): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
Error: GuardClauseExtensions.cs(229,278): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
Error: GuardClauseExtensions.cs(229,338): error CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. [D:\a\GuardClauses\GuardClauses\src\GuardClauses\GuardClauses.csproj]
    0 Warning(s)
    8 Error(s)

@rafaelsc
Copy link
Contributor Author

C# 9 Solve these errors. And looks like your build system is using on C#8. Open the project in VS will compile normally.

I don't have experience with GitHub action CI/CD. I will make a change to build using Net5 and Change the global.json to use Net5 too.

@ardalis
Copy link
Owner

ardalis commented Jan 18, 2022

All right, @rafaelsc, sorry to say it but can you re-apply this to the now-split-up files in the solution?

@ardalis
Copy link
Owner

ardalis commented Jan 18, 2022

I got rid of the global.json and everything should "just work" now with net6.0, by the way.

@ardalis ardalis self-requested a review January 20, 2022 14:44
@rafaelsc
Copy link
Contributor Author

@ardalis Sorry I only had the opportunity to fix the conflicts this week.
The Build is failing look like by some error in the build pipeline.

@ardalis
Copy link
Owner

ardalis commented Feb 17, 2023

Thinking I'm going to have to manually pull these in. Sorry it's taken so long.

@rafaelsc
Copy link
Contributor Author

I will be solving this conflits tomorrow

@rafaelsc
Copy link
Contributor Author

Conflits Solved

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
Ardalis.GuardClauses 95% 96% 136
Summary 95% (245 / 257) 96% (104 / 108) 136

@ardalis ardalis merged commit 4d8231a into ardalis:main Jul 31, 2023
1 check passed
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