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

Evaluation order for rule deps is generating "subdir doesn't exist" warnings (1.0+beta17) #534

Closed
gersonmoraes opened this issue Feb 20, 2018 · 1 comment

Comments

@gersonmoraes
Copy link

Since v1.0+beta17, I'm getting these warnings whenever I define an executable in a subdirectory where the main file is generated by a rule.

Warning: Directory _build/default/subdir doesn't exist.

To reproduce the problem sufice to add this file to a subdir and trying runnig it with jbuilder exec path/to/main.exe:

(executable
 ((name main)
))

(rule
 ((targets (main.ml))
  ;; problematic line:
  (deps ( (glob_files optional.ml) (glob_files *optional.ml) ))
  (action  (with-stdout-to ${@} (run echo "let () = print_endline \"Hello World\""
  )))))

Apparently it's related with the evaluation order for deps in the rule. If removed, the warnings disappear. It's seams jbuilder/dune is checking dependencies before creating the subdirectory under _build/default.

@ghost
Copy link

ghost commented Feb 21, 2018

Thanks, I added your example as a reproduction case and fixed in #536

ghost pushed a commit that referenced this issue Feb 21, 2018
@ghost ghost closed this as completed in 41b5017 Feb 21, 2018
This issue was closed.
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

No branches or pull requests

1 participant