reasonml / reason-cli

Globally installable Reason toolchain.
MIT License
291 stars 23 forks source link

refmt doesnt handle "//" comment syntax #99

Open floscr opened 5 years ago

floscr commented 5 years ago

Refmt doesn't handle the new Comment Syntax from https://github.com/facebook/reason/pull/2254

refmt errors:
File "X.re", line 2, characters 0-2:
Error: 0: <syntax error>

Refmt version

Reason 3.3.3 @ fefe5e4d
erykpiast commented 4 years ago

Do you plan to address this issue? I can see this as well.

jordwalke commented 4 years ago

Yes, it (and many other issues) are fixed in the new reason-cli package that is built from Azure on every commit.

erykpiast commented 4 years ago

@jordwalke Is there some other package to install? I have this issue with version reason-cli@3.3.3-macos-1.

ianchanning commented 3 years ago

As far as I can tell the last update to this repo was April 2018 and this bug was raised in June 2019, so I don't see how a fix could have been released after this. This bug is still there with 3.3.3 which appears to be the latest version.

ianchanning commented 3 years ago

You can use bsrefmt instead of refmt. As mentioned in #103 this repo appears to be archived, it's not mentioned in the editor plugins anymore.

I commented in #103 that if you're using Vim you can run bsrefmt easily enough with the comment :!bsrefmt --in-place %

bsrefmt --version gives 3.6.0 and as far as I understand refmt was just the same base bsrefmt.

bsrefmt does fix this issue and handle single line comments.