Skip to content
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

Switch to a unified, shared managed parser for Type names #45033

Open
CoffeeFlux opened this issue Nov 20, 2020 · 3 comments · May be fixed by #112670
Open

Switch to a unified, shared managed parser for Type names #45033

CoffeeFlux opened this issue Nov 20, 2020 · 3 comments · May be fixed by #112670
Assignees
Labels
area-AssemblyLoader-mono disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@CoffeeFlux
Copy link
Contributor

CoffeeFlux commented Nov 20, 2020

Mono currently has a native parser and two managed parsers (TypeNameParser and TypeSpec) for... reasons. Ideally we would only have a single managed implementation, use it as much as possible, and share it with CoreCLR.

Ideally, Mono should share the same assembly name parsing logic as CoreCLR, which is AssemblyNameParser.TryParse.

We can probably share for most uses in reflection. The Mono runtime also calls this internally from some places, and also I think the AOT compiler might need it. One idea is to compile the managed TypeNameParser as a library using NativeAOT and call it from the AOT compiler.

@ghost
Copy link

ghost commented Nov 20, 2020

Tagging subscribers to this area: @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Issue Details

Mono currently has a native parser and two managed parsers (TypeNameParser and TypeSpec) for... reasons. Ideally we would only have a single managed implementation, use it as much as possible, and share it with CoreCLR.

Author: CoffeeFlux
Assignees: -
Labels:

area-AssemblyLoader-mono

Milestone: Future

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Nov 20, 2020
@CoffeeFlux CoffeeFlux removed the untriaged New issue has not been triaged by the area owner label Nov 20, 2020
@lambdageek lambdageek added the disabled-test The test is disabled in source code against the issue label Jun 11, 2024
@teo-tsirpanis
Copy link
Contributor

I'd be interested in working at this and have removed TypeSpec in a branch of mine. The native type name parser can be removed by replacing it with the runtime calling the managed one, just like how CoreCLR does it.

However, the native type name parser is depended upon by the embedding API, and reimplementing mono_reflection_parse_type on top of the managed parser does not seem easy. Let me know how to proceed.

@teo-tsirpanis teo-tsirpanis self-assigned this Feb 14, 2025
@jkotas
Copy link
Member

jkotas commented Feb 14, 2025

the native type name parser is depended upon by the embedding API, and reimplementing mono_reflection_parse_type on top of the managed parser does not seem easy

Yes, that sounds non-trival. I would leave it alone.

@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-AssemblyLoader-mono disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants