Skip to content

Conversation

bensmrs
Copy link
Contributor

@bensmrs bensmrs commented Jun 17, 2025

This pull-request concerns:

  • gendarme.0.3.0: Libraries to marshal OCaml data structures
  • gendarme-json.0.3.0: Libraries to marshal OCaml data structures (JSON)
  • gendarme-toml.0.3.0: Libraries to marshal OCaml data structures (TOML)
  • gendarme-yaml.0.3.0: Libraries to marshal OCaml data structures (YAML)
  • ppx_marshal.0.3.0: Preprocessor extension to marshal OCaml types
  • ppx_marshal_ext.0.3.0: Preprocessor extension to simplify writing Gendarme encoders


🐫 Pull-request generated by opam-publish v2.5.1

@bensmrs
Copy link
Contributor Author

bensmrs commented Jun 17, 2025

What would you recommend me to do in this case? Drop 4.13 support? Reimplement Seq.equal myself? Is there a mechanism in Dune/Opam to provide custom implementations for OCaml versions where such implementations are missing?

Thanks!

@raphael-proust
Copy link
Contributor

Drop 4.13 support? Reimplement Seq.equal myself? Is there a mechanism in Dune/Opam to provide custom implementations for OCaml versions where such implementations are missing?

There are some compatibility packages to bridge that gap. You can give https://github.com/c-cube/seq/tree/master a try maybe? I'm not sure it'd work for your usecase, it might be for the 4.07 gap instead. Maybe https://github.com/ocamllibs/stdcompat?

Otherwise, there is a mechanism in dune to include modules conditionally (see enable_if) and a mechanism to select different implementations (see https://dune.readthedocs.io/en/stable/reference/library-dependencies.html#alternative-dependencies).

Dropping support for 4.13 is also a valid choice. You can maybe query opam to check which of your revdeps require ocaml<4.14 to help you decide if that's the correct thing to do.

@raphael-proust
Copy link
Contributor

Looking at the actual error, it seems to only affect tests. Maybe you can deactivate those tests for <4.14?

@bensmrs
Copy link
Contributor Author

bensmrs commented Jun 18, 2025

Hi!

Thanks for those very nice pointers.

Looking at the actual error, it seems to only affect tests. Maybe you can deactivate those tests for <4.14?

Oh you’re right! I got mixed in my head because I force-pushed a fix removing the need for Map.S.of/to_list in this PR, so the question can be seen as a “good to know for my future self”.
I’ll have a go with Stdcompat for the tests then.

I asked that in the past, but it got lost in plenty of other questions of mine. In such cases where I’m using opam publish, is closing the PR and opam publishing again the way to go or is there a more concise way supported through Opam to force-push on a PR?

@bensmrs bensmrs force-pushed the opam-publish-gendarme-json.0.3.0 branch from 845199b to 19556b5 Compare June 25, 2025 09:26
@bensmrs
Copy link
Contributor Author

bensmrs commented Jun 25, 2025

Well turns out I was too quick closing my PRs and opam publish does forcepushes just fine. I’ll be damned!

@mseri
Copy link
Member

mseri commented Jun 26, 2025

Looks good now. Can we merge?

@bensmrs
Copy link
Contributor Author

bensmrs commented Jun 26, 2025

Sure!

@mseri mseri merged commit c8e0a60 into ocaml:master Jun 27, 2025
3 checks passed
@mseri
Copy link
Member

mseri commented Jun 27, 2025

Thanks

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.

3 participants