Expected Behavior
I was expecting to be able to include dune-build-info (specifically the project version) in an executable target that only supports the js mode.
For example:
(executable
(name Example)
(modes js)
(modules Example)
(libraries dune-build-info))
Actual Behavior
Build_info.V1.version () is always None because the executable doesn't specify a public_name, but adding a public_name if I'm only specifying (modes js) results in this error:
Error: No installable mode found for this executable.
When public_name is set, one of the following modes is required:
- exe
- native
- byte
Reproduction
- Clone https://github.com/phated/dune-build-info-jsoo
- Run
esy inside the repo
- Run
esy test
Adding an exe mode and public_name to that executable allows the JS to include the project version.
Specifications
- Version of
dune (output of dune --version): 2.8.5
- Version of
ocaml (output of ocamlc --version): 4.11.0
- Operating system (distribution and version): MacOS 10.15 (Catalina)