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

Failure in promote mode for directory targets with subdirectories #11214

Open
panglesd opened this issue Dec 16, 2024 · 0 comments
Open

Failure in promote mode for directory targets with subdirectories #11214

panglesd opened this issue Dec 16, 2024 · 0 comments
Labels

Comments

@panglesd
Copy link

Expected Behavior

When promoting a directory, the directory should be promoted

Actual Behavior

When there are deep enough subdirectories, an error like this one is raised:

  File "dune", lines 1-7, characters 0-121:
  1 | (rule
  2 |  (deps
  3 |   (source_tree deep))
  4 |  (targets (dir deep_copied))
  5 |  (mode promote)
  6 |  (action
  7 |   (run cp -r deep deep_copied)))
  Error: Cannot promote files to "deep_copied/a/b".
  Reason: opendir(deep_copied/a/b): No such file or directory
  -> required by _build/default/deep_copied
  [1]

Reproduction

Specifications

  • Version of dune (output of dune --version): master
  • Version of ocaml (output of ocamlc --version): 5.2.0 but I don't think it matters!
  • Operating system (distribution and version): Archlinux but I don't think it matters!

Additional information

Running with verbose mode does not show any useful output:

  Dune context:
   { name = "default"
   ; kind = "default"
   ; profile = Dev
   ; merlin = true
   ; fdo_target_exe = None
   ; build_dir = In_build_dir "default"
   ; instrument_with = []
   }
  Actual targets:
  - _build/default/deep_copied
  Running[1]: (cd _build/default && /usr/bin/cp -r deep deep_copied)
  Promoting "_build/default/deep_copied/a/b/deep_file" to
  "deep_copied/a/b/deep_file"
  File "dune", lines 1-7, characters 0-121:
  1 | (rule
  2 |  (deps
  3 |   (source_tree deep))
  4 |  (targets (dir deep_copied))
  5 |  (mode promote)
  6 |  (action
  7 |   (run cp -r deep deep_copied)))
  Error: Cannot promote files to "deep_copied/a/b".
  Reason: opendir(deep_copied/a/b): No such file or directory
  -> required by _build/default/deep_copied
  [1]
@panglesd panglesd changed the title Promote mode for directory targets with subdirectories Failure in promote mode for directory targets with subdirectories Dec 16, 2024
@maiste maiste added the bug label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants