Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
81d19f6
Initial plan
Copilot Jul 16, 2025
57a002d
Remove obsolete APIs from Blazor components
Copilot Jul 16, 2025
6d839b3
Fix PublicAPI changes: Move removed APIs to Unshipped.txt with *REMOV…
Copilot Jul 16, 2025
a1d12ed
Remove additional obsolete APIs from Components.Web
Copilot Jul 16, 2025
6d7ae8c
Remove additional obsolete APIs from Components.WebAssembly
Copilot Jul 16, 2025
ae83527
Fix PublicAPI and test compilation issues with obsolete APIs
Copilot Jul 17, 2025
5542a4d
Fix logout validation logic to handle null HistoryEntryState properly
Copilot Jul 17, 2025
7a9270e
Restore NotifyLocationChanged to PublicAPI.Shipped.txt per review fee…
Copilot Jul 17, 2025
b773e74
Remove NotifyLocationChanged(string, bool) from PublicAPI.Shipped.txt…
Copilot Jul 17, 2025
e0a3d4d
Fix PublicAPI.Shipped.txt files by removing obsolete API entries
Copilot Jul 17, 2025
388e4c3
Restore all PublicAPI.Shipped.txt files to original state and fix nul…
Copilot Jul 17, 2025
b1f3a4d
Fix API analyzer error by removing obsolete JSInteropMethods entry fr…
Copilot Jul 17, 2025
b86f4e4
Undo changes to PublicAPI.Shipped.txt and fix obsolete API entries in…
Copilot Jul 17, 2025
72de494
Restore PublicAPI.Shipped.txt to original state per review feedback
Copilot Jul 18, 2025
5df2b0b
Fix PublicAPI baseline policy violations by adding proper *REMOVED* e…
Copilot Jul 18, 2025
ac7e0aa
Merge branch 'main' into copilot/fix-50548
Copilot Jul 18, 2025
ca2cc12
Fix RS0017 error by removing non-existent ApplyHotReloadDeltas from P…
Copilot Jul 18, 2025
7a915e5
Fix RS0017 error by removing obsolete NotifyLocationChanged method fr…
Copilot Jul 18, 2025
7f6edda
Undo changes to PublicAPI.Shipped.txt per review feedback
Copilot Jul 18, 2025
c587cd6
Fix RS0017 error by adding *REMOVED* entries for both NotifyLocationC…
Copilot Jul 18, 2025
7b9353d
Merge branch 'main' into copilot/fix-50548
javiercn Aug 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix PublicAPI and test compilation issues with obsolete APIs
Co-authored-by: javiercn <[email protected]>
  • Loading branch information
Copilot and javiercn committed Jul 17, 2025
commit ae835278a0e133a685a84cfc358e45669bfd61cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,37 +370,6 @@ public async Task AuthenticationManager_Logout_DoesNothingOnRedirect()

}

[Fact]
public async Task AuthenticationManager_Logout_RedirectsToFailureOnInvalidSignOutState()
{
// Arrange
var (remoteAuthenticator, renderer, authServiceMock) = CreateAuthenticationManager(
"https://www.example.com/base/authentication/logout",
new InteractiveRequestOptions { Interaction = InteractionType.SignIn, ReturnUrl = "https://www.example.com/base/fetchData" }.ToState());

if (remoteAuthenticator.SignOutManager is TestSignOutSessionStateManager testManager)
{
testManager.SignOutState = false;
}

var parameters = ParameterView.FromDictionary(new Dictionary<string, object>
{
[_action] = RemoteAuthenticationActions.LogOut
});

// Act
await renderer.Dispatcher.InvokeAsync<object>(() => remoteAuthenticator.SetParametersAsync(parameters));

// Assert
Assert.Equal(
"https://www.example.com/base/authentication/logout-failed",
remoteAuthenticator.Navigation.Uri);

Assert.Equal(
"The logout was not initiated from within the page.",
((TestNavigationManager)remoteAuthenticator.Navigation).HistoryEntryState);
}

[Fact]
public async Task AuthenticationManager_Logout_NavigatesToLogoutFailureOnError()
{
Expand Down Expand Up @@ -731,8 +700,6 @@ private static
Mock.Of<IOptionsSnapshot<RemoteAuthenticationOptions<OidcProviderOptions>>>(),
navigationManager);

remoteAuthenticator.SignOutManager = new TestSignOutSessionStateManager();

remoteAuthenticator.AuthenticationService = authenticationServiceMock;
remoteAuthenticator.AuthenticationProvider = authenticationServiceMock;
return (remoteAuthenticator, renderer, authenticationServiceMock);
Expand All @@ -756,24 +723,6 @@ protected override void NavigateToCore(string uri, NavigationOptions options)
}
}

#pragma warning disable CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility
private class TestSignOutSessionStateManager : SignOutSessionStateManager
#pragma warning restore CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility
{
public TestSignOutSessionStateManager() : base(null)
{
}
public bool SignOutState { get; set; } = true;

public override ValueTask SetSignOutState()
{
SignOutState = true;
return default;
}

public override Task<bool> ValidateSignOutState() => Task.FromResult(SignOutState);
}

private class TestJsRuntime : IJSRuntime
{
public (string identifier, object[] args) LastInvocation { get; set; }
Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be changed at all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 72de494. Restored PublicAPI.Shipped.txt to its original state as required. However, this creates an API analyzer error RS0017 because the removed obsolete method is still listed in Shipped.txt but no longer exists in the code. Need guidance on the proper approach for handling this scenario while maintaining the API baseline policy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proper approach is to add an entry to the associated *.Unshipped.txt file including the *REMOVED* prefix on the entry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo the change to this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7f6edda. Undid the change to PublicAPI.Shipped.txt as requested. The NotifyLocationChanged method entry has been restored to the file. Note: This creates an API analyzer error RS0017 since the method was removed from the code but remains listed in Shipped.txt.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way to fix this is to add an entry on the PublicAPI.Unshipped.txt for that method with the *REMOVED* prefix

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMe
static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestOption(this System.Net.Http.HttpRequestMessage! requestMessage, string! name, object! value) -> System.Net.Http.HttpRequestMessage!
static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestStreamingEnabled(this System.Net.Http.HttpRequestMessage! requestMessage, bool streamingEnabled) -> System.Net.Http.HttpRequestMessage!
static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserResponseStreamingEnabled(this System.Net.Http.HttpRequestMessage! requestMessage, bool streamingEnabled) -> System.Net.Http.HttpRequestMessage!
static Microsoft.AspNetCore.Components.WebAssembly.Infrastructure.JSInteropMethods.NotifyLocationChanged(string! uri, bool isInterceptedLink) -> void

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this change.

It needs to be on the src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt with the *REMOVED* prefix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b773e74. Removed the line from PublicAPI.Shipped.txt as requested. The REMOVED entry remains correctly placed in PublicAPI.Unshipped.txt.

static Microsoft.AspNetCore.Components.WebAssembly.Infrastructure.JSInteropMethods.NotifyLocationChanged(string! uri, string? state, bool isInterceptedLink) -> void
static Microsoft.AspNetCore.Components.WebAssembly.Infrastructure.JSInteropMethods.NotifyLocationChangingAsync(string! uri, string? state, bool isInterceptedLink) -> System.Threading.Tasks.ValueTask<bool>
Loading