-
Notifications
You must be signed in to change notification settings - Fork 444
Closed
ocaml/opam-repository
#28357Labels
Description
Desired Behavior
When using run
in a rule stanza we can have long command with many arguments which quickly end up being split into one word per line. It would tend to look better if run
could keep everything on a single line as much as possible. And when it splits things into multiple lines it would put as much content as possible on every line.
Example
The current
(rule
(target sql_file1.ml)
(deps
gen_file2.sql
gen_file3.sql)
(mode promote)
(action
(with-stdout-to
%{target}
(run
sqlgg
-static-header
-gen
caml_io
-name
Make
-params
unnamed
-category
none
gen_file2.sql
-category
all
gen_file3.sql))))
could look more like this
(rule
(target sql_file1.ml)
(deps
gen_file2.sql
gen_file3s.sql)
(mode promote)
(action
(with-stdout-to
%{target}
(run sqlgg -static-header -gen caml_io -name Make -params unnamed -category none gen_file2.sql -category all gen_file3.sql))))
or if the line is longer than the limit, it could look like this
(run sqlgg -static-header -gen caml_io -name Make -params unnamed -category none
gen_file2.sql -category all gen_file3.sql))))