Skip to content

Commit

Permalink
Rename wrapped_exes to wrapped_executables
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed Jul 8, 2019
1 parent 001c1f9 commit 3bdaaf5
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/dir_contents.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 14 additions & 13 deletions src/dune_project.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 (
Expand All @@ -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
Expand All @@ -537,7 +537,7 @@ let anonymous = lazy (
; authors = []
; version = None
; implicit_transitive_deps
; wrapped_exes
; wrapped_executables
; stanza_parser
; project_file
; extension_args
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 =
Expand All @@ -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
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/dune_project.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
(lang dune 1.11)
(wrapped_exes true)
(wrapped_executables true)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(lang dune 1.11)

(wrapped_exes true)
(wrapped_executables true)
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/exe-name-mangle/run.t
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(lang dune 1.11)

(wrapped_exes true)
(wrapped_executables true)

(implicit_transitive_deps false)

0 comments on commit 3bdaaf5

Please sign in to comment.