diff --git a/bin/describe/describe_external_lib_deps.ml b/bin/describe/describe_external_lib_deps.ml index 43e553ae0a26..b900f14e68c7 100644 --- a/bin/describe/describe_external_lib_deps.ml +++ b/bin/describe/describe_external_lib_deps.ml @@ -160,14 +160,7 @@ let to_dyn context_name external_resolved_libs = let term = let+ common = Common.term and+ context_name = Common.context_arg ~doc:"Build context to use." - and+ _ = - Arg.( - value - & opt (some string) None - & info [ "lang" ] ~docv:"VERSION" - ~doc: - "This argument has no effect and is deprecated. It exists solely \ - for backwards compatibility.") + and+ _ = Describe_lang_compat.arg and+ format = Describe_format.arg in let config = Common.init common in Scheduler.go ~common ~config @@ fun () -> diff --git a/bin/describe/describe_lang_compat.ml b/bin/describe/describe_lang_compat.ml new file mode 100644 index 000000000000..01d992993d0d --- /dev/null +++ b/bin/describe/describe_lang_compat.ml @@ -0,0 +1,8 @@ +let arg = + Arg.( + value + & opt (some string) None + & info [ "lang" ] ~docv:"VERSION" + ~doc: + "This argument has no effect and is deprecated. It exists solely for \ + backwards compatibility.") diff --git a/bin/describe/describe_lang_compat.mli b/bin/describe/describe_lang_compat.mli new file mode 100644 index 000000000000..0505bcdfad95 --- /dev/null +++ b/bin/describe/describe_lang_compat.mli @@ -0,0 +1,5 @@ +(** Dune describe commands used to take a --lang arugment that did nothing + expect for dune describe workspace. To keep compatilbility with accepting + such an argument we provide a dummy argument here that can be used. It's + value will typically be ignored. *) +val arg : string option Cmdliner.Term.t diff --git a/bin/describe/describe_opam_files.ml b/bin/describe/describe_opam_files.ml index 75dd3d6f60cf..22622ce47741 100644 --- a/bin/describe/describe_opam_files.ml +++ b/bin/describe/describe_opam_files.ml @@ -4,15 +4,7 @@ open Stdune let term = let+ common = Common.term and+ format = Describe_format.arg - and+ _ = - Arg.( - value - & opt (some string) None - & info [ "lang" ] ~docv:"VERSION" - ~doc: - "This argument has no effect and is deprecated. It exists solely \ - for backwards compatibility.") - in + and+ _ = Describe_lang_compat.arg in let config = Common.init common in Scheduler.go ~common ~config @@ fun () -> Build_system.run_exn @@ fun () -> diff --git a/bin/describe/describe_pp.ml b/bin/describe/describe_pp.ml index f5d08334b01f..9e46f7586746 100644 --- a/bin/describe/describe_pp.ml +++ b/bin/describe/describe_pp.ml @@ -95,14 +95,7 @@ let get_pped_file super_context file = let term = let+ common = Common.term and+ context_name = Common.context_arg ~doc:"Build context to use." - and+ _ = - Arg.( - value - & opt (some string) None - & info [ "lang" ] ~docv:"VERSION" - ~doc: - "This argument has no effect and is deprecated. It exists solely \ - for backwards compatibility.") + and+ _ = Describe_lang_compat.arg and+ file = Arg.(required & pos 0 (some string) None (Arg.info [] ~docv:"FILE")) in