Skip to content

(preprocessor_deps) are ignored when there is no preprocessing #2642

@emillon

Description

@emillon

Hi,

I was trying to use (preprocessor_deps) as a way to pull files (required at runtime) into _build/, and noticed the following behaviour.

When there is no (preprocess) field, (preprocessor_deps) is completely ignored.

For example, the following dune file does not trigger any error or warning (but uncommenting the (preprocess) field triggers an error if the file does not exist of course).

(executable
 (name e)
 ;(preprocess (pps ppx_deriving.std))
 (preprocessor_deps does-not-exist.txt))

I think that we could detect the problem a bit more eagerly, for example by issuing an error or a warning when (preprocess_deps) is set but (preprocess) is not.

What do you think?

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