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

Assembly.ReflectionOnlyLoad(...) is obsoleted, consider remove the unused reference in mono #51838

Closed
buyaa-n opened this issue Apr 25, 2021 · 4 comments · Fixed by #52207
Closed
Assignees
Labels
size-reduction Issues impacting final app size primary for size sensitive workloads

Comments

@buyaa-n
Copy link
Contributor

buyaa-n commented Apr 25, 2021

As part of #50529 we have obsoleted several APIs not supported in .Net Core which caused a build warning in mono CoreClr

I see the API calling Assembly.ReflectionOnlyLoad(...) is always called with a value of false for bool reflectionOnly parameter, which means that reference will never actually used. We might want to remove this parameter and related code section from

internal static RuntimeType? GetTypeByName(string typeName, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref StackCrawlMark stackMark,
bool loadTypeFromPartialName)

Originally posted by @buyaa-n in #50941 (comment)

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 25, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@buyaa-n buyaa-n added the runtime-mono specific to the Mono runtime label Apr 25, 2021
@marek-safar marek-safar added the size-reduction Issues impacting final app size primary for size sensitive workloads label Apr 26, 2021
@ghost
Copy link

ghost commented Apr 26, 2021

Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar, @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Issue Details

As part of #50529 we have obsoleted several APIs not supported in .Net Core which caused a build warning in mono CoreClr

I see the API calling Assembly.ReflectionOnlyLoad(...) is always called with a value of false for bool reflectionOnly parameter, which means that reference will never actually used. We might want to remove this parameter and related code section from

internal static RuntimeType? GetTypeByName(string typeName, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref StackCrawlMark stackMark,
bool loadTypeFromPartialName)

Originally posted by @buyaa-n in #50941 (comment)

Author: buyaa-n
Assignees: -
Labels:

runtime-mono, size-reduction, untriaged

Milestone: -

@marek-safar marek-safar added area-CoreLib-mono and removed runtime-mono specific to the Mono runtime labels Apr 26, 2021
@SamMonoRT
Copy link
Member

cc @fanyang-mono

@SamMonoRT
Copy link
Member

SamMonoRT commented Apr 26, 2021

Not sure what the best approach is for associated tests - completely remove from test suite or disable for certain runs.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 3, 2021
@fanyang-mono fanyang-mono removed the untriaged New issue has not been triaged by the area owner label May 3, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 4, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants