From 3bdaaf5e0ac31113dadbd4ae9166ccd93b9d1250 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 8 Jul 2019 21:23:52 +0700 Subject: [PATCH] Rename wrapped_exes to wrapped_executables Signed-off-by: Rudi Grinberg --- src/dir_contents.ml | 2 +- src/dune_project.ml | 27 ++++++++++--------- src/dune_project.mli | 2 +- .../multi-exe-same-dir/dune-project | 2 +- .../exe-name-mangle/multi-module/dune-project | 2 +- .../test-cases/exe-name-mangle/run.t | 2 +- .../single-module/dune-project | 2 +- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/dir_contents.ml b/src/dir_contents.ml index ee193aad8894..f4bf9bcbedbb 100644 --- a/src/dir_contents.ml +++ b/src/dir_contents.ml @@ -284,7 +284,7 @@ end = struct in let modules = let project = Scope.project scope in - if Dune_project.wrapped_exes project then + if Dune_project.wrapped_executables project then Modules.exe_wrapped ~src_dir:d.ctx_dir ~modules else Modules.exe_unwrapped modules diff --git a/src/dune_project.ml b/src/dune_project.ml index 56c996add60a..d6a9b6c705b8 100644 --- a/src/dune_project.ml +++ b/src/dune_project.ml @@ -190,7 +190,7 @@ type t = ; extension_args : Univ_map.t ; parsing_context : Univ_map.t ; implicit_transitive_deps : bool - ; wrapped_exes : bool + ; wrapped_executables : bool ; dune_version : Syntax.Version.t ; allow_approx_merlin : bool ; generate_opam_files : bool @@ -221,7 +221,7 @@ let to_dyn ; homepage ; documentation ; project_file ; parsing_context = _ ; bug_reports ; maintainers ; extension_args = _; stanza_parser = _ ; packages - ; implicit_transitive_deps ; wrapped_exes ; dune_version + ; implicit_transitive_deps ; wrapped_executables ; dune_version ; allow_approx_merlin ; generate_opam_files } = let open Dyn.Encoder in record @@ -241,7 +241,7 @@ let to_dyn (Package.Name.Map.to_list packages) ; "implicit_transitive_deps", bool implicit_transitive_deps - ; "wrapped_exes", bool wrapped_exes + ; "wrapped_executables", bool wrapped_executables ; "dune_version", Syntax.Version.to_dyn dune_version ; "allow_approx_merlin", bool allow_approx_merlin ; "generate_opam_files", bool generate_opam_files @@ -507,7 +507,7 @@ let filename = "dune-project" let implicit_transitive_deps_default ~(lang : Lang.Instance.t) = lang.version < (2, 0) -let wrapped_exes_default ~(lang : Lang.Instance.t) = +let wrapped_executables_default ~(lang : Lang.Instance.t) = lang.version >= (2, 0) let anonymous = lazy ( @@ -524,7 +524,7 @@ let anonymous = lazy ( interpret_lang_and_extensions ~lang ~explicit_extensions:[] ~project_file in let implicit_transitive_deps = implicit_transitive_deps_default ~lang in - let wrapped_exes = wrapped_exes_default ~lang in + let wrapped_executables = wrapped_executables_default ~lang in { name = name ; packages = Package.Name.Map.empty ; root = Path.Source.root @@ -537,7 +537,7 @@ let anonymous = lazy ( ; authors = [] ; version = None ; implicit_transitive_deps - ; wrapped_exes + ; wrapped_executables ; stanza_parser ; project_file ; extension_args @@ -601,8 +601,8 @@ let parse ~dir ~lang ~opam_packages ~file = and+ implicit_transitive_deps = field_o_b "implicit_transitive_deps" ~check:(Syntax.since Stanza.syntax (1, 7)) - and+ wrapped_exes = - field_o_b "wrapped_exes" + and+ wrapped_executables = + field_o_b "wrapped_executables" ~check:(Syntax.since Stanza.syntax (1, 11)) and+ allow_approx_merlin = field_o_b "allow_approximate_merlin" @@ -687,8 +687,9 @@ let parse ~dir ~lang ~opam_packages ~file = Option.value implicit_transitive_deps ~default:(implicit_transitive_deps_default ~lang) in - let wrapped_exes = - Option.value wrapped_exes ~default:(wrapped_exes_default ~lang) in + let wrapped_executables = + Option.value wrapped_executables + ~default:(wrapped_executables_default ~lang) in let allow_approx_merlin = Option.value ~default:false allow_approx_merlin in let generate_opam_files = @@ -709,7 +710,7 @@ let parse ~dir ~lang ~opam_packages ~file = ; extension_args ; parsing_context ; implicit_transitive_deps - ; wrapped_exes + ; wrapped_executables ; dune_version = lang.version ; allow_approx_merlin ; generate_opam_files @@ -755,7 +756,7 @@ let make_jbuilder_project ~dir opam_packages = ; dune_version = lang.version ; allow_approx_merlin = true ; generate_opam_files = false - ; wrapped_exes = false + ; wrapped_executables = false } let load ~dir ~files = @@ -816,4 +817,4 @@ let dune_version t = t.dune_version let set_parsing_context t parser = Dune_lang.Decoder.set_many t.parsing_context parser -let wrapped_exes t = t.wrapped_exes +let wrapped_executables t = t.wrapped_executables diff --git a/src/dune_project.mli b/src/dune_project.mli index fe9b96566dc5..e628d0726e46 100644 --- a/src/dune_project.mli +++ b/src/dune_project.mli @@ -156,4 +156,4 @@ val implicit_transitive_deps : t -> bool val dune_version : t -> Syntax.Version.t -val wrapped_exes : t -> bool +val wrapped_executables : t -> bool diff --git a/test/blackbox-tests/test-cases/exe-name-mangle/multi-exe-same-dir/dune-project b/test/blackbox-tests/test-cases/exe-name-mangle/multi-exe-same-dir/dune-project index eac2c1a94068..d9f57f494196 100644 --- a/test/blackbox-tests/test-cases/exe-name-mangle/multi-exe-same-dir/dune-project +++ b/test/blackbox-tests/test-cases/exe-name-mangle/multi-exe-same-dir/dune-project @@ -1,2 +1,2 @@ (lang dune 1.11) -(wrapped_exes true) +(wrapped_executables true) diff --git a/test/blackbox-tests/test-cases/exe-name-mangle/multi-module/dune-project b/test/blackbox-tests/test-cases/exe-name-mangle/multi-module/dune-project index 5e7c7925dbde..fae69e9f6808 100644 --- a/test/blackbox-tests/test-cases/exe-name-mangle/multi-module/dune-project +++ b/test/blackbox-tests/test-cases/exe-name-mangle/multi-module/dune-project @@ -1,3 +1,3 @@ (lang dune 1.11) -(wrapped_exes true) +(wrapped_executables true) diff --git a/test/blackbox-tests/test-cases/exe-name-mangle/run.t b/test/blackbox-tests/test-cases/exe-name-mangle/run.t index af2decf2b5ef..4670d89133cd 100644 --- a/test/blackbox-tests/test-cases/exe-name-mangle/run.t +++ b/test/blackbox-tests/test-cases/exe-name-mangle/run.t @@ -1,4 +1,4 @@ -These tests show that (wrapped_exes true) addresses the problem of compilation +These tests show that (wrapped_executables true) addresses the problem of compilation units of exes colliding with libraries. Single module case. Here we technically don't need an alias module diff --git a/test/blackbox-tests/test-cases/exe-name-mangle/single-module/dune-project b/test/blackbox-tests/test-cases/exe-name-mangle/single-module/dune-project index 7f8b511cd24a..a81edc1d55d1 100644 --- a/test/blackbox-tests/test-cases/exe-name-mangle/single-module/dune-project +++ b/test/blackbox-tests/test-cases/exe-name-mangle/single-module/dune-project @@ -1,5 +1,5 @@ (lang dune 1.11) -(wrapped_exes true) +(wrapped_executables true) (implicit_transitive_deps false)