Fix compatibility with ppxlib 0.36.0#40
Merged
andersfugmann merged 4 commits intomasterfrom Jun 25, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the library to work with ppxlib 0.36.0 by bumping dependencies, replacing function builders, and adding support for new AST shapes.
- Bump
ppxlibdependency in the OPAM file - Replace
pexp_functionwithpexp_function_cases - Handle the new
Ptyp_openconstructor and empty variant cases
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ppx_protocol_conv.opam | Updated ppxlib version constraint to ≥ 0.36.0 |
| ppx/ppx_protocol_conv.ml | Added empty-variant error branch, replaced builders, and included Ptyp_open in match clauses |
| Changelog | Added 5.2.3 entry noting compatibility with ppxlib 0.36.0 |
Comments suppressed due to low confidence (4)
ppx/ppx_protocol_conv.ml:282
- This new branch for empty variants should be covered by a unit test to ensure it raises the expected error at runtime.
| Ptype_variant [] ->
ppx/ppx_protocol_conv.ml:356
- [nitpick] Consider adding a test case for
Ptyp_opento verify that unsupported type descriptors raise the intended error.
| Ptyp_open _
ppx/ppx_protocol_conv.ml:283
- Error messages should be consistent in punctuation; consider adding a period at the end to match other messages (e.g.,
"... not supported.").
raise_errorf ~loc "ADTs with no constructors not supported"
ppx/ppx_protocol_conv.ml:723
- The comma after
inintroduces invalid OCaml syntax in a quoted expression; it should be removed and sequencing done with semicolons or line breaks.
let f' = [%e e] in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.