From f5c45a72a8d0dea093eeaee6d03b585f2c49057f Mon Sep 17 00:00:00 2001 From: Etienne Millon Date: Tue, 7 Aug 2018 08:48:20 +0000 Subject: [PATCH] Do not duplicate profile in missing deps message Closes #1106 Signed-off-by: Etienne Millon --- CHANGES.md | 3 +++ bin/main.ml | 3 +-- test/blackbox-tests/test-cases/findlib/run.t | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7b9a737d..0e1d55e4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,9 @@ next - Fix dune exec when `--build-dir` is set to an absolute path (#1105, fixes #1101, @rgrinberg) +- Fix duplicate profile argument in suggested command when an external library + is missing (#1109, #1106, @emillon) + 1.1.0 (06/08/2018) ------------------ diff --git a/bin/main.ml b/bin/main.ml index 21561f7e..cae9be5d 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -510,8 +510,7 @@ let common = in let orig_args = List.concat - [ dump_opt "--profile" profile - ; dump_opt "--workspace" (Option.map ~f:Arg.Path.arg workspace_file) + [ dump_opt "--workspace" (Option.map ~f:Arg.Path.arg workspace_file) ; orig ] in diff --git a/test/blackbox-tests/test-cases/findlib/run.t b/test/blackbox-tests/test-cases/findlib/run.t index 1845a51c..8b9d13a7 100644 --- a/test/blackbox-tests/test-cases/findlib/run.t +++ b/test/blackbox-tests/test-cases/findlib/run.t @@ -11,3 +11,19 @@ Reproduction case for #484. The error should point to src/jbuild Error: Library "a" not found. Hint: try: dune external-lib-deps --missing @install [1] + +When passing --dev, the profile should be displayed only once (#1106): + + $ jbuilder build --dev @install + File "src/dune", line 4, characters 14-15: + Error: Library "a" not found. + Hint: try: dune external-lib-deps --missing --profile dev @install + [1] + +With dune and an explicit profile, it is the same: + + $ dune build --profile dev @install + File "src/dune", line 4, characters 14-15: + Error: Library "a" not found. + Hint: try: dune external-lib-deps --missing --profile dev @install + [1]