janestreet / opam-repository

Opam repository for the development version of Jane Street packages
101 stars 10 forks source link

Error compiling async_js: Unbound value Js.js_error_of_exn #12

Closed ddickstein closed 3 years ago

ddickstein commented 3 years ago
#=== ERROR while compiling async_js.v0.15~preview.124.05+177 ==================#
# context     2.0.7 | linux/x86_64 | ocaml-base-compiler.4.10.0 | https://ocaml.janestreet.com/opam-repository
# path        ~/.opam/4.10.0/.opam-switch/build/async_js.v0.15~preview.124.05+177
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p async_js -j 23
# exit-code   1
# env-file    ~/.opam/log/async_js-17881-b4a96c.env
# output-file ~/.opam/log/async_js-17881-b4a96c.out
### output ###
# [...]
#       ocamlc src/.async_js.objs/byte/async_js__Async_js0.{cmo,cmt} (exit 2)
# (cd _build/default && /home/dani/.opam/4.10.0/bin/ocamlc.opt -w -40 -g -bin-annot -I src/.async_js.objs/byte -I /home/dani/.opam/4.10.0/lib/angstrom -I /home/dani/.opam/4.10.0/lib/async_kernel -I /home/dani/.opam/4.10.0/lib/async_kernel/persistent_connection_kernel -I /home/dani/.opam/4.10.0/lib/async_rpc_kernel -I /home/dani/.opam/4.10.0/lib/base -I /home/dani/.opam/4.10.0/lib/base/base_inte[...]
# File "src/async_js0.ml", line 11, characters 20-38:
# 11 |   Js.Opt.to_option (Js.js_error_of_exn exn)
#                          ^^^^^^^^^^^^^^^^^^
# Error: Unbound value Js.js_error_of_exn
#     ocamlopt src/.async_js.objs/native/async_js__Async_js0.{cmx,o} (exit 2)
# (cd _build/default && /home/dani/.opam/4.10.0/bin/ocamlopt.opt -w -40 -g -I src/.async_js.objs/byte -I src/.async_js.objs/native -I /home/dani/.opam/4.10.0/lib/angstrom -I /home/dani/.opam/4.10.0/lib/async_kernel -I /home/dani/.opam/4.10.0/lib/async_kernel/persistent_connection_kernel -I /home/dani/.opam/4.10.0/lib/async_rpc_kernel -I /home/dani/.opam/4.10.0/lib/base -I /home/dani/.opam/4.10.[...]
# File "src/async_js0.ml", line 11, characters 20-38:
# 11 |   Js.Opt.to_option (Js.js_error_of_exn exn)
#                          ^^^^^^^^^^^^^^^^^^
# Error: Unbound value Js.js_error_of_exn
hhugo commented 3 years ago

You need the use js_of_ocaml#master to complie the latest async_js. Ill try to make a new release of js_of_ocaml later this week

ddickstein commented 3 years ago

Can you elaborate on how I would use the master branch of js_of_ocaml if I want to stay up to date w/ this repository? I tried the following:

opam repository add js_of_ocaml git@github.com:ocsigen/js_of_ocaml.git

That command worked but seemed to have no effect on the async_js install.

hhugo commented 3 years ago

opam pin add js_of_ocaml --dev should do it I think