Skip to content

[HotReloadAgent] Update MetadataUpdateHandlerInvoker to be nullable friendly #48838

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

Merged
merged 3 commits into from
May 8, 2025

Conversation

maraf
Copy link
Member

@maraf maraf commented May 7, 2025

Contributes to dotnet/aspnetcore#61272

PS> dotnet build .\src\Components\WebAssembly\WebAssembly\src\Microsoft.AspNetCore.Components.WebAssembly.csproj
Restore complete (1.3s)
  Microsoft.JSInterop succeeded (0.6s) → artifacts\bin\Microsoft.JSInterop\Debug\net10.0\Microsoft.JSInterop.dll
  Microsoft.JSInterop.WebAssembly succeeded (0.6s) → artifacts\bin\Microsoft.JSInterop.WebAssembly\Debug\net10.0\Microsoft.JSInterop.WebAssembly.dll
  Microsoft.AspNetCore.Components succeeded (1.4s) → artifacts\bin\Microsoft.AspNetCore.Components\Debug\net10.0\Microsoft.AspNetCore.Components.dll
  Microsoft.AspNetCore.Components.Forms succeeded (0.9s) → artifacts\bin\Microsoft.AspNetCore.Components.Forms\Debug\net10.0\Microsoft.AspNetCore.Components.Forms.dll
  Microsoft.AspNetCore.Components.Web succeeded (0.8s) → artifacts\bin\Microsoft.AspNetCore.Components.Web\Debug\net10.0\Microsoft.AspNetCore.Components.Web.dll
  Microsoft.AspNetCore.Components.WebAssembly failed with 1 error(s) (0.7s)
    C:\Nuget\microsoft.dotnet.hotreload.agent\10.0.100-preview.5.25252.107\contentFiles\cs\netstandard2.1\MetadataUpdateHandlerInvoker.cs(334,38): error CS8600: Converting null literal or possible null value to non-nullable type.

Build failed with 1 error(s) in 5.6s

@maraf maraf self-assigned this May 7, 2025
@maraf maraf requested review from Copilot and tmat and removed request for Copilot May 7, 2025 08:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the MetadataUpdateHandlerInvoker to be nullable friendly, addressing the CS8600 compiler error when converting null values.

  • Changed the declaration of assemblyIdentifier to allow null values.
Comments suppressed due to low confidence (1)

src/BuiltInTools/HotReloadAgent/MetadataUpdateHandlerInvoker.cs:330

  • Using a nullable type for assemblyIdentifier resolves the compiler error; please ensure that all subsequent usages of assemblyIdentifier properly handle the potential null value.
string? assemblyIdentifier;

@maraf maraf merged commit 05c8e55 into main May 8, 2025
30 checks passed
@maraf maraf deleted the maraf/HotReloadAgentNullable branch May 8, 2025 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants