Skip to content

Message for missing extensions is not correct #3412

@ghost

Description

Expected Behavior

When we use an experimental extension without declaring it, the suggestion should be correct:

$ dune build
Info: Creating file dune-project with this contents:
| (lang dune 2.5)
File "dune", line 3, characters 1-12:
3 |  (variant x))
     ^^^^^^^^^^^
Error: 'variant' is only available since version 0.1 of the experimental
library variants feature.. Please update your dune-project file to have
(using library_variants 0.1), but please note that this extension is
experimental and we might drop support for it in the future.

Actual Behavior

$ dune build
Info: Creating file dune-project with this contents:
| (lang dune 2.5)
File "dune", line 3, characters 1-12:
3 |  (variant x))
     ^^^^^^^^^^^
Error: 'variant' is only available since version 0.1 of the experimental
library variants feature.. Please update your dune-project file to have (lang
0.1).

Reproduction

$ cat > dune <<EOF
(library
 (name toto)
 (variant x))
EOF
$ dune build

Specifications

  • Version of dune (output of dune --version): 2.5.0
  • Version of ocaml (output of ocamlc --version): 4.09.0
  • Operating system (distribution and version): Ubuntu 19.10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions