New Dune warning: .merlin generated is inaccurate. pps specification isn't identical in all stanzas

#1

After upgrading everything in my working OCaml switch and trying to compile my project I met a new warning from Dune:

└>dune build
File "dune", line 3, characters 14-33:
3 |   (preprocess (pps ppx_sexp_conv))
                  ^^^^^^^^^^^^^^^^^^^
Warning: .merlin generated is inaccurate. pps specification isn't identical in all stanzas.
Split the stanzas into different directories or silence this warning by adding (allow_approximate_merlin) to your dune-project.

Googling didn’t help. Can someone explain what is the problem here? I see the tip on using (allow_approximate_merlin) to workaround, but still want to understand the root of the problem.

#2

The problem is that .merlin files are a bit too coarse: they apply to whole directory. Thus if the preprocessors used differ between files in the same directory, it is impossible to precise a fully accurate list of preprocessor to merlin.