ocaml / ocaml/dune

Recursive alias in vendored directories are not well defined

Open
#3,151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

vendoring
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Consider:

$ cat dune-project
(lang dune 2.3)

$ cat dune
(vendored_dirs vendor)

$ cat vendor/dune
(rule
 (alias all)
 (action (echo "42\n")))

$ cd vendor

Expected Behavior

$ dune build -f @all
Entering directory '.../vendor'
42
$ dune build -f @@all
Entering directory '.../vendor'
42

Actual Behavior

$ dune build -f @all
Entering directory '.../vendor'
$ dune build -f @@all
Entering directory '.../vendor'
42

The behaviour of the last two commands is inconsistent.

Specifications

  • Version of dune (output of dune --version): 2.3
  • Version of ocaml (output of ocamlc --version): 4.09
  • Operating system (distribution and version): any

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior from the issue using dune-project, dune, and vendor/dune, then compare the @all and @@all commands from inside vendor. Trace how vendored directories resolve recursive aliases; done means both commands behave consistently with the expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.