-
Notifications
You must be signed in to change notification settings - Fork 271
Building main with Castle.Core 5.2.1 gives build errors (Possible null reference) #871
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I haven't tested NSubstitute locally with Castle.Core 5.2.1 yet. Maybe it isn't a runtime error with NSubstitute 5.3.0 |
I ran locally some tests (~600) without issues with Castle.Core 5.2.1 and NSubstitute 5.3.0. But be aware of the new bug: default interface implementations won't work anymore - see castleproject/Core#684 |
Hi @304NotModified, like I already mentioned over in the Castle.Core issue, these build errors are probably a direct result of castleproject/Core#668. I've added the nullable reference type annotations based on a reasonably careful (IIRC) study of DynamicProxy's source code. However, they can still be misleading due to the fact that DynamicProxy e. g. has only one interface type to represent proxy invocations, yet there are 5 or so different proxy types... some of those may produce null references in invocation properties while others don't, so depending on the proxy type(s) you're using, you may never actually encounter null references but the interface still has to declare them as a possibility. So I could imagine that in some cases you may safely ignore the nullability errors using the |
See #870
See logs: https://github.com/nsubstitute/NSubstitute/actions/runs/13752672225/job/38455602274?pr=870
PS: There is a comment about
Castle.Core 5.2 and NSubstitute, but that seems about something else. castleproject/Core#684 (comment)
The text was updated successfully, but these errors were encountered: