Skip to content

Dune can't use local OPAM switch in context declaration #3264

@argent-smith

Description

@argent-smith

Expected Behavior

Dune uses the local OPAM switch same as global switch.

Actual Behavior

Dune gives the error message

Reproduction

  1. create a local opam switch in your project directory:

cd boinc-controller && opam create . 4.10.0 -y

  1. write this dune-workspace file:
(lang dune 2.4)
(context
 (opam
  (switch /Users/paul/Development/own/mirage/boinc-controller)
  (merlin)))
  1. run dune build

  2. see the error message:

⟩ dune build
File "dune-workspace", line 4, characters 10-61:
4 |   (switch /Users/paul/Development/own/mirage/boinc-controller)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: "/Users/paul/Development/own/mirage/boinc-controller" is an invalid
context name.

Specifications

  • Version of dune (output of dune --version): 2.4.0
  • Version of ocaml (output of ocamlc --version): 4.10.0
  • Operating system (distribution and version): Mac OS 10.14.6 Mojave

Metadata

Metadata

Assignees

No one assigned

    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