dbuenzli / vg

Declarative 2D vector graphics for OCaml

Home Page:http://erratique.ch/software/vg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSOO 3.6.0 support

joelburget opened this issue · comments

The version of vg on opam requires JSOO < 3.6.0 (constraint added in ocaml/opam-repository#16298), but I would like to use vg with JSOO 3.6.0. (I'm not clear how they're incompatible)

@hhugo was kind enough to make a patch you should be able to do opam pin vg --dev immediately. I'll make a release asap.

I have just tried, and it may be necessary to replace js_of_ocaml.ppx by js_of_ocaml-ppx in _tags.

@pveber indeed. Also it seems the ocamlbuild plugin is broken. I don't know what is passing that empty string to --source-map here but it makes the compilation fail:

js_of_ocaml --no-runtime --pretty --debug-info --source-map '' -o test/min_htmlc.js test/min_htmlc.byte
+ js_of_ocaml --no-runtime --pretty --debug-info --source-map '' -o test/min_htmlc.js test/min_htmlc.byte
js_of_ocaml: Error: Sys_error("Is a directory")
Raised by primitive operation at file "stdlib.ml", line 416, characters 7-32
Called from file "lexing.ml", line 86, characters 4-49
Called from file "compiler/lib/js_lexer.ml", line 930, characters 25-57
Called from file "compiler/lib/parse_js.ml", line 75, characters 14-39
Called from file "compiler/lib/parse_js.ml", line 82, characters 15-34
Called from file "compiler/lib/parse_js.ml", line 92, characters 16-44
Called from file "compiler/lib/linker.ml", line 187, characters 12-57
Called from file "compiler/lib/linker.ml", line 370, characters 34-55
Called from file "list.ml", line 110, characters 12-15
Called from file "compiler/lib/linker.ml" (inlined), line 401, characters 2-25
Called from file "compiler/bin-js_of_ocaml/compile.ml", line 110, characters 2-33
Called from file "cmdliner_term.ml", line 25, characters 19-24
Called from file "cmdliner.ml", line 117, characters 32-39
Called from file "cmdliner.ml", line 147, characters 18-36
Called from file "cmdliner.ml", line 265, characters 22-48
Called from file "compiler/bin-js_of_ocaml/js_of_ocaml.ml", line 48, characters 4-225

I suspect the META file of js_of_ocaml is broken. This seems to be returning the empty string and there's --no-runtime, so I expect it used to return some js files for the runtime system.

Anyways this is only needed for the test suite. I'll get rid of js_of_ocaml-ocamlbuild which doesn't do much for this project.

Thanks! I appreciate the quick fix.