Commit graph

5 commits

Author SHA1 Message Date
Simon Cruanes
115b6276a3 Use instrumentation stanza for CBOR (cleaner approach)
Changed CBOR from 'pps bisect_ppx' to 'instrumentation (backend bisect_ppx)'
which is dune's recommended approach for coverage when not using custom
preprocessing.

Benefits:
- Cleaner dune syntax
- Use --instrument-with bisect_ppx flag (no env vars needed)
- Coverage files auto-managed in _build
- More idiomatic dune

Updated documentation to reflect new usage:
  dune runtest --instrument-with bisect_ppx
  bisect-ppx-report summary --coverage-path=_build

Core library still uses 'pps bisect_ppx' due to per-module preprocessing
requirements (cpp.exe for 3 modules).
2026-02-08 12:25:58 +00:00
Simon Cruanes
e63ef422a4 Enable bisect_ppx coverage instrumentation via per-module preprocessing
Solved the preprocessor conflict by using per-module dune stanza:
- CCAtomic, CCList, CCVector: Use cpp.exe (need version conditionals)
- All other core modules: Use bisect_ppx for coverage
- containers_cbor: Full bisect_ppx coverage (no cpp needed)

This allows coverage collection on ~95% of the codebase while
maintaining version compatibility preprocessing where needed.

Initial coverage results:
- CBOR: 87.50% (203/232 points) from RFC test vectors
- Core: instrumented except 3 modules

To generate coverage:
  BISECT_FILE=_coverage/bisect dune runtest
  bisect-ppx-report html -o _coverage/html
2026-02-08 05:53:02 +00:00
Simon Cruanes
10865eaced reformat 2022-07-04 13:36:06 -04:00
Simon Cruanes
bad23766e3
chore: enable preprocessor in cbor 2022-06-28 20:56:50 -04:00
Simon Cruanes
69907e96d1
feat: add Containers_cbor module
from scratch reimplementation of https://www.rfc-editor.org/rfc/rfc8949.html
2022-06-16 22:21:35 -04:00