dune icon indicating copy to clipboard operation
dune copied to clipboard

pkg: error when locking when a pin stanza contains a relative path outside the workspace

Open gridbugs opened this issue 2 years ago • 0 comments

If the url of the pin stanza is a file:// path which is relative and refers to a location outside of the current workspace, dune pkg lock prints the error:

Error: path outside the workspace: ../foo from .

Here's an example dune-project file that causes this issue.

(lang dune 3.14)
 (pin
  (url file://../foo)
  (package (name foo)))
 (package
  (name bar)
  (depends foo))

Repro PR: https://github.com/ocaml/dune/pull/10255

gridbugs avatar Mar 12 '24 07:03 gridbugs