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

Single line comments do not work in "Try" section of the website #785

Open
gabriel-bezerra opened this issue Sep 8, 2024 · 1 comment
Open

Comments

@gabriel-bezerra
Copy link

https://reasonml.github.io/en/try?rrjsx=true&reason=PTAEBsFMBdQQ1AXlNATgV0gKCrByAzOcAZ0iA

// let a = true
let a = false

shows

Line 1:1-2 <syntax error>

I tried the same with reason locally and it does not show the same error at version 3.11.0 and ocaml-base-compiler at 5.1.0. I didn't figure out how to get version 3.12.0 to test it too.

$ opam install 'reason>=3.12.0'
[ERROR] Package reason has no version >=3.12.0.
@gabriel-bezerra
Copy link
Author

I managed to use opam pin add reason https://github.com/reasonml/reason.git\#3.12.0 and did not get the error.

$ opam pin add reason https://github.com/reasonml/reason.git\#3.12.0
[reason.3.11.0] synchronised (git+https://github.com/reasonml/reason.git#3.12.0)
reason is now pinned to git+https://github.com/reasonml/reason.git#3.12.0 (version 3.8.2)

The following actions will be performed:
=== downgrade 1 package
  ↘ reason 3.11.0 to 3.8.2 (pinned)

Proceed with ↘ 1 downgrade? [y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
⊘ removed   reason.3.11.0
∗ installed reason.3.8.2
Done.
$ ls
_build       _opam        dune         dune-project hello.opam   hello.re
$ cat hello.re
print_endline("Hello, world!");
// test comment
$ dune clean
$ dune build
$ dune exec hello
Hello, world!

and the same with the current commit on reasonml/reason master branch:

$ opam pin add reason https://github.com/reasonml/reason.git\#6455bb6d339aa613155cff13e0bc0eea9bd220d8
[NOTE] Package reason is currently pinned to
       git+https://github.com/reasonml/reason.git#3.12.0 (version 3.8.2).
[reason.3.8.2] synchronised (git+https://github.com/reasonml/reason.git#6455bb6d339aa613155cff13e0bc0eea9bd220d8)
reason is now pinned to git+https://github.com/reasonml/reason.git#6455bb6d339aa613155cff13e0bc0eea9bd220d8 (version 3.8.2)

The following actions will be performed:
=== recompile 1 package
  ↻ reason 3.8.2 (pinned)

Proceed with ↻ 1 recompilation? [y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
⊘ removed   reason.3.8.2
∗ installed reason.3.8.2
Done.
$ dune clean
$ dune build
$ dune exec hello
Hello, world!

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

1 participant