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

@obj attribute regression #6730

Open
jfrolich opened this issue Apr 18, 2024 · 7 comments
Open

@obj attribute regression #6730

jfrolich opened this issue Apr 18, 2024 · 7 comments

Comments

@jfrolich
Copy link

This caused a bug that one of our tests caught. Is this a known breaking change or a bug? (compare 10.1 vs 11 in the playground)

https://rescript-lang.org/try?version=v10.1.2&code=FAguE8AcFMAIDMCWAbaAFATgexhiAhAQwHMQABLAIwCtZoAPUaDAO0OVgFtCBraAMRTpsuAiQBcsABTBYsAH4B9CDEkBnUBkQtiAXgD8AGhBz5yQhoCyWACaIk0G5PjIshUAeOzYAVxaJQLwBKWF0APgQhTBxmMWJQ2AAiRJAAKTUAOldiKW4+QVRo0XAiHKUVaF1EynNEw2kgxqA

@zth
Copy link
Collaborator

zth commented Apr 18, 2024

This is an intentional change, and you're now encouraged to change the output using @as: #6412

The original change that caused this: #6354

@jfrolich
Copy link
Author

Isn't the JSX3 ppx using this internally? Meaning that prepended underscored attributes don't work anymore. Or is that not affected?

@jfrolich
Copy link
Author

Ah amazing that the @obj notation now support @as!

@jfrolich
Copy link
Author

Hmm just confirmed this does also break JSX and @as doesn't seem to work there :|

@zth
Copy link
Collaborator

zth commented Apr 18, 2024

@mununki any ideas?

@mununki
Copy link
Member

mununki commented Apr 19, 2024

@jfrolich Can you share the sample code that is broken in JSX?

@jfrolich
Copy link
Author

It's in JSX3, I managed to work around it using keyword escapes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants