Desired Behavior
(copy_files#
(mode fallback)
(files "../src/*.{re,rei}"))
Currently the glob applies to all generated by targets with the following extensions: .re/.re.ml/.pp.ml/.rei.mli/.rei.pp.mli which makes writing a glob a bit challenging since groups and sets can't be negated together.
Anyway, when you are just copying reason files is fine, but as soon as you want to copy all reason and all ocaml files, dune finds all the refmt generated or pp generated files and becomes a duplicated target.
Example
(copy_files#
(mode fallback)
(files "../src/*.{re,rei,ml,mli}"))
Should glob on all source files and not the generated.