Skip to content

Inconsistent "path outside the workspace" error in pin stanza #13877

@shunueda

Description

@shunueda

Expected Behavior

Both of these pin stanza (in dune-project) URLs should work identically, according to the docs

Local paths can be absolute or relative, and may optionally begin with file:// though this is not necessary.

(pin
  (url "file://../foo")
  (package (name foo)))
(pin
  (url "../foo")
  (package (name foo)))

Since they both refer to the same location, they should either both succeed or both fail.

Actual Behavior

  • (url "../foo") works correctly
  • (url "file://../foo") fails with: Error: path outside the workspace: ../foo from .

Which of these is the expected behavior? I believe (url "file://../foo") erroring out is a bug because it's legal for the url to be an git repository url, which, obvious is not in my workspace.

Specifications

dune@3.21.1 on aarch64-darwin

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