Skip to content

Fix dropping attributes of props in JSX v4 #5905

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

Merged
merged 7 commits into from
Dec 15, 2022
Merged

Conversation

mununki
Copy link
Member

@mununki mununki commented Dec 13, 2022

This PR fixes dropping the attributes from the arguments and core_type in the make function or make primitive in JSX v4.
It can fix issue #5904 either.

@mununki
Copy link
Member Author

mununki commented Dec 13, 2022

@cknitt IMHO, if this PR gets approval, then it needs to go to 10.1_release in the syntax repo too.
Sorry for making fixes for 10.1_release 😓

@cknitt
Copy link
Member

cknitt commented Dec 13, 2022

@mununki No problem for me. 😄 Thanks for all the great work you are doing!
I agree, it would be good to have this backported to 10.1, too.

@mununki
Copy link
Member Author

mununki commented Dec 14, 2022

@cristianoc I realized that it doesn't have the same output as this fix in the syntax repo. Because the PR rescript-lang/syntax#683 was not merged in the syntax repo, parsing attributes in the argument of function works differently between compiler and syntax.

Maybe can we reopen the PR rescript-lang/syntax#683 and merge it in the syntax repo first, then make another PR for this fix?

@cristianoc
Copy link
Collaborator

@cristianoc I realized that it doesn't have the same output as this fix in the syntax repo. Because the PR rescript-lang/syntax#683 was not merged in the syntax repo, parsing attributes in the argument of function works differently between compiler and syntax.

Maybe can we reopen the PR rescript-lang/syntax#683 and merge it in the syntax repo first, then make another PR for this fix?

Oh that's right.
To be on the safe side, it might be best to take the PR from the compile repo, and apply it to the syntax repo. To make sure the changes are the same. Hopefully things have not diverged too much, and it's not too risky to do this in terms of introducing possible regressions.

@mununki
Copy link
Member Author

mununki commented Dec 14, 2022

To be on the safe side, it might be best to take the PR from the compile repo, and apply it to the syntax repo.

Not sure I understand correctly.
I think the original PR #5783 in the compiler had commits for different paths /res_syntax/**. Therefore I extracted diffs from each file, and apply them to /syntax/** in the syntax repo. rescript-lang/syntax#722

@mununki
Copy link
Member Author

mununki commented Dec 14, 2022

Backported to the syntax repo rescript-lang/syntax#723

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The breaking change line on the changelog should go on branch 10.1 too.

@mununki
Copy link
Member Author

mununki commented Dec 15, 2022

The breaking change line on the changelog should go on branch 10.1 too.

Got it, thanks! 446c18a

@cristianoc
Copy link
Collaborator

The breaking change line on the changelog should go on branch 10.1 too.

Got it, thanks! 446c18a

Sorry the changelog in this PR was OK.
What I meant is, in the 10.1 branch this line is missing in the changelog.

@mununki
Copy link
Member Author

mununki commented Dec 15, 2022

Sorry the changelog in this PR was OK. What I meant is, in the 10.1 branch this line is missing in the changelog.

Oops, I misread your comment. I'll revert the changelog in this PR. I'll add the same line into the changelog in the 10.1_release branch.'ll

@cristianoc
Copy link
Collaborator

I think this is ready to merge when CI is done.

@mununki mununki merged commit e8d2f97 into master Dec 15, 2022
@mununki mununki deleted the jsx-v4-mangle-props branch December 15, 2022 17:08
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

Successfully merging this pull request may close these issues.

3 participants