Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
emillon opened this issue Sep 16, 2019 · 1 comment · Fixed by #2660
Closed

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

emillon opened this issue Sep 16, 2019 · 1 comment · Fixed by #2660

Comments

@emillon
Copy link
Collaborator

emillon commented Sep 16, 2019

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?

@ghost
Copy link

ghost commented Sep 17, 2019

That seems good to me! It should be a warning with lang dune<2.0 and an error with lang dune>=2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant