NRT
Contains work for https://github.com/SixLabors/ImageSharp/pull/2236
Codecov Report
Merging #34 (28bfbea) into main (bf398a9) will decrease coverage by
0%. The diff coverage is14%.
@@ Coverage Diff @@
## main #34 +/- ##
==================================
- Coverage 20% 19% -1%
==================================
Files 4 4
Lines 352 346 -6
Branches 88 85 -3
==================================
- Hits 71 68 -3
+ Misses 281 278 -3
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 19% <14%> (-1%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/SharedInfrastructure/DebugGuard.cs | 43% <0%> (+1%) |
:arrow_up: |
| src/SharedInfrastructure/ThrowHelper.cs | 92% <ø> (-1%) |
:arrow_down: |
| src/SharedInfrastructure/Guard.cs | 44% <100%> (-2%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@JimBobSquarePants I think this needs to be merged first. After this changes are in the repo my PR with nullable changes should hopefully compile. (IT works on my machine ;) )
@JimBobSquarePants This could be the next step for NRT. When this annotations make it to the main Repo, some NRT Errors will disappear.
But because of the Conditional Attribute the ArgumentNullException will not be thrown in Release builds. Is this intended?
I’m not sure I understand your question? We have to guard classes. Guard and DebugGuard the latter designed for debugging only.
The DebugGuard will only execute while Debugging. So in release mode the method will not be executed and no ArgumentNullException will be thrown. Perhaps a NullReferenceException when the value is used which was passed to the DebugGuard.
Perhaps after finishing NRT the DebugGuard.NotNull can be removed because everything is "hopefully" save ;)
That’s by design. We don’t want DebugGuard running in release mode.
Yeah agreed. It’s likely with the proper nullable fixes we won’t even require it.