ocaml / dune

A composable build system for OCaml.
https://dune.build/
MIT License
1.64k stars 410 forks source link

Error with directory symlink: Unexpected file kind "S_DIR" #9873

Open emillon opened 10 months ago

emillon commented 10 months ago

Hi,

When a directory target contains a directory symlink (symlink whose target is a directory), the following error happens:

  Error: Error trying to read targets after a rule was run:
  - d/b: Unexpected file kind "S_DIR" (directory)
  [1]

This can be found when building ocamlbuild through pkg rules, since its source tree contains such symlinks.

I bisected that to b1c339b868e00fd5a1a3e72db90e57b4f3285208 in #9407 (@rleshchinskiy).

emillon commented 10 months ago

Repro in #9874.