Skip to content

dune describe workspace returns an incorrect root #6379

@esope

Description

@esope

Expected Behavior

dune describe workspace should return a (relative or absolute) path to the project's root.

Actual Behavior

dune describe workspace always returns . as the workspace root.

Reproduction

Assume the following setup:

foo/
|-- dune-project
|-- a/
    |-- dune
    |-- a.ml

where:

  • dune-project contains (lang dune 3.5.0)
  • a/dune contains (library (name a))
  • a/a.ml is an empty file

When run from foo/a/, the command dune describe workspace returns . as the project's root.
Instead, it should return .. or an absolute path to foo/.

This cannot be tested using cram tests, because paths are sanitized (using the --sanitize-for-tests flag) so that paths are reproducible (i.e. do not depend on where the test directory is located on the machine where tests are run).

Specifications

  • Version of dune (output of dune --version): 3.5.0
  • Version of ocaml (output of ocamlc --version): 4.14.0
  • Operating system (distribution and version): linux, LinuxMint 21

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