Skip to content

copy_files glob should operate on source files (not target files inside _build folder) #9709

@davesnx

Description

@davesnx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions