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

[Bug]: Unicode characters not supported in names (method, type...) #659

Open
4 of 7 tasks
laymain opened this issue Jun 9, 2024 · 4 comments
Open
4 of 7 tasks

[Bug]: Unicode characters not supported in names (method, type...) #659

laymain opened this issue Jun 9, 2024 · 4 comments
Labels
Bug / Issue Something isn't working User Support This post was made to ask about an issue the user is having Work-in-Progress This issue or pull request is being worked on currently

Comments

@laymain
Copy link

laymain commented Jun 9, 2024

All of the following criteria must be met

  • All Requirements must be installed.
  • Changed the title so that it doesn't just says "[Bug]: "
  • I have searched the GitHub issues for my bug, even in the closed issues.

All of the following are optional to answer

  • Tried reinstalling the Game.
  • Tried reinstalling MelonLoader.
  • Tried restarting PC.
  • Was able to see the Start Screen.

Describe the issue.

Hi there,

I am facing an issue with Rewired library and IL2CPP, MelonLoader is not able to load the dependency because of an invalid name:

[01:18:23.989] [DEBUG] [AssemblyVerifier] Il2CppRewired_Core.dll Has an Invalid Type Name String "MethodInfoStoreGeneric_nqXVGKvgfzozBIAcnvWAyMFzaDld_Internal_Static_Int32_IList_1_☺_Predicate_1_☺_Int32_0`1"

Latest.log

@SamboyCoding
Copy link
Member

SamboyCoding commented Jun 9, 2024

This is arguably a bug in Il2cppInterop which should have renamed the type to not contain those characters (so that they can be referenced in c# source code, if nothing else)

@laymain
Copy link
Author

laymain commented Jun 10, 2024

I'm not sure to understand, in C#, Unicode characters are allowed for type and method names
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/identifier-names

[EDIT]
Hum... you're right, there seem to be a non-valid character in this name, but some are valid,
AssemblyVerifier could take inspiration from https://github.com/microsoft/referencesource/blob/51cf7850defa8a17d815b4700b67116e3fa283c2/System/compmod/system/codedom/compiler/CodeGenerator.cs#L1926-L1968

@SamboyCoding
Copy link
Member

To be clear, what I mean by invalid character is that we should, in theory, force all type and member names to contain only printable ascii characters. Whether or not you can in theory have an emoji in c# type names isn't particularly relevant because they will be a pain to type in an IDE anyway.

@laymain
Copy link
Author

laymain commented Jun 12, 2024

Submitted a PR to Il2CppInterop, hopefully it will be merged 🤞

@HerpDerpinstine HerpDerpinstine added Bug / Issue Something isn't working Work-in-Progress This issue or pull request is being worked on currently User Support This post was made to ask about an issue the user is having labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug / Issue Something isn't working User Support This post was made to ask about an issue the user is having Work-in-Progress This issue or pull request is being worked on currently
Projects
None yet
Development

No branches or pull requests

3 participants