Js.Re.matches -> RegExp.Result.matches - Unexpected bug caused by migration to v12
https://rescript-lang.org/try?version=v12.0.0-rc.3&module=esmodule&code=DYUwLgBAhhC8EFIBOUDuAKABgbQLqYEoBaAPgCkBnAOgCUQqBbKMAYwAsQKAoL0SAIziIUGHPmIk6AcwCiADwAOtTgFdgYRs3acgA
The automated migration results in a different output, which was very difficult to trace in my case. I spent around 4 hours today (mostly because the issue wasn't reproducing locally)
Could you have a look at the migration and see what the solution might be? What is it doing wrong?
I think the migration logic is correct; it's just different logic now, which fixes the previous incorrect behaviour.
I don't understand. What's the problem here if the migration is not wrong?
Look at the generated code. It produces different output, which leads to different runtime behaviour.
Then I would say that the migration isn't correct, or even can't be done, if the APIs are not equivalent. What do you think?