Skip to content

Commit

Permalink
Change implicit_transive_deps to be false for 2.0 (#2306)
Browse files Browse the repository at this point in the history
Change implicit_transive_deps to be false for 2.0
  • Loading branch information
rgrinberg authored Jun 21, 2019
2 parents 2fa3af0 + bb06e9a commit a51e199
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
- Do not put the `<package>.install` files in the source tree unless
`-p` or `--promote-install-files` is passed on the command line (#..., @diml)

- Change `implicit_transive_deps` to be false. Implicit transitive deps now must
be manually enabled (#2306, @rgrinberg)

1.11.0 (unreleased)
-------------------

Expand Down
9 changes: 7 additions & 2 deletions src/dune_project.ml
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ let get_exn () =

let filename = "dune-project"

let implicit_transitive_deps_default ~(lang : Lang.Instance.t) =
lang.version < (2, 0)

let anonymous = lazy (
let lang = get_dune_lang () in
let name = Name.anonymous_root in
Expand All @@ -527,6 +530,7 @@ let anonymous = lazy (
let parsing_context, stanza_parser, extension_args =
interpret_lang_and_extensions ~lang ~explicit_extensions:[] ~project_file
in
let implicit_transitive_deps = implicit_transitive_deps_default ~lang in
{ name = name
; packages = Package.Name.Map.empty
; root = Path.Source.root
Expand All @@ -538,7 +542,7 @@ let anonymous = lazy (
; maintainers = []
; authors = []
; version = None
; implicit_transitive_deps = false
; implicit_transitive_deps
; stanza_parser
; project_file
; extension_args
Expand Down Expand Up @@ -678,7 +682,8 @@ in your project.")
interpret_lang_and_extensions ~lang ~explicit_extensions ~project_file
in
let implicit_transitive_deps =
Option.value implicit_transitive_deps ~default:true
Option.value implicit_transitive_deps
~default:(implicit_transitive_deps_default ~lang)
in
let allow_approx_merlin =
Option.value ~default:false allow_approx_merlin in
Expand Down

0 comments on commit a51e199

Please sign in to comment.