File "/forge/src/c-cl/editor/ide/jv.ml", line 1, characters 0-0:
Error: Error are exported as twice
head ide/jv.ml
(*---------------------------------------------------------------------------
Copyright (c) 2020 The brr programmers. All rights reserved.
Distributed under the ISC license, see terms at the end of the file.
---------------------------------------------------------------------------*)
external pure_js_expr : string -> 'a = "caml_pure_js_expr"
external js_expr : string -> 'a = "caml_js_expr"
external wrap_callback : ('a -> 'b) -> 'c = "caml_js_wrap_callback"
The first few lines are comments. How is there an error on line 1 ?
brr’s Jv module has both an exception named Error and a module named Error. Doing that can trigger the error that you see.
Check out the playground for a min reproducible example.
There are a few places in the rescript compiler that trigger the error. It’s from the report_error function. (you can grep the rescript compiler source to find them)
| Bs_duplicate_exports str ->
Format.fprintf ppf "%s are exported as twice" str