aantron / bisect_ppx

Code coverage for OCaml and ReScript
http://aantron.github.io/bisect_ppx/demo/
MIT License
301 stars 60 forks source link

ignoring generated files with dune #276

Closed zapashcanon closed 4 years ago

zapashcanon commented 4 years ago

Hi,

I just managed to get bisect_ppx working with generated file, but as it took me a little bit of time, I have some question/suggestion/remarks about the documentation. Here's my dune file.

Everything is working, that's mainly to clarify things for others and eventually helping improving the documentation.

Cheers !

aantron commented 4 years ago

Thanks, I actually didn't know that this requires (edit: strongly benefits from) using preprocessor_deps myself!

why do I have to pass src/bisect.exclude and not bisect.exclude as it's the case for the preprocessor_deps field ? Also in the exclude file itself, I have to write src/file.ml and not file.ml which was a little bit confusing too

Not sure if the question is rhetorical, but if not, it's because everything in the dune file is taken relative to the file's directory, so that you can move that directory around and nothing breaks. On the other hand, Bisect_ppx operates on the whole project from its root directory.

I'll be sure to document that and the rest.

aantron commented 4 years ago

The linked commit should take care of points 1 and 3. I opted not to add a full example with ocamllex or menhir for now, mainly because there are already four example repos to go with the main one. I'd like to wait for someone to specifically have a problem with using Bisect_ppx with ocamllex or menhir before adding another. I hope the changes to the docs from the above commit will be enough for people to get ocamllex and menhir working with Bisect_ppx quickly without the need of an example repo.

zapashcanon commented 4 years ago

That looks good to me. Thanks !

I hope the changes to the docs from the above commit will be enough for people to get ocamllex and menhir working with Bisect_ppx quickly without the need of an example repo.

I think it should be enough. :)