-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Does Hermes really support ConstAndLet
?
#2365
Comments
Compatibility data is managed by another project: https://github.com/kangax/compat-table. I added the data assuming it would be correct, and therefore useful. If it’s incorrect and not useful then I can remove the Hermes target from esbuild in the next breaking change release. I do not want to test for and maintain JavaScript feature compatibility matrices for obscure targets like Hermes myself. |
thanks for the info @evanw! I just noticed that over there there's a draft PR by the team at Meta maintaining the project: compat-table/compat-table#1808 so I'd say that once that's merged the data will most likely be correct |
Also it’s really strange how broken this is. Making |
I completely agree with this. I still think the Hermes target is useful, so I hope it will stay. Until the PR to compat-table lands, I've submitted a PR to remove Hermes from |
I have investigated this and determined that the bug is with esbuild's compatibility table generator, not with the compatibility data. The compatibility data correctly marks Hermes as broken regarding Specifically the problem is when the test for a feature has many sub-tests and some of those sub-tests have always been broken and have never been fixed. This situation hasn't come up before because previously esbuild has only supported targets that fix their bugs (and that ship at least one version where the feature works) instead of leaving them broken in all shipped versions. I'll fix esbuild's compatibility table generator script which will fix this problem, and which will mark a lot of features as unsupported in Hermes. |
@evanw Thanks for fixing this 🙏 |
First of all, thanks for adding the Hermes target in 4e631f5. We're maintaining a small plugin that targets Hermes, and this makes our lives so much easier.
It looks like the target is listed to support
ConstAndLet
, and I'm wondering what that means in terms of transpilation output. I know thatlet
andconst
are listed under In Progress on their website, and the engine does parse them just fine, but I also know that it basically just interprets them asvar
. There is no support for block-scoped variables (facebook/hermes#575 (comment)), and you can still overwrite the values. IfConstAndLet
assumes either of these, then it's probably a bug and should be removed.The text was updated successfully, but these errors were encountered: