dbuenzli / topkg

The transitory OCaml software packager
http://erratique.ch/software/topkg
ISC License
69 stars 25 forks source link

topkg doc not working anymore #118

Closed mmottl closed 6 years ago

mmottl commented 6 years ago

topkg bistro seemed to be working fine just a few months ago. But now it fails when it tries to build documentation.

Here is the output of topkg doc --verbosity=debug for the latest release of pcre-ocaml, which shows more details for the doc step:

topkg: [INFO] topkg v0.9.0 running
topkg: [EXEC:23637] ['ocaml' 'pkg/pkg.ml' 'ipc' 'debug'
                     '/var/folders/b8/2xcpkln10dz1xf23bk4323c00000gn/T/topkg2bd65ctopkg'
                     'pkg']
pkg.ml: [INFO] topkg v0.9.0, running main
topkg: [EXEC:23638] ['ocaml' 'pkg/pkg.ml' 'build' '-v' '-v' '--pkg-name'
                     'pcre' '--build-dir' '_build' '--raw' '-docflags'
                     '--raw' '-colorize-code,-charset,utf-8' '--raw'
                     'doc/api.docdir/index.html']
pkg.ml: [INFO] topkg v0.9.0, running main
pkg.ml: [EXEC] ['type' 'git' 1>'/dev/null' 2>'/dev/null']
pkg.ml: [INFO] Build configuration:
               pkg-name: pcre
               build-dir: _build
               vcs: true
               pinned: false
               dev-pkg: false
               tests:
               debug: true
               debugger-support: false
               profile: false
               toolchain:
pkg.ml: [EXEC] ['jbuilder' 'build' '--root' '.']
    ocamldep src/config/discover.depends.ocamldep-output
    ocamldep src/pcre.dependsi.ocamldep-output
    ocamldep src/pcre.depends.ocamldep-output
      ocamlc src/pcre.{cmi,cmti}
      ocamlc src/config/discover.{cmi,cmo,cmt}
    ocamlopt src/config/discover.{cmx,o}
      ocamlc src/pcre.{cmo,cmt}
    ocamlopt src/pcre.{cmx,o}
    ocamlopt src/config/discover.exe
    discover src/c_flags.sexp,src/c_library_flags.sexp
      ocamlc src/pcre.cma
    ocamlopt src/pcre.{a,cmxa}
      ocamlc src/pcre_stubs.o
  ocamlmklib src/dllpcre_stubs.so,src/libpcre_stubs.a
    ocamlopt src/pcre.cmxs
topkg: [EXEC:23693] ['opam' 'config' 'var' 'odig:etc']
topkg: [ERROR] create temporary file _build/doc/api.docdir/bos-41ad2a.tmp: No
               such file or directory

The problem is that there is no doc directory in build.

dbuenzli commented 6 years ago

I'm not familiar with how topkg-jbuilder handles the matter. As topkg doc --help mentions the topkg doc is very ad-hoc and ocamlbuild specific. Maybe @diml or @samoht has an idea.

dbuenzli commented 6 years ago

It seems the problem was with topkg-jbuilder https://github.com/dbuenzli/topkg/pull/114 should also improve the situtation. So I'm closing this.