Skip to content

Use new TypeName methods in runtime tools #115857

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 5 commits into from
May 22, 2025
Merged

Use new TypeName methods in runtime tools #115857

merged 5 commits into from
May 22, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 22, 2025

This PR replaces the usage of the now-deprecated TypeNameHelpers utility class with the newer TypeName class methods and properties in the runtime tools. The changes include:

  1. Delete the TypeNameHelpers.cs file from src/libraries/Common/src/System/Reflection/Metadata
  2. Remove references to this file from all project files:
    • ILCompiler.TypeSystem.csproj
    • ILCompiler.Trimming.Tests.csproj
    • ILCompiler.Compiler.csproj
    • Mono.Linker.csproj
  3. Replace all calls to TypeNameHelpers.Unescape with TypeName.Unescape
  4. Replace usages of TypeNameHelpers.Split tuple returns with direct access to TypeName.Namespace and TypeName.Name properties

The changes are minimal and focused only on the required updates. No functional changes were made, as the implementations in TypeName provide identical functionality to what was in TypeNameHelpers.

Fixes #112376.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pkgs.dev.azure.com
    • Triggering command: /home/REDACTED/work/runtime/runtime/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/runtime/runtime/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/runtime/runtime/artifacts/toolset/10.0.0-beta.25260.104.txt (dns block)
    • Triggering command: ./.dotnet/dotnet build src/coreclr/tools/aot/ILCompiler.TypeSystem/ILCompiler.TypeSystem.csproj (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label May 22, 2025
Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Use new TypeName methods in runtime tools Use new TypeName methods in runtime tools May 22, 2025
@Copilot Copilot AI requested a review from MichalStrehovsky May 22, 2025 04:41
Copilot finished work on behalf of MichalStrehovsky May 22, 2025 04:41
…NameParser.cs

Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Copilot finished work on behalf of MichalStrehovsky May 22, 2025 04:52
@MichalStrehovsky
Copy link
Member

You missed removing a reference to the now-deleted Common/src/System/Reflection/Metadata/TypeNameHelpers.cs file. There's a build break:

CSC : error CS2001: Source file '/__w/1/s/src/libraries/Common/src/System/Reflection/Metadata/TypeNameHelpers.cs' could not be found. [/__w/1/s/src/coreclr/tools/ILVerification/ILVerification.csproj]

Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented May 22, 2025

You missed removing a reference to the now-deleted Common/src/System/Reflection/Metadata/TypeNameHelpers.cs file. There's a build break:

...

Fixed in commit 5b7f26b by removing the reference to TypeNameHelpers.cs from ILVerification.projitems.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pkgs.dev.azure.com
    • Triggering command: /home/REDACTED/work/runtime/runtime/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/runtime/runtime/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/runtime/runtime/artifacts/toolset/10.0.0-beta.25260.104.txt (dns block)
    • Triggering command: ./.dotnet/dotnet build src/coreclr/tools/ILVerification/ILVerification.csproj (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of MichalStrehovsky May 22, 2025 05:11
Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Copilot finished work on behalf of MichalStrehovsky May 22, 2025 05:58
@MichalStrehovsky
Copy link
Member

LGTM. Cc @dotnet/ilc-contrib for review since I apparently cannot sigoff myself.

@jkotas
Copy link
Member

jkotas commented May 22, 2025

/ba-g infrastructure timeout

@jkotas jkotas merged commit 16fd8fb into main May 22, 2025
134 of 136 checks passed
@akoeplinger akoeplinger deleted the copilot/fix-112376 branch May 22, 2025 16:47
SimaTian pushed a commit that referenced this pull request May 27, 2025
Replace the usage of the TypeNameHelpers utility class with the newer TypeName class methods and properties in the runtime tools.

Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Error loading sessions

Retrying...

Successfully merging this pull request may close these issues.

Use new TypeName methods in runtime tools
3 participants