Alter InvokeOnSpacerBeforeVisible for NET 11.0 so it uses 4 parameters - #1919
Alter InvokeOnSpacerBeforeVisible for NET 11.0 so it uses 4 parameters#1919vnbaaij wants to merge 3 commits into
Conversation
…s instead of 3 for invocation
There was a problem hiding this comment.
🟡 Changes recommended
The new fourth argument is currently a magic number, and it should be named/documented to make the intent and future maintenance safer.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates bUnit’s Virtualize JS interop invocation handler to match the updated VirtualizeJsInterop.OnSpacerBeforeVisible method signature on .NET 11+, addressing the exception reported in issue #1915 when rendering components that use Virtualize.
Changes:
- Adds a 4th argument to the
OnSpacerBeforeVisibleinvocation forNET11_0_OR_GREATER. - Reorders
usingdirectives to keep framework namespaces afterSystem.*.
File summaries
| File | Description |
|---|---|
| src/bunit/JSInterop/InvocationHandlers/Implementation/VirtualizeJSRuntimeInvocationHandler.cs | Passes the additional .NET 11+ reason parameter when invoking OnSpacerBeforeVisible via reflection. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@vnbaaij looks like CI doesn't work because we do not have dotnet 11 rc1 in our workflow files? |
Nope - they are there (in the logs you'll find 11.0.rc-1). xUnit and the newer MTP have a problem. Guess we have to wait that out |
Yeah, we had an issue with the Fluent UI Blazor projects as well with xUnit and MTP v2. But I eventually managed to get everything moved over and 'ditch' VSTest. You can check out our repo to see how I did it. |
We did as well some weeks ago and moved to It seems that rc.1 is making trouble with |
|
Interestingly enough - "it works on my machine" with |
|
I'm using |
Uhhhhh - feel free to add this package to our Not sure what is really going on tbh. It works without issue on my MBP. |
- Upgrade to net11.0 RC1 - Use UserScroll as 4th parameter - Fix compiler warnings which poped up after upgrading to net11.0 RC1
|
With my last changes I can run dotnet test locally (on Windows) without errors on both .net10.0 and .net11.0 |
Alter
InvokeOnSpacerBeforeVisiblefor NET 11.0 so it uses 4 parameters instead of 3 for invocation.Fix #1915 (I hope 😊)
I am unfamiliar with how this change should be tested.
Pull request description
PR meta checklist
mainbranch for codeor targeted at
stablebranch for documentation that is live on bunit.dev.Code PR specific checklist