Warning mark_tag_used with OCaml 4.02.0

I am just trying to use my code with OCaml 4.02 (using opam) and I get a lot of warnings like this:

File "_tags", line 14, characters 121-134:
Warning: the tag "link(utils.o)" is not used in any flag
declaration, so it will have no effect; it may be a typo.
Otherwise use `mark_tag_used` in your myocamlbuild.ml to
disable this warning.

But it is defined in myocamlbuld.ml:

pdep ["link"] "link" (fun param -> [param]);

I can get rid of it:

mark_tag_used("link(utils.o)");

But I need one such line for every use of the tag! Also, my code will not work with earlier versions of OCaml. What is the general fix?

(full code is at https://github.com/0install/0install )

+4
source share
1 answer

I got rid of the same warning when I did

dispatch @@ MyOCamlbuildBase.dispatch_combine [
  begin function
    (* ... *)
  end;
  dispatch_default
]
;;

instead

dispatch 
begin function (* ... *)

in mine myocamlbuild.mland re-run oasis setup. Ymmv

0
source

All Articles