ocaml-omake / omake

The new home of OMake - docs, downloads, mailing list etc. see:
http://projects.camlcity.org/projects/omake.html
GNU General Public License v2.0
67 stars 25 forks source link

.omc should be invalidated when OMAKEPATH value changes #131

Open ANogin opened 4 years ago

ANogin commented 4 years ago

I installed OCaml 4.07.1 via opam (under docker) and built a project using OMake. Then I installed OCaml 4.09.0 (in a different docker image, so the 4.07.1 was no longer there). I tried running omake on the same source directory again. I got:

*** omake error:
   File OMakeroot: line 9, characters 2-14
   can't open IR: /usr/local/opam/4.07.1/lib/omake/build/C.om
*** omake: polling for filesystem changes (OMakefiles only)

The "offending" line is just open build/C. The problem appears to be that it tries to follow the location cached in .omc during the previous build.

In my use case, at least the issue is fairly obvious, but if I still had the old omake around (and it was an older version with older standard library!), it would probably be silently using the old location rather than the current one.

jhwoodyatt commented 3 years ago

Workaround for this: omake --flush