rules_ocaml icon indicating copy to clipboard operation
rules_ocaml copied to clipboard

OPAM switch validation and tooling

Open mobileink opened this issue 4 years ago • 0 comments

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:

  1. verify that current switch matches config switch and bail if not.
  2. 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.

mobileink avatar Sep 04 '21 01:09 mobileink