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

Move out globalization code from runtime #98495

Merged
merged 23 commits into from
Mar 15, 2024

Conversation

mkhamoyan
Copy link
Member

@mkhamoyan mkhamoyan commented Feb 15, 2024

Currently we compile the globalization code twice:

  1. directly into the mono runtime, by duplicating the logic
  2. from src/native/System.Globalization.Native

By this PR we will move the globalization code out of the mono runtime.

@ghost
Copy link

ghost commented Feb 15, 2024

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: mkhamoyan
Assignees: mkhamoyan
Labels:

area-System.Globalization

Milestone: -

@mkhamoyan
Copy link
Member Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@vargaz
Copy link
Contributor

vargaz commented Feb 15, 2024

If the code in native-library.c is removed, how are these pinvoke methods going to be resolved ?

@mkhamoyan
Copy link
Member Author

If the code in native-library.c is removed, how are these pinvoke methods going to be resolved ?

return GlobalizationResolveDllImport(entrypointName);
I think this part will handle it

@jkoritzinsky
Copy link
Member

If the code in native-library.c is removed, how are these pinvoke methods going to be resolved ?

return GlobalizationResolveDllImport(entrypointName);

I think this part will handle it

This is in the CoreCLR code-base, which isn't used by Mono at all. The code you removed in native-library.c is the equivalent code in Mono.

@mkhamoyan
Copy link
Member Author

mkhamoyan commented Feb 21, 2024

This is in the CoreCLR code-base, which isn't used by Mono at all. The code you removed in native-library.c is the equivalent code in Mono.

I see, but it is not clear for me why after removing code from native-library.c, tests which pinvoke globalization code didn't complain.
Code in native-library.c was was only necessary to redirect the pinvoke to look inside of the runtime instead of libSystem.Native.Globalization.

@mkhamoyan
Copy link
Member Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mkhamoyan
Copy link
Member Author

@lewing @akoeplinger could you please review

We can now use __typeof__ in recent MSVC and some small tweaks to how
the function pointers are defined.

Also fix the PDB not getting copied next to the .dll and disable
validating the .so file which doesn't apply to Windows.
@mkhamoyan
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan
Copy link
Member Author

Failures are not related.

@mkhamoyan mkhamoyan merged commit c7ada75 into dotnet:main Mar 15, 2024
236 of 253 checks passed
@mkhamoyan mkhamoyan deleted the globalization_move_out branch March 15, 2024 09:58
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Globalization runtime-mono specific to the Mono runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants