-
Notifications
You must be signed in to change notification settings - Fork 470
dune build --always-show-command-line and --verbose has wrong output #5546
Copy link
Copy link
Closed
ocaml/opam-repository
#21217Description
Here are a few issues regarding the output of --always-show-command-line and --verbose.
Expected Behavior
Here is an example rule from a not too important project:
File "test-suite/test_suite_rules.sexp", line 6883, characters 1-403:
6883 | (rule
6884 | (alias runtest)
6885 | (targets rexample.vo rexample.v.log)
6886 | (deps .csdp.cache ../micromega/rexample.v .././../theories/micromega/Lra.vo
6887 | .././../theories/Reals/Reals.vo)
6888 | (action (with-outputs-to rexample.v.log (with-accepted-exit-codes 0 (run coqc -boot -I ../../../install/default/lib -R ../../theories Coq -R ../prerequisite TestSuite -Q ../../user-contrib/Ltac2 Ltac2 rexample.v)))))
(cd _build/default/test-suite/micromega && ../../../install/default/bin/coqc -boot -I ../../../install/default/lib -R ../../theories Coq -R ../prerequisite TestSuite -Q ../../user-contrib/Ltac2 Ltac2 rexample.v &> _build/default/test-suite/micromega/rexample.v.log
Command exited with code 1.
This was run with dune test --always-show-command-line. The output of the actual command however is a little wrong.
- It seems that there is a missing parenthesis before
&>in the output. - There is no leading
$for the subshell.
Using --verbose gives a slightly different output:
$ (cd _build/default/test-suite/micromega && ../../../install/default/bin/coqc -boot -I ../../../install/default/lib -R ../../theories Coq -R ../prerequisite TestSuite -Q ../../user-contrib/Ltac2 Ltac2 rexample.v &> _build/default/test-suite/micromega/rexample.v.log
Here the parenthesis problem is the same, however the $ has been inserted. However there is a space after the $ which should not be there.
Reproduction
I don't have a reproduction case, but his appears to be an issue with the printing of the shell command for with-outputs-to. The $ issues for --verbose and --always-show-command-line seem to be unrelated but nonetheless wrong on all examples I have tried.
Specifications
- Version of
dune(output ofdune --version): 3.0.3 - Version of
ocaml(output ofocamlc --version) 4.12.1 - Operating system (distribution and version): Probably not relevant
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels