Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change implicit_transive_deps to be false for 2.0 #2306

Merged
merged 1 commit into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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