Closed edwintorok closed 6 years ago
About the .git
and _opam
excludes, I'm surprised ocamlbuild
looks into .
directories, besides shouldn't that rather be upstreamed to ocamlbuild
? topkg
should not be the place to work around ocamlbuild
issues /cc @gasche.
I believe that ocamlbuild already excludes .git
by default, but it does not handle _opam
in any special way. (Are build artifact stored there in a build of opam packages?). I wouldn't mind adding _opam
in the excluded list by default (an explanation of why that is useful would be nice), but that would only be in future ocamlbuild releases.
I checked that using the -X
option adds to the list of excluded directories instead of replacing it; if everything goes well, -X .git -X _opam
should be equivalent to -X _opam
. @edwintorok, why did you need to add -X .git
?
Looks like ocamlbuild is ignoring .git
and other VCS directories since 2014 or so: I've been copying around that traverse exclude from an older _tags
file and didn't realize ocamlbuild does the right thing on its own now.
Ignoring _opam
by default is now merged in ocamlbuild and should take effect in the next ocamlbuild release. (0.12)
Thanks @gasche.
Thanks your patch is in as 4eb20d16e9c31c2edd6d02e646f5d52224c
This should allow for fairer build time comparisons when
topkg build
is used withocamlbuild
orjbuilder
, sincejbuilder
defaults to4
parallel jobs, andocamlbuild
to 1.Having this in
topkg
would allow to control the number of builds the same way regardless whetherocamlbuild
ortopkg
is used, see https://github.com/diml/topkg-jbuilder/pull/4#issuecomment-320652115.The
.git
excludes are something I used to repeat in my_tags
files, but might be useful to just ignore them by default. It doesn't matter for small repositories, but for a large.git
it can speed up the build a little. The_opam
exclude would be useful foropam2
local switches, otherwiseocamlbuild
complains of hygiene.