ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

Example fails to compile #34

Closed michael-schwarz closed 4 years ago

michael-schwarz commented 4 years ago

The example project fails to compile on my machine, the message I get is:

michael@michael-ThinkPad-X1-Carbon-6th:~/Documents/tmp/jsoo-react/example$ esy
info esy 0.6.2 (using esy.json)
.... fetching @opam/js_of_ocaml@github:ocsigen/js_of_ocaml:js_of_ocaml.opam#0bf1                                                                                .... fetching @opam/js_of_ocaml-ppx@github:ocsigen/js_of_ocaml:js_of_ocaml-ppx.o                                                                                .... fetching @opam/js_of_ocaml-lwt@github:ocsigen/js_of_ocaml:js_of_ocaml-lwt.o                                                                                info fetching: done                                                            
info installing: done                                                                                 
info building @opam/dune@opam:1.11.3@9894df55
info building @opam/menhir@opam:20190626@bbeb8953
info building @opam/uucp@opam:12.0.0@b7d4c3df
info building @opam/uucp@opam:12.0.0@b7d4c3df: done
info building @opam/uuseg@opam:12.0.0@bf82c4c7
info building @opam/uuseg@opam:12.0.0@bf82c4c7: done
info building @opam/dune@opam:1.11.3@9894df55: done
info building @opam/cppo@opam:1.6.6@f4f83858
info building @opam/ppx_derivers@opam:1.2.1@ecf0aa45
info building @opam/result@opam:1.4@dc720aef
info building @opam/easy-format@opam:1.3.2@0484b3c4
info building @opam/dune-configurator@opam:1.0.0@4873acd8
info building @opam/mmap@opam:1.1.0@b85334ff
info building @opam/sexplib0@opam:v0.12.0@e432406d
info building @opam/dune-configurator@opam:1.0.0@4873acd8: done
info building @opam/re@opam:1.9.0@d4d5e13d
info building @opam/ppx_derivers@opam:1.2.1@ecf0aa45: done
info building @opam/jbuilder@opam:transition@58bdfe0a
info building @opam/jbuilder@opam:transition@58bdfe0a: done
info building @opam/ocaml-compiler-libs@opam:v0.12.1@5c34eb0d
info building @opam/mmap@opam:1.1.0@b85334ff: done
info building @opam/result@opam:1.4@dc720aef: done
info building @opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d
info building @opam/fpath@opam:0.7.2@45477b93
info building @opam/easy-format@opam:1.3.2@0484b3c4: done
info building @opam/biniou@opam:1.2.1@d7570399
info building @opam/menhir@opam:20190626@bbeb8953: done
info building @opam/atd@opam:2.0.0@087614b7
info building @opam/sexplib0@opam:v0.12.0@e432406d: done
info building @opam/base@opam:v0.12.2@d687150c
info building @opam/cppo@opam:1.6.6@f4f83858: done
info building @opam/ocplib-endian@opam:1.0@aa720242
info building @opam/biniou@opam:1.2.1@d7570399: done
info building @opam/merlin-extend@opam:0.5@a5dd7d4b
info building @opam/ocaml-compiler-libs@opam:v0.12.1@5c34eb0d: done
info building @opam/yojson@opam:1.7.0@7056d985
info building @opam/fpath@opam:0.7.2@45477b93: done
info building @opam/re@opam:1.9.0@d4d5e13d: done
info building @opam/tyxml@opam:4.3.0@c1da25f1
info building @opam/merlin-extend@opam:0.5@a5dd7d4b: done
info building @opam/atd@opam:2.0.0@087614b7: done
info building @opam/yojson@opam:1.7.0@7056d985: done
info building @opam/atdgen-runtime@opam:2.0.0@8a75c3bb
info building @opam/js_of_ocaml-compiler@opam:3.4.0@d2f7c406
info building @opam/atdgen-runtime@opam:2.0.0@8a75c3bb: done
info building @opam/atdgen@opam:2.0.0@5d912e07
info building @opam/atdgen@opam:2.0.0@5d912e07: done
info building @opam/tyxml@opam:4.3.0@c1da25f1: done
info building @opam/odoc@opam:1.4.2@187ed639
info building @opam/ocplib-endian@opam:1.0@aa720242: done
info building @opam/lwt@opam:4.3.0@865b709c
info building @opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d: done
info building @esy-ocaml/reason@3.5.0@d41d8cd9
info building @opam/ppx_blob@opam:0.4.0@88e42e0d
info building @opam/ppx_tools_versioned@opam:5.2.3@4994ec80
info building @opam/base@opam:v0.12.2@d687150c: done
info building @opam/stdio@opam:v0.12.0@04b3b004
info building @opam/js_of_ocaml-compiler@opam:3.4.0@d2f7c406: done
info building @opam/stdio@opam:v0.12.0@04b3b004: done
info building @opam/ppxlib@opam:0.9.0@bfabe269
info building @opam/ppx_blob@opam:0.4.0@88e42e0d: done
info building @opam/odoc@opam:1.4.2@187ed639: done
info building @opam/lwt@opam:4.3.0@865b709c: done
info building @opam/ppx_tools_versioned@opam:5.2.3@4994ec80: done
info building @opam/js_of_ocaml@github:ocsigen/js_of_ocaml:js_of_ocaml.opam#0bf16c4@d41d8cd9
info building @opam/bisect_ppx@opam:1.4.1@e75b441f
info building @opam/bisect_ppx@opam:1.4.1@e75b441f: done
info building @opam/ocamlformat@opam:0.11.0@ec74e6e8
info building @esy-ocaml/reason@3.5.0@d41d8cd9: done
error: build failed with exit code: 1
  build log:
    # esy-build-package: building: @opam/js_of_ocaml@github:ocsigen/js_of_ocaml:js_of_ocaml.opam#0bf16c4
    # esy-build-package: pwd: /home/michael/.esy/3/b/opam__s__js__of__ocaml-3a7c9c5f
    # esy-build-package: running: 'dune' 'build' '-p' 'js_of_ocaml' '-j' '4'
           ocaml (internal) (exit 2)
    /home/michael/.esy/3__________________________________________________________________/i/ocaml-4.8.1000-e74c5c0d/bin/ocaml -I +compiler-libs /home/michael/.esy/3/b/opam__s__js__of__ocaml-3a7c9c5f/_build/.dune/default/dune.ml
    fatal: not a git repository (or any of the parent directories): .git
    Exception:
    Failure
     "Command failed: git log -n1 --pretty=format:%h\nExit code: 128\nOutput:\n".
    error: command failed: 'dune' 'build' '-p' 'js_of_ocaml' '-j' '4' (exited with 1)
    esy-build-package: exiting with errors above...

I am using the following setup:

$ esy --version
0.6.2
$ ocamlc --version
4.08.0
$ dune --version
2.4.0

The problem seems to be that the directory is not a git repository despite having a .git folder. (See also https://github.com/jordwalke/rehp/blob/master/dune).

Now, I'm not sure if this a bug here or something that should be filed against esy or js_of_ocaml. But I thought that even if it is not a jsoo-react issue, you could at least point me in the right direction.

jchavarri commented 4 years ago

@michael-schwarz Thanks for reporting!

Could you checkout branch fix-esy06-lwt5-dune2 and see if it fixes the issue please? I have tried with esy 0.6.0 but it'd be good to make sure 0.6.2 also works.

michael-schwarz commented 4 years ago

Yes, it works now, thank you!