Skip to content

Commit def9d80

Browse files
committed
describe: move dummy --lang argument into own module
Signed-off-by: Ali Caglayan <[email protected]>
1 parent 934b3a7 commit def9d80

File tree

5 files changed

+16
-25
lines changed

5 files changed

+16
-25
lines changed

bin/describe/describe_external_lib_deps.ml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,7 @@ let to_dyn context_name external_resolved_libs =
160160
let term =
161161
let+ common = Common.term
162162
and+ context_name = Common.context_arg ~doc:"Build context to use."
163-
and+ _ =
164-
Arg.(
165-
value
166-
& opt (some string) None
167-
& info [ "lang" ] ~docv:"VERSION"
168-
~doc:
169-
"This argument has no effect and is deprecated. It exists solely \
170-
for backwards compatibility.")
163+
and+ _ = Describe_lang_compat.arg
171164
and+ format = Describe_format.arg in
172165
let config = Common.init common in
173166
Scheduler.go ~common ~config @@ fun () ->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
let arg =
2+
Arg.(
3+
value
4+
& opt (some string) None
5+
& info [ "lang" ] ~docv:"VERSION"
6+
~doc:
7+
"This argument has no effect and is deprecated. It exists solely for \
8+
backwards compatibility.")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(** Dune describe commands used to take a --lang arugment that did nothing
2+
expect for dune describe workspace. To keep compatilbility with accepting
3+
such an argument we provide a dummy argument here that can be used. It's
4+
value will typically be ignored. *)
5+
val arg : string option Cmdliner.Term.t

bin/describe/describe_opam_files.ml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@ open Stdune
44
let term =
55
let+ common = Common.term
66
and+ format = Describe_format.arg
7-
and+ _ =
8-
Arg.(
9-
value
10-
& opt (some string) None
11-
& info [ "lang" ] ~docv:"VERSION"
12-
~doc:
13-
"This argument has no effect and is deprecated. It exists solely \
14-
for backwards compatibility.")
15-
in
7+
and+ _ = Describe_lang_compat.arg in
168
let config = Common.init common in
179
Scheduler.go ~common ~config @@ fun () ->
1810
Build_system.run_exn @@ fun () ->

bin/describe/describe_pp.ml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,7 @@ let get_pped_file super_context file =
9595
let term =
9696
let+ common = Common.term
9797
and+ context_name = Common.context_arg ~doc:"Build context to use."
98-
and+ _ =
99-
Arg.(
100-
value
101-
& opt (some string) None
102-
& info [ "lang" ] ~docv:"VERSION"
103-
~doc:
104-
"This argument has no effect and is deprecated. It exists solely \
105-
for backwards compatibility.")
98+
and+ _ = Describe_lang_compat.arg
10699
and+ file =
107100
Arg.(required & pos 0 (some string) None (Arg.info [] ~docv:"FILE"))
108101
in

0 commit comments

Comments
 (0)