Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bin/printenv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ let term =
Build.build_memo_exn (fun () ->
let open Memo.O in
let* setup = Util.setup () in
let dir = Path.of_string dir in
let dir =
Path.of_string dir
|> Path.Expert.try_localize_external
in
let checked = Util.check_path setup.contexts dir in
let request =
Action_builder.all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,22 @@ work identically to the relative form. Today it errors as if the path were
outside the project.

$ dune show env $PWD --field flags
Error: Environment is not defined for external paths
[1]
(flags
(-short-paths -keep-locs -warn-error +a -w +27))

CR-someday Alizter: the same call from a subdirectory should also resolve.
(--root is required because INSIDE_DUNE disables workspace auto-detection.)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prose needs to be updated now that the test is exhibiting the correct behaviour.


$ (cd subdir && dune show env --root .. $PWD --field flags)
Entering directory '..'
Error: Environment is not defined for external paths
Leaving directory '..'
[1]
(flags
(-short-paths -keep-locs -warn-error +a -w +27))

CR-someday Alizter: absolute paths to subdirectories of the workspace
should be accepted.

$ dune show env $PWD/subdir --field flags
Error: Environment is not defined for external paths
[1]
(flags
(-short-paths -keep-locs -warn-error +a -w +27))

Absolute paths that are genuinely outside the workspace must continue to
fail with a clean error. This behaviour must not regress.
Expand Down
Loading