diff --git a/src/dune_project.ml b/src/dune_project.ml index 884c0489bc9c..c1e828ecd646 100644 --- a/src/dune_project.ml +++ b/src/dune_project.ml @@ -236,7 +236,12 @@ module Project_file_edit = struct else begin let ver = !default_dune_language_version in let lines = - [sprintf "(lang dune %s)" (Syntax.Version.to_string ver)] + [ sprintf "(lang dune %s)" (Syntax.Version.to_string ver) + ; sprintf ";; (explicit_js_mode) ;; uncomment to only enable js \ + targets with (modes js)" + ; sprintf ";; (implicit_transitive_deps false) ;; uncomment to \ + disallow transitive deps" + ] in let lines = match t.project_name with diff --git a/test/blackbox-tests/test-cases/dune-init/run.t b/test/blackbox-tests/test-cases/dune-init/run.t index 1bae590d357f..bf1c26f35757 100644 --- a/test/blackbox-tests/test-cases/dune-init/run.t +++ b/test/blackbox-tests/test-cases/dune-init/run.t @@ -11,6 +11,8 @@ Can build the public library $ cd _test_lib_dir && touch test_lib.opam && dune build Info: creating file dune-project with this contents: | (lang dune 1.9) + | ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + | ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps | (name test_lib) $ cat ./_test_lib_dir/dune @@ -63,6 +65,8 @@ Can build an executable $ cd _test_bin_dir && touch test_bin.opam && dune build Info: creating file dune-project with this contents: | (lang dune 1.9) + | ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + | ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps | (name test_bin) @@ -144,6 +148,8 @@ Can build the combo project $ cd _test_lib_exe_dir && touch test_bin.opam && dune build Info: creating file dune-project with this contents: | (lang dune 1.9) + | ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + | ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps | (name test_bin) @@ -179,6 +185,8 @@ Can build the multiple library project $ cd _test_lib && touch test_lib1.opam && dune build Info: creating file dune-project with this contents: | (lang dune 1.9) + | ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + | ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps | (name test_lib1) diff --git a/test/blackbox-tests/test-cases/dune-project-edition/run.t b/test/blackbox-tests/test-cases/dune-project-edition/run.t index 7dec689439d7..80595541c3d7 100644 --- a/test/blackbox-tests/test-cases/dune-project-edition/run.t +++ b/test/blackbox-tests/test-cases/dune-project-edition/run.t @@ -5,9 +5,13 @@ $ dune build Info: creating file dune-project with this contents: | (lang dune 1.9) + | ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + | ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps $ cat dune-project (lang dune 1.9) + ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps Test that using menhir automatically update the dune-project file @@ -16,4 +20,6 @@ Test that using menhir automatically update the dune-project file Info: appending this line to dune-project: (using menhir 2.0) $ cat dune-project (lang dune 1.9) + ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps (using menhir 2.0) diff --git a/test/blackbox-tests/test-cases/github1529/run.t b/test/blackbox-tests/test-cases/github1529/run.t index 80391f717a19..fbf7a1bfd533 100644 --- a/test/blackbox-tests/test-cases/github1529/run.t +++ b/test/blackbox-tests/test-cases/github1529/run.t @@ -4,5 +4,7 @@ file is present. $ dune build Info: creating file dune-project with this contents: | (lang dune 1.9) + | ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + | ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps Info: appending this line to dune-project: (using menhir 2.0) diff --git a/test/blackbox-tests/test-cases/upgrader/run.t b/test/blackbox-tests/test-cases/upgrader/run.t index b54788e7d1eb..95f2f9f4460d 100644 --- a/test/blackbox-tests/test-cases/upgrader/run.t +++ b/test/blackbox-tests/test-cases/upgrader/run.t @@ -1,6 +1,8 @@ $ dune upgrade Info: creating file dune-project with this contents: | (lang dune 1.0) + | ;; (explicit_js_mode) ;; uncomment to only enable js targets with (modes js) + | ;; (implicit_transitive_deps false) ;; uncomment to disallow transitive deps | (name foo) Upgrading foo.opam...