rules_ocaml
rules_ocaml copied to clipboard
OPAM switch validation and tooling
The switch specified in the config may be different than the current switch. The build should work, but then any tools used at the command line may fail. Case in point: ocamlobjinfo will fail (reporting that the file is not an OCaml object file) if the version of the ocamlobjinfo tool does not match the version used to build the module.
Fix options:
- verify that current switch matches config switch and bail if not.
- use bazel to run tools, so it can select the right version
At the least, we should print a prominent warning in case of mismatch.