"Unknown constructor vendored_dirs" when using OCaml syntax
Open
Nobody has claimed this yet.
build
preprocessing
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
This dune file works fine:
(vendored_dirs otherlib)
(library (libraries otherlib) (name toto))
This dune file triggers an error:
(* -*- tuareg -*- *)
;; {|(vendored_dirs otherlib)
(library (libraries otherlib) (name toto))|} |> Jbuild_plugin.V1.send
$ dune build
File "_build/.dune/default/lib/dune", line 1, characters 1-14:
1 | (vendored_dirs otherlib)
^^^^^^^^^^^^^
Error: Unknown constructor vendored_dirs
Reproduction
In a fresh directory:
$ cat >dune <<EOF
(* -*- tuareg -*- *)
;; {|(vendored_dirs otherlib)
(library (libraries otherlib) (name toto))|} |> Jbuild_plugin.V1.send
EOF
$ dune build
Specifications
- Version of
dune(output ofdune --version): tested 2.3.1 and latest master e778223b9b1c7f265de978902b97603a0f4bbf24 - Version of
ocaml(output ofocamlc --version) 4.08.1 - Operating system (distribution and version): Debian bullseye
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduced dune file containing the OCaml syntax extension and run dune build in a fresh directory. Trace why the emitted (vendored_dirs otherlib) is rejected as an unknown constructor, then verify that the reproduction builds without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100