ocaml-community / cppo

C-style preprocessor for OCaml
BSD 3-Clause "New" or "Revised" License
107 stars 26 forks source link

`cppo -version` prints a blank line #92

Closed fpottier closed 4 weeks ago

fpottier commented 1 month ago

Hi! I just noticed that cppo -version prints a blank line. This issue seems to exist at least in 1.6.8, 1.6.9, and 1.7.0.

The file src/dune uses the variable %{version:cppo}, but, according to dune's documentation, for this variable to be set, our dune-project file should contain a version field; and it doesn't.

I have checked that adding (version 1.7.0) at the top level in dune-project appears to fix the problem.

If you agree, I propose to make this change, and to also improve the main Makefile so that make publish verifies that the version field in dune-project has been updated.

fpottier commented 1 month ago

I have just made these proposed changes in the branch version.