# Testing changes to \`bin\_prot\`/\`ppx\_bin\_prot\`?

**URL:** <https://discuss.ocaml.org/t/testing-changes-to-bin-prot-ppx-bin-prot/17870>\
**Category:** Ecosystem\
**Tags:** ppx, bin\_prot\
**Created:** [March 5, 2026, 10:53am UTC](https://discuss.ocaml.org/t/testing-changes-to-bin-prot-ppx-bin-prot/17870 "2026-03-05T10:53:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoric](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yoric/32/6071_2.png) [@Yoric](https://discuss.ocaml.org/u/Yoric)\
**Post date:** [March 5, 2026, 10:53am UTC](https://discuss.ocaml.org/t/testing-changes-to-bin-prot-ppx-bin-prot/17870/1 "2026-03-05T10:53:22Z")

</div>

I have developed an experimental change to `bin_prot`to help with migrating data across schema versions. This change affects the API of `bin_prot`, insofar as `'a reader` becomes `(’a, 'ctx) reader` and `bin_read_t` takes an additional argument.

I’m now trying to patch `ppx_bin_prot` to be able to automatically `@@derive` readers. I have code that builds, and probably doesn’t work yet, but I’m at a loss on how to test this.

Any attempt I’ve made to use my modified `ppx_bin_prot` requires `gel`, which uses `ppx_bin_prot`, but somehow ends up using my new `bin_prot` with the existing `ppx_bin_prot`.

Has anybody attempted to contribute to `bin_prot`/`ppx_bin_prot`? If so, how did you handle testing?

---

<div class="post-metadata">

**Author:** ![Yoric](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yoric/32/6071_2.png) [@Yoric](https://discuss.ocaml.org/u/Yoric)\
**Post date:** [March 5, 2026, 10:55am UTC](https://discuss.ocaml.org/t/testing-changes-to-bin-prot-ppx-bin-prot/17870/2 "2026-03-05T10:55:37Z")

</div>

Cc @Jonathan whom I believe has successfully contributed to `ppx_bin_prot` in the past.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://discuss.ocaml.org/u/Jonathan)\
**Post date:** [March 5, 2026, 1:05pm UTC](https://discuss.ocaml.org/t/testing-changes-to-bin-prot-ppx-bin-prot/17870/3 "2026-03-05T13:05:24Z")

</div>

I did contribute a small fix to `ppx_bin_prot` a few years ago. The fix was straightforward enough that I did not have to do testing beyond running the existing test suite and providing a handful of new examples. I do not remember running into any issue running the test suite but this was a long time ago. I am not sure I understand what tests you are trying to run here and how exactly you are running into problems.

---

<div class="post-metadata">

**Author:** ![Yoric](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yoric/32/6071_2.png) [@Yoric](https://discuss.ocaml.org/u/Yoric)\
**Post date:** [April 8, 2026, 6:53am UTC](https://discuss.ocaml.org/t/testing-changes-to-bin-prot-ppx-bin-prot/17870/4 "2026-04-08T06:53:10Z")

</div>

Well, I guess I’ve created my own (de)serialization lib now 🤷 .
