Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show command lines when running inside dune #3042

Merged
1 commit merged into from Jan 16, 2020
Merged
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
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2.2.0 (unreleased)
------------------

- By default, do not show the full command line of commands executed
by `dune` when `dune` is executed inside `dune`. This is to make
integration tests more reproducible (#3042, @diml)

2.1.3 (16/01/2020)
------------------

Expand Down
6 changes: 5 additions & 1 deletion src/dune/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ let inside_dune = Option.is_some (Env.get Env.initial "INSIDE_DUNE")
let inside_ci = Option.is_some (Env.get Env.initial "CI")

let show_full_command_on_error () =
inside_dune || inside_ci || !Clflags.always_show_command_line
!Clflags.always_show_command_line
|| (* We want to show command lines in the CI, but not when running inside
dune. Otherwise tests would yield different result whether they are
executed locally or in the CI. *)
(inside_ci && not inside_dune)

open Dune_lang.Decoder

Expand Down
1 change: 0 additions & 1 deletion test/blackbox-tests/test-cases/lint/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ The lint alias will run preprocessing actions listed under (lint):
> let () = Printf.printf "%d\n" @@ 1 + 2
> EOF
$ dune build @detect/lint
ppx alias detect/lint
File "detect/add.ml", line 1, characters 33-38:
This addition can be done statically.

Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/private-modules/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
runfoo alias default
private module bar

$ dune build --root inaccessible-in-deps 2>&1 | grep -v "cd _build"
$ dune build --root inaccessible-in-deps 2>&1
Entering directory 'inaccessible-in-deps'
ocamlc .foo.eobjs/byte/foo.{cmi,cmo,cmt} (exit 2)
File "foo.ml", line 1, characters 0-5:
1 | X.run ();;
^^^^^
Error: Unbound module X
[1]

Private modules are not excluded from the install file, but installed in the .private subdir
$ dune build --root private-subdir | grep -i priv
Expand Down