The following code does not work for ocamldoc, saying Error: External identifiers must be functions, and bs-platform does not seem to have its own ocamldoc in bin folder.
external jquery_ : jquery = "jquery" [@@bs.module]
$ ocamldoc -I node_modules/bs-platform/lib/ocaml/ lib/ocaml/jquery.ml
File "lib/ocaml/jquery.ml", line 11, characters 19-25:
Error: External identifiers must be functions
1 error(s) encountered
Is there any plan to develop ocamldoc for BuckleScript anytime soon?
hi , I did not notice it was broken. so I created a opam switch : https://github.com/ocaml/opam-repository/pull/7597
so ocaml tools built with that switch should work with buckle seamlessly, including ocamldoc etc
so it is merged, @nebuta , would you give it a try?
I tried opam switch 4.02.3+buckle-1, and I still get聽the same error.
$ opam switch list --all | grep buckle
4.02.3+buckle-1 C 4.02.3+buckle-1 4.02.3+buckle-1
-- -- 4.02.3+buckle-master 4.02.3+buckle-master
$ ocamldoc -v
The OCaml documentation generator, version 4.02.3+dev1-2015-07-10
Standard library directory: /Users/nebuta/.opam/4.02.3+buckle-1/lib/ocaml
$ ocamldoc -I node_modules/bs-platform/lib/ocaml/ lib/ocaml/jquery.ml
File "lib/ocaml/jquery.ml", line 11, characters 19-25:
Error: External identifiers must be functions
1 error(s) encountered
Also, I got the error for opam switch 4.02.3+buckle-master.
$ opam switch 4.02.3+buckle-master
=-=- Installing compiler 4.02.3+buckle-master -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 馃惈
[default.comp] https://github.com/bloomberg/bucklescript/archive/master.zip downloaded
Now compiling OCaml. This may take a while, please bear with us...
Fatal error:
"./configure": command not found.
@nebuta sorry, my bad to make a typo in the link..
https://github.com/ocaml/opam-repository/pull/7626
I managed to install by opam switch 4.02.3+buckle-master, but I still get the same error Error: External identifiers must be functions. Is this really the error in my source code?
Line 11 is as follows:
external jquery_ : jquery = "jquery" [@@bs.module]
@nebuta , can you give me a simple way to reproduce it? (the command line to run ocamldoc)
Edit: I can reproduce it now, working on a fix
hi @nebuta , you need ocamldoc -ppx bsppx.exe your_file.ml
hi @nebuta , we will ship ocamldoc with bs-platform, see https://github.com/bloomberg/bucklescript/pull/1114
Most helpful comment
hi @nebuta , we will ship ocamldoc with bs-platform, see https://github.com/bloomberg/bucklescript/pull/1114