Skip to content

Conversation

@andersfugmann
Copy link
Owner

No description provided.

@andersfugmann andersfugmann requested a review from Copilot June 22, 2025 17:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ppxlib dependency in the OPAM file
  • Replace pexp_function with pexp_function_cases
  • Handle the new Ptyp_open constructor 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_open to 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 in introduces invalid OCaml syntax in a quoted expression; it should be removed and sequencing done with semicolons or line breaks.
             let f' = [%e e] in

@andersfugmann andersfugmann merged commit b4d36a2 into master Jun 25, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant