-
Notifications
You must be signed in to change notification settings - Fork 0
[Blazor] Remove obsolete APIs from Components #21
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
base: coderabbit_combined_20260121_augment_sentry_coderabbit_1_base_blazor_remove_obsolete_apis_from_components_pr88
Are you sure you want to change the base?
Conversation
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
WalkthroughThis pull request removes obsolete and deprecated public APIs across the ASP.NET Core Components library, including obsolete component properties, extension methods, entire classes, and type signatures. Changes span Router, EditContext, RemoteBrowserFileStreamOptions, WebEventCallbackFactory, WebRenderer, JSInterop, and WebAssembly authentication modules. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/Components/Forms/src/PublicAPI.Unshipped.txt`:
- Around line 2-3: Add the *REMOVED* markers to the already-shipped API
declarations for the two removed extension methods and delete their entries from
the unshipped list: prefix the existing shipped declarations of static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
Microsoft.AspNetCore.Components.Forms.EditContext! and static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
System.IDisposable! with *REMOVED*, and remove the duplicate *REMOVED* lines
from the unshipped file so only the shipped file records these removals.
🧹 Nitpick comments (1)
src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs (1)
281-292: Consider adding a regression test for externally initiated logout.
This behavior change (no interaction state ⇒ LogOutFailed) is meaningful; a test would lock in the intended outcome.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (20)
src/Components/Components/src/PublicAPI.Unshipped.txtsrc/Components/Components/src/Routing/Router.cssrc/Components/Forms/src/EditContextDataAnnotationsExtensions.cssrc/Components/Forms/src/PublicAPI.Unshipped.txtsrc/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cssrc/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cssrc/Components/Web/src/PublicAPI.Unshipped.txtsrc/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cssrc/Components/Web/src/WebRenderer.cssrc/Components/WebAssembly/JSInterop/src/InternalCalls.cssrc/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txtsrc/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cssrc/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cssrc/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cssrc/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cssrc/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cssrc/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cssrc/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cssrc/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cssrc/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt
💤 Files with no reviewable changes (13)
- src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs
- src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs
- src/Components/Web/src/WebRenderer.cs
- src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs
- src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs
- src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs
- src/Components/Components/src/Routing/Router.cs
- src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs
- src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs
- src/Components/WebAssembly/JSInterop/src/InternalCalls.cs
- src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs
- src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs
- src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs
🧰 Additional context used
🪛 LanguageTool
src/Components/Forms/src/PublicAPI.Unshipped.txt
[style] ~3-~3: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 475 characters long)
Context: ...text! editContext) -> System.IDisposable!
(EN_EXCESSIVE_EXCLAMATION)
🔇 Additional comments (5)
src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt (1)
2-3: LGTM — unshipped API list updated for JSInteropMethods removals.src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs (1)
38-45: LGTM — redirect now consistently uses InteractiveRequestUrl.
This aligns the exception flow with the updated interactive-request API shape.src/Components/Components/src/PublicAPI.Unshipped.txt (1)
2-4: LGTM — component API surface pruning reflected correctly.src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt (1)
2-8: LGTM — authentication API removals captured in unshipped list.src/Components/Web/src/PublicAPI.Unshipped.txt (1)
2-31: LGTM — Web API surface removals reflected cleanly.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| *REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> Microsoft.AspNetCore.Components.Forms.EditContext! | ||
| *REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> System.IDisposable! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify PublicAPI file placement and check for remaining usages of removed methods
# Check if these APIs exist in PublicAPI.Shipped.txt
echo "=== Checking PublicAPI.Shipped.txt for these APIs ==="
find . -name 'PublicAPI.Shipped.txt' -type f -exec grep -l 'AddDataAnnotationsValidation\|EnableDataAnnotationsValidation' {} \;
echo ""
echo "=== Checking PublicAPI.Unshipped.txt for these APIs ==="
find . -name 'PublicAPI.Unshipped.txt' -type f -exec grep -n 'AddDataAnnotationsValidation\|EnableDataAnnotationsValidation' {} +
echo ""
echo "=== Searching for remaining usages of removed parameterless methods ==="
rg -n 'AddDataAnnotationsValidation\s*\(' --type cs --type csproj -g '!PublicAPI' || echo "No matches found"
echo ""
rg -n '\.EnableDataAnnotationsValidation\s*\(' --type cs --type csproj -g '!PublicAPI' || echo "No matches found"
echo ""
echo "=== Verifying parameterized variant exists in code ==="
rg -n 'EnableDataAnnotationsValidation.*IServiceProvider' --type cs || echo "No matches found"Repository: qodo-benchmark/aspnetcore-combined-coderabbit
Length of output: 1249
🏁 Script executed:
#!/bin/bash
# Check both PublicAPI files to understand the state of these APIs
echo "=== PublicAPI.Shipped.txt (first 30 lines) ==="
head -30 ./src/Components/Forms/src/PublicAPI.Shipped.txt
echo ""
echo "=== Searching for these specific APIs in PublicAPI.Shipped.txt ==="
grep -n 'AddDataAnnotationsValidation\|EnableDataAnnotationsValidation' ./src/Components/Forms/src/PublicAPI.Shipped.txt | head -10
echo ""
echo "=== Full PublicAPI.Unshipped.txt ==="
cat ./src/Components/Forms/src/PublicAPI.Unshipped.txtRepository: qodo-benchmark/aspnetcore-combined-coderabbit
Length of output: 4712
Move REMOVED entries to PublicAPI.Shipped.txt.
The two removed APIs are already declared in PublicAPI.Shipped.txt (lines 62 and 64) without *REMOVED* markers. In .NET's PublicAPI tracking convention, when removing previously shipped APIs, the *REMOVED* markers should be in PublicAPI.Shipped.txt where the APIs are currently declared, not in PublicAPI.Unshipped.txt.
Add *REMOVED* prefixes to lines 62 and 64 in PublicAPI.Shipped.txt:
*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> Microsoft.AspNetCore.Components.Forms.EditContext!
*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> System.IDisposable!
Then remove lines 2-3 from PublicAPI.Unshipped.txt.
Migration to the parameterized variant EnableDataAnnotationsValidation(this EditContext editContext, IServiceProvider serviceProvider) is complete—no remaining usages of the parameterless methods exist in the codebase.
🧰 Tools
🪛 LanguageTool
[style] ~3-~3: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 475 characters long)
Context: ...text! editContext) -> System.IDisposable!
(EN_EXCESSIVE_EXCLAMATION)
🤖 Prompt for AI Agents
In `@src/Components/Forms/src/PublicAPI.Unshipped.txt` around lines 2 - 3, Add the
*REMOVED* markers to the already-shipped API declarations for the two removed
extension methods and delete their entries from the unshipped list: prefix the
existing shipped declarations of static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
Microsoft.AspNetCore.Components.Forms.EditContext! and static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
System.IDisposable! with *REMOVED*, and remove the duplicate *REMOVED* lines
from the unshipped file so only the shipped file records these removals.
Benchmark PR from qodo-benchmark#88
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.