alan-turing-institute / whatwhat

A reimagining of nowwhat in OCaml
MIT License
0 stars 0 forks source link

--version #110

Closed yongrenjie closed 9 months ago

yongrenjie commented 10 months ago

I can't recall if we ever had this; but the feature doesn't exist, and I feel like now with Homebrew releases etc. we probably do :)

$ whatwhat --version
whatwhat: unknown option '--version', did you mean '-v'?
Usage: whatwhat [COMMAND] …
Try 'whatwhat --help' for more information.
yongrenjie commented 10 months ago

Relevant bits of opam:

https://github.com/ocaml/opam/blob/c4961baf23e681c74b381a5f9c2cfd7362740e68/src/client/opamCommands.ml#L4386-L4390

Cmd.info docs: https://erratique.ch/software/cmdliner/doc/Cmdliner/Cmd/index.html#val-info

Still not entirely clear how they automatically get the version number without hardcoding it in.

yongrenjie commented 9 months ago

https://dune.readthedocs.io/en/latest/dune-libs.html#dune-build-info-library