-
Notifications
You must be signed in to change notification settings - Fork 463
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
Remove obj keys mangle #6354
Remove obj keys mangle #6354
Conversation
@DZakh Great find! 👍 I tested against our current/biggest project (that's already on v11/uncurried) and found no issues with this change. |
I didn't expect it, but there's actually a note in the docs https://rescript-lang.org/docs/gentype/latest/usage#renaming-gentypeas-and-object-mangling-convention |
I'll go update changelog 🙏 |
5aee6b6
to
623b8bd
Compare
@DZakh I noticed that the name mangling is still present in the Gentype code: https://github.com/rescript-lang/rescript-compiler/blob/61c559245dfb43f85a91282f1b775f40138c6ce3/jscomp/gentype/Runtime.ml#L116 |
I think we need to remove it from there as well. I'll be able to tackle it around Monday. |
I've finally found the source of the behavior. Although, I wasn't able to backtrace the reasoning behind it. The code was written 7 years ago by @Hongbo-bb and probably was needed to properly handle
@obj
or something like this.But now, I think it only causes wtf moments when the compiled code is not what you expect.
Solves:
Related to:
_
in object keys consistent between external and JSX #4348It's a big breaking change, but according to tests it doesn't break anything.
@cristianoc @cknitt @zth @mununki What do you think?