Fix workspace lookup in cojnuction with --root

The workspace is specified to the initial CWD hence we must convert it a path
relative to it

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-07-10 17:23:56 +07:00
parent 083b2618da
commit ab6bb0d5f7
2 changed files with 4 additions and 2 deletions

View File

@ -84,7 +84,8 @@ module Main = struct
setup
~log
?workspace_file:(
Option.map common.workspace_file ~f:Path.of_string)
Option.map common.workspace_file
~f:Path.of_filename_relative_to_initial_cwd)
?only_packages:common.only_packages
?external_lib_deps_mode
?x:common.x

View File

@ -25,7 +25,8 @@ analogously, jbuilder will ignore it
specifying the workspace file is possible:
$ dune build --root custom-workspace --workspace custom-workspace/dune-workspace.dev
Error: workspace file custom-workspace/dune-workspace.dev does not exist
File "/Users/rgrinberg/reps/dune/_build/default/test/blackbox-tests/test-cases/workspaces/custom-workspace/dune-workspace.dev", line 2, characters 10-24:
Error: Unknown constructor does-not-exist
[1]
Workspaces let you set custom profiles