bisect_ppx icon indicating copy to clipboard operation
bisect_ppx copied to clipboard

Confused about excluding/linking coverage files with Melange+Dune

Open mlms13 opened this issue 3 years ago • 4 comments

I recently updated Relude to build with Melange (which uses Dune). You can see the latest coverage report on Coveralls. Specifically, you can see that the file tree looks like this:

image

I have two questions about this, which may or may not be related:

  1. Is it possible to hide the node_modules and __tests__ within the _build directory from the coverage report? In my bsconfig.json, I already have this, but it doesn't seem to be ignoring the _test.re files:
    "ppx-flags": [
      [
        "bisect_ppx/ppx",
        "--exclude-files",
        ".*_test.re$$"
      ]
    ]
    
  2. Is it possible to get the Coveralls report to link to the files? It's picking up on the source files that got copied to _build (which isn't checked in) instead of the ones in src, so the Coveralls file view just says "Source not available."

mlms13 avatar Jun 15 '22 14:06 mlms13

Sorry for the huge delay. Please let me know if you are still using Bisect, Melange, and Dune, and whether this is still an issue with Dune's new Melange integration that was released in Dune 3.8.0.

aantron avatar Jun 25 '23 18:06 aantron

No worries, and I'm glad to see you back! I have no idea if this is still relevant, but I started moving bs-decode to the latest melange and dune, where bsconfig.json is no longer a thing. I know that project was also using bisect_ppx, so I'll have to see if any of the same issues with files in node_modules and _build happen there. I'll let you know!

mlms13 avatar Jun 27 '23 18:06 mlms13

Thank you!

aantron avatar Jun 29 '23 11:06 aantron

ftr I pushed some branch to make bisect runtime build on melange. I left the PR as draft so that others interested can find it, but I don't think it should be considered for merge because it would require lifting a lot of core deps lower bounds to the most recent version (OCaml compiler, dune, ...): https://github.com/aantron/bisect_ppx/pull/428.

Maybe in the future there will be an option to opt-in for melange, once Dune handles package management (see https://github.com/ocaml/dune/issues/7939#issuecomment-1589297038).

jchavarri avatar Sep 12 '23 16:09 jchavarri