Closed MisterDA closed 2 years ago
Thank you for the contribution, @MisterDA!
Emergency bugfix release? :angel:
It'll go in the next release. It's not a bug, because warning 9 is off by default.
It's not a bug, because warning 9 is off by default.
I've encountered the error fiddling with ocaml-gobject-introspection. I'm using setup-ocaml in GitHub Actions for the CI. The project uses dune, and setup-ocaml builds it in debug mode, where dune turns warnings into errors. The generated code has this warning, and when dune builds it, dune emits an error failing the build. This is the same scenario than in my developer workflow if I don't pin-depends ocaml-ctypes with this patch or build the project in release-mode. Even if one could argue that this is a problem of dune (and iirc it has been argued) it does mean that the project I'm working on cannot be built "out-of-the-box". I think there's a case for not generating code that has compilation warnings.
I ran into the exact same case when building with dune locally and while searching whether this has been reported I stumbled over this PR. I agree with @MisterDA here - while the dune defaults might be debatable, there is definitely a point for generating code that doesn't trigger warnings, which helps to be confident that the stub generator generates the right code and does not accidentally miss to generate stubs for something.
It would be nice to have a point release, especially since some fixes were merged and also OCaml 4.14 came out which is now tested in CI.
Okay, I'm convinced. There's a new release on its way: https://github.com/ocaml/opam-repository/pull/21068
Example problem: