From 325584adfc92e6149dad55d618f5c9f7231daa2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dimino?= Date: Wed, 2 May 2018 12:56:12 +0100 Subject: [PATCH] Renaming to Dune (#721) - install two identical binaries: jbuilder and dune - rename the man pages to dune-* - change the name in man pages - change the name of libraries - add support for dune-project files and add a dune-project file - add support for dune-workspace files - start updating the manual - update the tests --- .travis-ci.sh | 38 ++++-- Makefile | 2 +- bin/jbuild | 8 +- bin/main.ml | 90 ++++++++------- doc/jbuild | 13 ++- doc/jbuild.inc | 78 ++++++------- doc/jbuild.rst | 4 +- doc/project-layout-specification.rst | 38 +++++- doc/update-jbuild.sh | 10 +- doc/usage.rst | 5 +- dune-project | 2 + jbuild-workspace.dev => dune-workspace.dev | 0 jbuilder.descr => dune.descr | 0 jbuilder.opam => dune.opam | 0 example/jbuild | 12 +- example/sample-projects/hello_world/run.t | 2 +- .../sample-projects/with-configure-step/run.t | 2 +- src/configurator/jbuild | 2 +- src/dune_project.ml | 69 +++++++++++ src/dune_project.mli | 12 ++ src/jbuild | 5 +- src/jbuild_load.ml | 25 ++++ src/main.ml | 37 +++--- src/ocaml-config/jbuild | 2 +- src/stdune/caml/jbuild | 2 +- src/stdune/jbuild | 2 +- src/usexp/jbuild | 2 +- test/blackbox-tests/cram.mll | 4 +- test/blackbox-tests/gen_tests.ml | 2 +- test/blackbox-tests/jbuild | 2 +- test/blackbox-tests/jbuild.inc | 108 ++++++++---------- test/blackbox-tests/test-cases/aliases/run.t | 16 +-- test/blackbox-tests/test-cases/c-stubs/run.t | 4 +- .../test-cases/configurator/c_test/jbuild | 2 +- .../test-cases/configurator/config/jbuild | 2 +- .../configurator/import-define/jbuild | 2 +- .../test-cases/configurator/run.t | 6 +- .../test-cases/copy_files/run.t | 4 +- .../test-cases/depend-on-the-universe/run.t | 10 +- .../test-cases/exclude-missing-module/run.t | 2 +- test/blackbox-tests/test-cases/exec-cmd/run.t | 12 +- test/blackbox-tests/test-cases/findlib/run.t | 6 +- .../test-cases/force-test/run.t | 8 +- .../test-cases/gen-opam-install-file/run.t | 2 +- test/blackbox-tests/test-cases/github20/run.t | 2 +- test/blackbox-tests/test-cases/github24/run.t | 2 +- test/blackbox-tests/test-cases/github25/run.t | 6 +- .../blackbox-tests/test-cases/github534/run.t | 2 +- .../blackbox-tests/test-cases/github568/run.t | 2 +- .../blackbox-tests/test-cases/github597/run.t | 2 +- .../blackbox-tests/test-cases/github644/run.t | 8 +- .../blackbox-tests/test-cases/github660/run.t | 8 +- .../test-cases/github717-odoc-index/run.t | 2 +- .../test-cases/include-loop/run.t | 2 +- .../test-cases/inline_tests/run.t | 8 +- .../installable-dup-private-libs/run.t | 2 +- .../blackbox-tests/test-cases/intf-only/run.t | 10 +- .../test-cases/js_of_ocaml/run.t | 4 +- .../test-cases/lib-available/run.t | 2 +- test/blackbox-tests/test-cases/loop/run.t | 6 +- test/blackbox-tests/test-cases/menhir/run.t | 2 +- .../test-cases/merlin-tests/run.t | 2 +- test/blackbox-tests/test-cases/meta-gen/run.t | 2 +- test/blackbox-tests/test-cases/misc/run.t | 2 +- .../test-cases/multiple-private-libs/run.t | 2 +- test/blackbox-tests/test-cases/null-dep/run.t | 2 +- .../test-cases/ocaml-syntax/run.t | 2 +- .../test-cases/ocamldep-multi-stanzas/run.t | 4 +- .../test-cases/odoc-unique-mlds/run.t | 4 +- test/blackbox-tests/test-cases/odoc/run.t | 8 +- .../test-cases/output-obj/run.t | 4 +- .../test-cases/package-dep/run.t | 2 +- .../test-cases/ppx-rewriter/run.t | 6 +- .../test-cases/private-public-overlap/run.t | 10 +- test/blackbox-tests/test-cases/promote/run.t | 12 +- test/blackbox-tests/test-cases/quoting/run.t | 2 +- test/blackbox-tests/test-cases/reason/run.t | 2 +- .../test-cases/redirections/run.t | 2 +- .../blackbox-tests/test-cases/scope-bug/run.t | 2 +- .../test-cases/scope-ppx-bug/run.t | 2 +- test/blackbox-tests/test-cases/select/run.t | 2 +- test/blackbox-tests/test-cases/utop/run.t | 2 +- test/unit-tests/action.mlt | 6 +- test/unit-tests/expect_test.mll | 2 +- test/unit-tests/filename.mlt | 2 +- test/unit-tests/import_dot_map.mlt | 4 +- test/unit-tests/jbuild | 12 +- test/unit-tests/tests.mlt | 17 ++- vendor/boot/opamBaseParser.ml | 2 +- vendor/re/src/jbuild | 2 +- 90 files changed, 508 insertions(+), 339 deletions(-) create mode 100644 dune-project rename jbuild-workspace.dev => dune-workspace.dev (100%) rename jbuilder.descr => dune.descr (100%) rename jbuilder.opam => dune.opam (100%) create mode 100644 src/dune_project.ml create mode 100644 src/dune_project.mli diff --git a/.travis-ci.sh b/.travis-ci.sh index a22e62966ea..702158d169c 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -48,6 +48,9 @@ case "$TARGET" in eval $(opam config env) opam install utop ppx_driver odoc menhir ocaml-migrate-parsetree js_of_ocaml-ppx js_of_ocaml-compiler--yes opam remove jbuilder `opam list --depends-on jbuilder --installed --short` --yes + if opam info dune &> /dev/null; then + opam remove dune `opam list --depends-on dune --installed --short` --yes + fi fi cp -a ~/.opam ~/.opam-start echo -en "travis_fold:end:opam.init\r" @@ -63,6 +66,10 @@ case "$TARGET" in UPDATE_OPAM=1 opam pin remove jbuilder --no-action --yes opam remove jbuilder --yes + if opam pin list -s | grep dune; then + opam pin remove dune --no-action --yes + opam remove dune --yes || true + fi fi if [ ! -e ~/.opam/last-update ] || [ $(cat ~/.opam/last-update) != $DATE ] ; then opam update --yes @@ -71,22 +78,35 @@ case "$TARGET" in opam upgrade --yes fi opam list - echo "version: \"1.0+dev$DATE\"" >> jbuilder.opam - opam pin add jbuilder . --no-action --yes + echo "version: \"1.0+dev$DATE\"" >> dune.opam + mkdir -p ../jbuilder + cat > ../jbuilder/jbuilder.opam <"] +homepage: "https://github.com/ocaml/dune" +bug-reports: "https://github.com/ocaml/dune/issues" +dev-repo: "https://github.com/ocaml/dune.git" +license: "Apache-2.0" +depends: [ "dune" ] +EOF + opam pin add dune . --no-action --yes + opam pin add jbuilder ../jbuilder --no-action --yes opam install utop ppx_driver odoc ocaml-migrate-parsetree js_of_ocaml-ppx js_of_ocaml-compiler --yes echo -en "travis_fold:end:opam.deps\r" fi - echo -en "travis_fold:start:jbuilder.bootstrap\r" + echo -en "travis_fold:start:dune.bootstrap\r" ocaml bootstrap.ml - echo -en "travis_fold:end:jbuilder.bootstrap\r" + echo -en "travis_fold:end:dune.bootstrap\r" ./boot.exe --subst - echo -en "travis_fold:start:jbuilder.boot\r" + echo -en "travis_fold:start:dune.boot\r" ./boot.exe --dev - echo -en "travis_fold:end:jbuilder.boot\r" + echo -en "travis_fold:end:dune.boot\r" if [ $WITH_OPAM -eq 1 ] ; then - _build/install/default/bin/jbuilder runtest && \ - _build/install/default/bin/jbuilder build @test/blackbox-tests/runtest-js && \ - ! _build/install/default/bin/jbuilder build @test/fail-with-background-jobs-running + _build/install/default/bin/dune runtest && \ + _build/install/default/bin/dune build @test/blackbox-tests/runtest-js && \ + ! _build/install/default/bin/dune build @test/fail-with-background-jobs-running RESULT=$? if [ $UPDATE_OPAM -eq 0 ] ; then rm -rf ~/.opam diff --git a/Makefile b/Makefile index 1b08bf0d0fe..b9d49ac34e8 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ promote: accept-corrections: promote all-supported-ocaml-versions: - $(BIN) build --dev @install @runtest --workspace jbuild-workspace.dev --root . + $(BIN) build --dev @install @runtest --workspace dune-workspace.dev --root . clean: $(BIN) clean diff --git a/bin/jbuild b/bin/jbuild index bfec655054f..19ffd943938 100644 --- a/bin/jbuild +++ b/bin/jbuild @@ -1,5 +1,9 @@ (executable ((name main) - (public_name jbuilder) - (libraries (unix jbuilder cmdliner)) + (public_name dune) + (libraries (unix dune cmdliner)) (preprocess no_preprocessing))) + +(install + ((section bin) + (files ((main.exe as jbuilder))))) diff --git a/bin/main.ml b/bin/main.ml index 68fe877c06d..3405ad80ff3 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -1,10 +1,10 @@ -open Jbuilder +open Dune open Import open Cmdliner open Fiber.O -(* Things in src/ don't depend on cmdliner to speed up the bootstrap, so we set this - reference here *) +(* Things in src/ don't depend on cmdliner to speed up the + bootstrap, so we set this reference here *) let () = suggest_function := Cmdliner_suggest.value type common = @@ -43,7 +43,7 @@ let set_common c ~targets = Clflags.force := c.force; Clflags.external_lib_deps_hint := List.concat - [ ["jbuilder"; "external-lib-deps"; "--missing"] + [ ["dune"; "external-lib-deps"; "--missing"] ; c.orig_args ; targets ] @@ -70,12 +70,13 @@ let restore_cwd_and_execve common prog argv env = Unix.execve prog argv env module Main = struct - include Jbuilder.Main + include Dune.Main let setup ~log ?external_lib_deps_mode common = setup ~log - ?workspace_file:(Option.map ~f:Path.of_string common.workspace_file) + ?workspace_file:( + Option.map common.workspace_file ~f:Path.of_string) ?only_packages:common.only_packages ?external_lib_deps_mode ?x:common.x @@ -85,14 +86,14 @@ module Main = struct end module Log = struct - include Jbuilder.Log + include Dune.Log let create common = Log.create ~display:common.config.display () end module Scheduler = struct - include Jbuilder.Scheduler + include Dune.Scheduler let go ?log ~common fiber = let fiber = @@ -137,11 +138,14 @@ let find_root () = let cwd = Sys.getcwd () in let rec loop counter ~candidates ~to_cwd dir = let files = Sys.readdir dir |> Array.to_list |> String.Set.of_list in - if String.Set.mem files "jbuild-workspace" then + if String.Set.mem files "dune-workspace" || + String.Set.mem files "jbuild-workspace" then cont counter ~candidates:((0, dir, to_cwd) :: candidates) dir ~to_cwd else if String.Set.exists files ~f:(fun fn -> - String.is_prefix fn ~prefix:"jbuild-workspace") then + String.is_prefix fn ~prefix:"jbuild-workspace") then cont counter ~candidates:((1, dir, to_cwd) :: candidates) dir ~to_cwd + else if String.Set.mem files Dune_project.filename then + cont counter ~candidates:((2, dir, to_cwd) :: candidates) dir ~to_cwd else cont counter ~candidates dir ~to_cwd and cont counter ~candidates ~to_cwd dir = @@ -342,7 +346,7 @@ let common = Arg.(value & opt (some (enum Config.Display.all)) None & info ["display"] ~docs ~docv:"MODE" - ~doc:{|Control the display mode of Jbuilder. + ~doc:{|Control the display mode of Dune. See $(b,dune-config\(5\)) for more details.|}) in let merge verbose display = @@ -358,8 +362,8 @@ let common = Arg.(value & flag & info ["no-buffer"] ~docs ~docv:"DIR" - ~doc:{|Do not buffer the output of commands executed by jbuilder. - By default jbuilder buffers the output of subcommands, in order + ~doc:{|Do not buffer the output of commands executed by dune. + By default dune buffers the output of subcommands, in order to prevent interleaving when multiple commands are executed in parallel. However, this can be an issue when debugging long running tests. With $(b,--no-buffer), commands have direct @@ -382,7 +386,7 @@ let common = & flag & info ["auto-promote"] ~docs ~doc:"Automatically promote files. This is similar to running - $(b,jbuilder promote) after the build.") + $(b,dune promote) after the build.") in let force = Arg.(value @@ -556,7 +560,7 @@ let resolve_package_install setup pkg = die "Unknown package %s!%s" pkg (hint pkg (Package.Name.Map.keys setup.packages - |> List.map ~f:Package.Name.to_string)) + |> List.map ~f:Package.Name.to_string)) let target_hint (setup : Main.setup) path = assert (Path.is_local path); @@ -593,7 +597,7 @@ let check_path contexts = in fun path -> let internal path = - die "This path is internal to jbuilder: %s" + die "This path is internal to dune: %s" (Path.to_string_maybe_quoted path) in if Path.is_in_build_dir path then @@ -701,7 +705,7 @@ let runtest = let man = [ `S "DESCRIPTION" ; `P {|This is a short-hand for calling:|} - ; `Pre {| jbuilder build @runtest|} + ; `Pre {| dune build @runtest|} ; `Blocks help_secs ] in @@ -732,7 +736,7 @@ let clean = let doc = "Clean the project." in let man = [ `S "DESCRIPTION" - ; `P {|Removes files added by jbuilder such as _build, .install, and .merlin|} + ; `P {|Removes files added by dune such as _build, .install, and .merlin|} ; `Blocks help_secs ] in @@ -856,7 +860,7 @@ let rules = let doc = "Dump internal rules." in let man = [ `S "DESCRIPTION" - ; `P {|Dump Jbuilder internal rules for the given targets. + ; `P {|Dump Dune internal rules for the given targets. If no targets are given, dump all the internal rules.|} ; `P {|By default the output is a list of S-expressions, one S-expression per rule. Each S-expression is of the form:|} @@ -996,7 +1000,7 @@ let install_uninstall ~what = if missing_install_files <> [] then begin die "The following .install are missing:\n\ %s\n\ - You need to run: jbuilder build @install" + You need to run: dune build @install" (String.concat ~sep:"\n" (List.map missing_install_files ~f:(fun p -> sprintf "- %s" (Path.to_string p)))) @@ -1068,11 +1072,11 @@ let exec = in let man = [ `S "DESCRIPTION" - ; `P {|$(b,jbuilder exec -- COMMAND) should behave in the same way as if you + ; `P {|$(b,dune exec -- COMMAND) should behave in the same way as if you do:|} - ; `Pre " \\$ jbuilder install\n\ + ; `Pre " \\$ dune install\n\ \ \\$ COMMAND" - ; `P {|In particular if you run $(b,jbuilder exec ocaml), you will have + ; `P {|In particular if you run $(b,dune exec ocaml), you will have access to the libraries defined in the workspace using your usual directives ($(b,#require) for instance)|} ; `P {|When a leading / is present in the command (absolute path), then the @@ -1191,7 +1195,7 @@ let subst = by the version obtained from the vcs. Currently only git is supported and the version is obtained from the output of:|} ; `Pre {| \$ git describe --always --dirty|} - ; `P {|$(b,jbuilder subst) substitutes the variables that topkg substitutes with + ; `P {|$(b,dune subst) substitutes the variables that topkg substitutes with the defatult configuration:|} ; var "NAME" "the name of the package" ; var "VERSION" "output of $(b,git describe --always --dirty)" @@ -1211,9 +1215,9 @@ let subst = heuristic: if all the $(b,.opam) files in the current directory are prefixed by the shortest package name, this prefix is used. Otherwise you must specify a name with the $(b,-n) command line option.|} - ; `P {|In order to call $(b,jbuilder subst) when your package is pinned, add this line + ; `P {|In order to call $(b,dune subst) when your package is pinned, add this line to the $(b,build:) field of your opam file:|} - ; `Pre {| ["jbuilder" "subst"] {pinned}|} + ; `Pre {| [dune "subst"] {pinned}|} ; `Blocks help_secs ] in @@ -1234,7 +1238,7 @@ let utop = let doc = "Load library in utop" in let man = [ `S "DESCRIPTION" - ; `P {|$(b,jbuilder utop DIR) build and run utop toplevel with libraries defined in DIR|} + ; `P {|$(b,dune utop DIR) build and run utop toplevel with libraries defined in DIR|} ; `Blocks help_secs ] in let go common dir ctx_name args = @@ -1271,12 +1275,12 @@ let promote = let man = [ `S "DESCRIPTION" ; `P {|Considering all actions of the form $(b,(diff a b)) that failed - in the last run of jbuilder, $(b,jbuilder promote) does the following: + in the last run of dune, $(b,dune promote) does the following: If $(b,a) is present in the source tree but $(b,b) isn't, $(b,b) is copied over to $(b,a) in the source tree. The idea behind this is that you might use $(b,(diff file.expected file.generated)) and then call - $(b,jbuilder promote) to promote the generated file. + $(b,dune promote) to promote the generated file. |} ; `Blocks help_secs ] in @@ -1294,13 +1298,13 @@ let promote = module Help = struct let config = - ("dune-config", 5, "", "Jbuilder", "Jbuilder manual"), + ("dune-config", 5, "", "Dune", "Dune manual"), [ `S Manpage.s_synopsis ; `Pre "~/.config/dune/config" ; `S Manpage.s_description - ; `P {|Unless $(b,--no-config) or $(b,-p) is passed, Jbuilder will read a + ; `P {|Unless $(b,--no-config) or $(b,-p) is passed, Dune will read a configuration file from the user home directory. This file is used - to control various aspects of the behavior of Jbuilder.|} + to control various aspects of the behavior of Dune.|} ; `P {|The configuration file is normally $(b,~/.config/dune/config) on Unix systems and $(b,Local Settings/dune/config) in the User home directory on Windows. However, it is possible to specify an @@ -1309,13 +1313,13 @@ module Help = struct a list of stanzas. The following sections describe the stanzas available.|} ; `S "DISPLAY MODES" ; `P {|Syntax: $(b,\(display MODE\))|} - ; `P {|This stanza controls how Jbuilder reports what it is doing to the user. + ; `P {|This stanza controls how Dune reports what it is doing to the user. This parameter can also be set from the command line via $(b,--display MODE). The following display modes are available:|} ; `Blocks (List.map ~f:(fun (x, desc) -> `I (sprintf "$(b,%s)" x, desc)) [ "progress", - {|This is the default, Jbuilder shows and update a + {|This is the default, Dune shows and update a status line as build goals are being completed.|} ; "quiet", {|Only display errors.|} @@ -1325,13 +1329,13 @@ module Help = struct on the right.|} ; "verbose", {|Print the full command lines of programs being - executed by Jbuilder, with some colors to help differentiate + executed by Dune, with some colors to help differentiate programs.|} ]) ; `P {|Note that when the selected display mode is $(b,progress) and the output is not a terminal then the $(b,quiet) mode is selected - instead. This rule doesn't apply when running Jbuilder inside Emacs. - Jbuilder detects whether it is executed from inside Emacs or not by + instead. This rule doesn't apply when running Dune inside Emacs. + Dune detects whether it is executed from inside Emacs or not by looking at the environment variable $(b,INSIDE_EMACS) that is set by Emacs. If you want the same behavior with another editor, you can set this variable. If your editor already sets another variable, @@ -1339,7 +1343,7 @@ module Help = struct add support for it.|} ; `S "JOBS" ; `P {|Syntax: $(b,\(jobs NUMBER\))|} - ; `P {|Set the maximum number of jobs Jbuilder might run in parallel. + ; `P {|Set the maximum number of jobs Dune might run in parallel. This can also be set from the command line via $(b,-j NUMBER).|} ; `P {|The default for this value is 4.|} ; common_footer @@ -1355,10 +1359,10 @@ module Help = struct ] let help = - let doc = "Additional Jbuilder help" in + let doc = "Additional Dune help" in let man = [ `S "DESCRIPTION" - ; `P {|$(b,jbuilder help TOPIC) provides additional help on the given topic. + ; `P {|$(b,dune help TOPIC) provides additional help on the given topic. The following topics are available:|} ; `Blocks (List.concat_map commands ~f:(fun (s, what) -> match what with @@ -1413,13 +1417,13 @@ let all = let default = let doc = "composable build system for OCaml" in ( Term.(ret (const (fun _ -> `Help (`Pager, None)) $ common)) - , Term.info "jbuilder" ~doc ~version:"%%VERSION%%" + , Term.info "dune" ~doc ~version:"%%VERSION%%" ~man: [ `S "DESCRIPTION" - ; `P {|Jbuilder is a build system designed for OCaml projects only. It + ; `P {|Dune is a build system designed for OCaml projects only. It focuses on providing the user with a consistent experience and takes care of most of the low-level details of OCaml compilation. All you - have to do is provide a description of your project and Jbuilder will + have to do is provide a description of your project and Dune will do the rest. |} ; `P {|The scheme it implements is inspired from the one used inside Jane diff --git a/doc/jbuild b/doc/jbuild index 2501e3a8f9e..2054d50ea93 100644 --- a/doc/jbuild +++ b/doc/jbuild @@ -1,13 +1,13 @@ (jbuild_version 1) (rule - ((targets (jbuilder.1)) + ((targets (dune.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} --help=groff))))) + (run ${bin:dune} --help=groff))))) (install ((section man) - (files (jbuilder.1)))) + (files (dune.1)))) (rule ((targets (dune-config.5)) @@ -21,8 +21,11 @@ (include jbuild.inc) (rule - (with-stdout-to jbuild.inc.gen - (run bash ${path:update-jbuild.sh} ${bin:jbuilder}))) + ((targets (jbuild.inc.gen)) + (deps ((package dune))) + (action + (with-stdout-to ${@} + (run bash ${path:update-jbuild.sh}))))) (alias ((name runtest) diff --git a/doc/jbuild.inc b/doc/jbuild.inc index 443cb0c90f2..f915ebab95d 100644 --- a/doc/jbuild.inc +++ b/doc/jbuild.inc @@ -1,118 +1,118 @@ (rule - ((targets (jbuilder-build.1)) + ((targets (dune-build.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} build --help=groff))))) + (run dune build --help=groff))))) (install ((section man) - (files (jbuilder-build.1)))) + (files (dune-build.1)))) (rule - ((targets (jbuilder-clean.1)) + ((targets (dune-clean.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} clean --help=groff))))) + (run dune clean --help=groff))))) (install ((section man) - (files (jbuilder-clean.1)))) + (files (dune-clean.1)))) (rule - ((targets (jbuilder-exec.1)) + ((targets (dune-exec.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} exec --help=groff))))) + (run dune exec --help=groff))))) (install ((section man) - (files (jbuilder-exec.1)))) + (files (dune-exec.1)))) (rule - ((targets (jbuilder-external-lib-deps.1)) + ((targets (dune-external-lib-deps.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} external-lib-deps --help=groff))))) + (run dune external-lib-deps --help=groff))))) (install ((section man) - (files (jbuilder-external-lib-deps.1)))) + (files (dune-external-lib-deps.1)))) (rule - ((targets (jbuilder-help.1)) + ((targets (dune-help.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} help --help=groff))))) + (run dune help --help=groff))))) (install ((section man) - (files (jbuilder-help.1)))) + (files (dune-help.1)))) (rule - ((targets (jbuilder-install.1)) + ((targets (dune-install.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} install --help=groff))))) + (run dune install --help=groff))))) (install ((section man) - (files (jbuilder-install.1)))) + (files (dune-install.1)))) (rule - ((targets (jbuilder-installed-libraries.1)) + ((targets (dune-installed-libraries.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} installed-libraries --help=groff))))) + (run dune installed-libraries --help=groff))))) (install ((section man) - (files (jbuilder-installed-libraries.1)))) + (files (dune-installed-libraries.1)))) (rule - ((targets (jbuilder-promote.1)) + ((targets (dune-promote.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} promote --help=groff))))) + (run dune promote --help=groff))))) (install ((section man) - (files (jbuilder-promote.1)))) + (files (dune-promote.1)))) (rule - ((targets (jbuilder-rules.1)) + ((targets (dune-rules.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} rules --help=groff))))) + (run dune rules --help=groff))))) (install ((section man) - (files (jbuilder-rules.1)))) + (files (dune-rules.1)))) (rule - ((targets (jbuilder-runtest.1)) + ((targets (dune-runtest.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} runtest --help=groff))))) + (run dune runtest --help=groff))))) (install ((section man) - (files (jbuilder-runtest.1)))) + (files (dune-runtest.1)))) (rule - ((targets (jbuilder-subst.1)) + ((targets (dune-subst.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} subst --help=groff))))) + (run dune subst --help=groff))))) (install ((section man) - (files (jbuilder-subst.1)))) + (files (dune-subst.1)))) (rule - ((targets (jbuilder-uninstall.1)) + ((targets (dune-uninstall.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} uninstall --help=groff))))) + (run dune uninstall --help=groff))))) (install ((section man) - (files (jbuilder-uninstall.1)))) + (files (dune-uninstall.1)))) (rule - ((targets (jbuilder-utop.1)) + ((targets (dune-utop.1)) (action (with-stdout-to ${@} - (run ${bin:jbuilder} utop --help=groff))))) + (run dune utop --help=groff))))) (install ((section man) - (files (jbuilder-utop.1)))) + (files (dune-utop.1)))) diff --git a/doc/jbuild.rst b/doc/jbuild.rst index fc376ec55bc..7026ff10e3a 100644 --- a/doc/jbuild.rst +++ b/doc/jbuild.rst @@ -31,8 +31,8 @@ The following sections describe the available stanzas and their meaning. jbuild_version -------------- -``(jbuild_version 1)`` specifies that we are using the version 1 of -the Jbuilder metadata format in this ``jbuild`` file. +Deprecated. This stanza is no longer used and will be removed in the +future. library ------- diff --git a/doc/project-layout-specification.rst b/doc/project-layout-specification.rst index 44305a30d48..20b71efb3b0 100644 --- a/doc/project-layout-specification.rst +++ b/doc/project-layout-specification.rst @@ -2,9 +2,10 @@ Project Layout and Metadata Specification ***************************************** -A typical jbuilder project will have one or more ``.opam`` file -at toplevel as well as ``jbuild`` files wherever interesting things are: -libraries, executables, tests, documents to install, etc... +A typical jbuilder project will have a ```dune-project`` and one or +more ``.opam`` file at toplevel as well as ``jbuild`` files +wherever interesting things are: libraries, executables, tests, +documents to install, etc... It is recommended to organize your project so that you have exactly one library per directory. You can have several executables in the same @@ -83,10 +84,10 @@ Examples this_is_an_atom_123'&^%! ; this is a comment "another atom in an OCaml-string \"string in a string\" \123" - + ; empty list follows below () - + ; a more complex example ( ( @@ -103,6 +104,33 @@ Examples .. _opam-files: +dune-project files +================== + +These files are used to mark the root of projects as well as define +project-wide parameters. These files are required to have a ``lang`` +which controls the names and contents of all configuration files read +by Dune. The ``lang`` stanza looks like: + +.. code:: scheme + + (lang dune 0.1) + +The 0.1 version of the language is exactly the same as the Jbuilder +language. So to convert a Jbuilder project to Dune, simply write this +file at the root of your project. + +Additionally, they can contains the following stanzas. + +name +---- + +Sets the name of the project: + +.. code:: scheme + + (name ) + .opam files ==================== diff --git a/doc/update-jbuild.sh b/doc/update-jbuild.sh index 3ec82dae1df..929af2052bf 100755 --- a/doc/update-jbuild.sh +++ b/doc/update-jbuild.sh @@ -4,22 +4,20 @@ set -e -o pipefail -jbuilder=$1 - -CMDS=$($jbuilder --help=plain | \ +CMDS=$(dune --help=plain | \ sed -n '/COMMANDS/,/OPTIONS/p' | sed -En 's/^ ([a-z-]+)/\1/p') for cmd in $CMDS; do cat < Dune_0_1 + | _ -> + of_sexp_error ver "unsupported version of the dune language" + in + let name = + enum + [ ("dune", ()) ] + in + sum + [ cstr "lang" (name @> version @> nil) (fun () v -> v) ] + +module Acc = struct + type t = + { name : string option + } + + let init = + { name = None } +end + +let load ~dir = + let fname = Path.relative dir filename in + let sexps = Io.Sexp.load fname ~mode:Many in + let langs, sexps = + List.partition_map sexps ~f:(function + | List (loc, Atom (_, A "lang") :: _) as sexp -> + Left (lang sexp, loc) + | sexp -> Right sexp) + in + let _lang = + match langs with + | [] -> + Loc.fail (Loc.in_file (Path.to_string fname)) + "language not specified, you need to add (lang dune 0.1)" + | [(v, _)] -> v + | _ :: (_, loc) :: _ -> + Loc.fail loc "language specified too many times" + in + let acc = + List.fold_left sexps ~init:Acc.init ~f:(fun (acc : Acc.t) sexp -> + sum + [ cstr "lang" nil acc + ; cstr_loc "name" (string @> nil) (fun loc name -> + match acc.name with + | None -> { Acc.name = Some name } + | Some _ -> Loc.fail loc "name specified too many times") + ] + sexp) + in + { name = + match acc.name with + | Some s -> s + | None -> "_" ^ String.concat ~sep:"_" (Path.explode_exn dir) + } diff --git a/src/dune_project.mli b/src/dune_project.mli new file mode 100644 index 00000000000..07dbf30a84f --- /dev/null +++ b/src/dune_project.mli @@ -0,0 +1,12 @@ +(** dune-project files *) + +open Import + +type t = + { name : string + } + +val load : dir:Path.t -> t + +(** "dune-project" *) +val filename : string diff --git a/src/jbuild b/src/jbuild index 386c991eb9d..6ac990bd0ac 100644 --- a/src/jbuild +++ b/src/jbuild @@ -1,8 +1,7 @@ (jbuild_version 1) (library - ((name jbuilder) - ;; (public_name jbuilder) + ((name dune) (libraries (unix stdune fiber @@ -11,7 +10,7 @@ opam_file_format usexp ocaml_config)) - (synopsis "Internal Jbuilder library, do not use!"))) + (synopsis "Internal Dune library, do not use!"))) (ocamllex (meta_lexer glob_lexer)) diff --git a/src/jbuild_load.ml b/src/jbuild_load.ml index 3c8d6a7b2fb..056ba8aabf4 100644 --- a/src/jbuild_load.ml +++ b/src/jbuild_load.ml @@ -258,6 +258,31 @@ let load ?extra_ignored_subtrees ?(ignore_promoted_rules=false) () = |> Path.Map.of_list_multi |> Path.Map.map ~f:Scope_info.make in + + let projects = + File_tree.fold ftree ~traverse_ignored_dirs:false ~init:[] + ~f:(fun dir acc -> + let path = File_tree.Dir.path dir in + let files = File_tree.Dir.files dir in + if String.Set.mem files Dune_project.filename then begin + (path, Dune_project.load ~dir:path) :: acc + end else + acc) + |> Path.Map.of_list_exn + in + let scopes = + Path.Map.merge scopes projects ~f:(fun path scope project -> + match scope, project with + | None, None -> assert false + | Some _, None -> scope + | None, Some { name } -> + Some { name = Some name + ; packages = Package.Name.Map.empty + ; root = path + } + | Some scope, Some { name } -> Some { scope with name = Some name }) + in + let scopes = if Path.Map.mem scopes Path.root then scopes diff --git a/src/main.ml b/src/main.ml index f1c8a5273b9..40fd9fb7740 100644 --- a/src/main.ml +++ b/src/main.ml @@ -30,7 +30,7 @@ let setup_env ~capture_outputs = let setup ?(log=Log.no_log) ?external_lib_deps_mode - ?workspace ?(workspace_file=Path.of_string "jbuild-workspace") + ?workspace ?workspace_file ?only_packages ?extra_ignored_subtrees ?x @@ -55,16 +55,27 @@ let setup ?(log=Log.no_log) match workspace with | Some w -> w | None -> - if Path.exists workspace_file then - Workspace.load ?x workspace_file - else - { merlin_context = Some "default" - ; contexts = [Default [ - match x with - | None -> Native - | Some x -> Named x - ]] - } + match workspace_file with + | Some p -> + Workspace.load ?x p + | _ -> + match + List.find_map ["dune-workspace"; "jbuild-workspace"] ~f:(fun fn -> + let p = Path.of_string fn in + if Path.exists p then + Some p + else + None) + with + | Some p -> Workspace.load ?x p + | None -> + { merlin_context = Some "default" + ; contexts = [Default [ + match x with + | None -> Native + | Some x -> Named x + ]] + } in Fiber.parallel_map workspace.contexts ~f:(fun ctx_def -> @@ -193,7 +204,7 @@ let bootstrap () = let main () = let anon s = raise (Arg.Bad (Printf.sprintf "don't know what to do with %s\n" s)) in let subst () = - Scheduler.go (Watermarks.subst () ~name:"jbuilder"); + Scheduler.go (Watermarks.subst () ~name:"dune"); exit 0 in let display = ref None in @@ -248,7 +259,7 @@ let bootstrap () = () >>= fun { build_system = bs; _ } -> Build_system.do_build bs - ~request:(Build.path (Path.of_string "_build/default/jbuilder.install"))) + ~request:(Build.path (Path.of_string "_build/default/dune.install"))) in try main () diff --git a/src/ocaml-config/jbuild b/src/ocaml-config/jbuild index 3fa057e438e..fdf0a24d03c 100644 --- a/src/ocaml-config/jbuild +++ b/src/ocaml-config/jbuild @@ -2,6 +2,6 @@ (library ((name ocaml_config) - (public_name jbuilder.ocaml_config) + (public_name dune.ocaml_config) (libraries (stdune usexp)) (synopsis "[Internal] Interpret the output of 'ocamlc -config'"))) diff --git a/src/stdune/caml/jbuild b/src/stdune/caml/jbuild index 04b16834208..389bb77a2ad 100644 --- a/src/stdune/caml/jbuild +++ b/src/stdune/caml/jbuild @@ -1,4 +1,4 @@ (library ((name caml) - (public_name jbuilder.caml) + (public_name dune.caml) (synopsis "[Internal] Wrapped version of the OCaml stdlib"))) diff --git a/src/stdune/jbuild b/src/stdune/jbuild index f79d508be9a..edfecd7bfbf 100644 --- a/src/stdune/jbuild +++ b/src/stdune/jbuild @@ -1,5 +1,5 @@ (library ((name stdune) - (public_name jbuilder.stdune) + (public_name dune.stdune) (synopsis "[Internal] Standard library of Dune") (libraries (caml unix usexp)))) diff --git a/src/usexp/jbuild b/src/usexp/jbuild index 53b46ee96e5..4eb9b73d22e 100644 --- a/src/usexp/jbuild +++ b/src/usexp/jbuild @@ -3,7 +3,7 @@ (library ((name usexp) (synopsis "[Internal] S-expression library") - (public_name jbuilder.usexp))) + (public_name dune.usexp))) (rule (with-stdout-to table.ml.gen (run gen/gen_parser_automaton.exe))) diff --git a/test/blackbox-tests/cram.mll b/test/blackbox-tests/cram.mll index 5fe4cd0ae53..124bf06bc86 100644 --- a/test/blackbox-tests/cram.mll +++ b/test/blackbox-tests/cram.mll @@ -1,7 +1,7 @@ (* Mini implementation of cram tests *) { -open Jbuilder +open Dune open Import type item = @@ -132,7 +132,7 @@ and postprocess tbl b = parse end; Test_common.run_expect_test expect_test ~f:(fun file_contents lexbuf -> let items = file lexbuf in - let temp_file = Filename.temp_file "jbuilder-test" ".output" in + let temp_file = Filename.temp_file "dune-test" ".output" in at_exit (fun () -> Sys.remove temp_file); let buf = Buffer.create (String.length file_contents + 1024) in List.iter items ~f:(function diff --git a/test/blackbox-tests/gen_tests.ml b/test/blackbox-tests/gen_tests.ml index c6d8e93fbcc..505bc1e04d4 100644 --- a/test/blackbox-tests/gen_tests.ml +++ b/test/blackbox-tests/gen_tests.ml @@ -79,7 +79,7 @@ module Test = struct ; action ] in alias t.name ~deps:( - [ Sexp.strings ["package"; "jbuilder"] + [ Sexp.strings ["package"; "dune"] ; Sexp.strings [ "files_recursively_in" ; sprintf "test-cases/%s" t.name] ] diff --git a/test/blackbox-tests/jbuild b/test/blackbox-tests/jbuild index da7ec349c73..52f7e509cb1 100644 --- a/test/blackbox-tests/jbuild +++ b/test/blackbox-tests/jbuild @@ -8,7 +8,7 @@ (executable ((name cram) (modules (cram)) - (libraries (test_common platform jbuilder configurator)))) + (libraries (test_common platform dune configurator)))) (ocamllex (cram)) diff --git a/test/blackbox-tests/jbuild.inc b/test/blackbox-tests/jbuild.inc index 1eb4e6a5d4b..f366d6876b1 100644 --- a/test/blackbox-tests/jbuild.inc +++ b/test/blackbox-tests/jbuild.inc @@ -1,6 +1,6 @@ (alias ((name aliases) - (deps ((package jbuilder) (files_recursively_in test-cases/aliases))) + (deps ((package dune) (files_recursively_in test-cases/aliases))) (action (chdir test-cases/aliases @@ -8,7 +8,7 @@ (alias ((name byte-code-only) - (deps ((package jbuilder) (files_recursively_in test-cases/byte-code-only))) + (deps ((package dune) (files_recursively_in test-cases/byte-code-only))) (action (chdir test-cases/byte-code-only @@ -16,7 +16,7 @@ (alias ((name c-stubs) - (deps ((package jbuilder) (files_recursively_in test-cases/c-stubs))) + (deps ((package dune) (files_recursively_in test-cases/c-stubs))) (action (chdir test-cases/c-stubs @@ -24,7 +24,7 @@ (alias ((name configurator) - (deps ((package jbuilder) (files_recursively_in test-cases/configurator))) + (deps ((package dune) (files_recursively_in test-cases/configurator))) (action (chdir test-cases/configurator @@ -34,7 +34,7 @@ (alias ((name copy_files) - (deps ((package jbuilder) (files_recursively_in test-cases/copy_files))) + (deps ((package dune) (files_recursively_in test-cases/copy_files))) (action (chdir test-cases/copy_files @@ -42,8 +42,7 @@ (alias ((name cross-compilation) - (deps - ((package jbuilder) (files_recursively_in test-cases/cross-compilation))) + (deps ((package dune) (files_recursively_in test-cases/cross-compilation))) (action (chdir test-cases/cross-compilation @@ -52,8 +51,7 @@ (alias ((name depend-on-the-universe) (deps - ((package jbuilder) - (files_recursively_in test-cases/depend-on-the-universe))) + ((package dune) (files_recursively_in test-cases/depend-on-the-universe))) (action (chdir test-cases/depend-on-the-universe @@ -62,8 +60,7 @@ (alias ((name exclude-missing-module) (deps - ((package jbuilder) - (files_recursively_in test-cases/exclude-missing-module))) + ((package dune) (files_recursively_in test-cases/exclude-missing-module))) (action (chdir test-cases/exclude-missing-module @@ -71,7 +68,7 @@ (alias ((name exec-cmd) - (deps ((package jbuilder) (files_recursively_in test-cases/exec-cmd))) + (deps ((package dune) (files_recursively_in test-cases/exec-cmd))) (action (chdir test-cases/exec-cmd @@ -79,7 +76,7 @@ (alias ((name findlib) - (deps ((package jbuilder) (files_recursively_in test-cases/findlib))) + (deps ((package dune) (files_recursively_in test-cases/findlib))) (action (chdir test-cases/findlib @@ -87,7 +84,7 @@ (alias ((name force-test) - (deps ((package jbuilder) (files_recursively_in test-cases/force-test))) + (deps ((package dune) (files_recursively_in test-cases/force-test))) (action (chdir test-cases/force-test @@ -96,8 +93,7 @@ (alias ((name gen-opam-install-file) (deps - ((package jbuilder) - (files_recursively_in test-cases/gen-opam-install-file))) + ((package dune) (files_recursively_in test-cases/gen-opam-install-file))) (action (chdir test-cases/gen-opam-install-file @@ -105,7 +101,7 @@ (alias ((name github20) - (deps ((package jbuilder) (files_recursively_in test-cases/github20))) + (deps ((package dune) (files_recursively_in test-cases/github20))) (action (chdir test-cases/github20 @@ -113,7 +109,7 @@ (alias ((name github24) - (deps ((package jbuilder) (files_recursively_in test-cases/github24))) + (deps ((package dune) (files_recursively_in test-cases/github24))) (action (chdir test-cases/github24 @@ -121,7 +117,7 @@ (alias ((name github25) - (deps ((package jbuilder) (files_recursively_in test-cases/github25))) + (deps ((package dune) (files_recursively_in test-cases/github25))) (action (setenv OCAMLPATH @@ -132,7 +128,7 @@ (alias ((name github534) - (deps ((package jbuilder) (files_recursively_in test-cases/github534))) + (deps ((package dune) (files_recursively_in test-cases/github534))) (action (chdir test-cases/github534 @@ -140,7 +136,7 @@ (alias ((name github568) - (deps ((package jbuilder) (files_recursively_in test-cases/github568))) + (deps ((package dune) (files_recursively_in test-cases/github568))) (action (chdir test-cases/github568 @@ -148,7 +144,7 @@ (alias ((name github597) - (deps ((package jbuilder) (files_recursively_in test-cases/github597))) + (deps ((package dune) (files_recursively_in test-cases/github597))) (action (chdir test-cases/github597 @@ -156,7 +152,7 @@ (alias ((name github644) - (deps ((package jbuilder) (files_recursively_in test-cases/github644))) + (deps ((package dune) (files_recursively_in test-cases/github644))) (action (chdir test-cases/github644 @@ -164,7 +160,7 @@ (alias ((name github660) - (deps ((package jbuilder) (files_recursively_in test-cases/github660))) + (deps ((package dune) (files_recursively_in test-cases/github660))) (action (chdir test-cases/github660 @@ -173,7 +169,7 @@ (alias ((name github717-odoc-index) (deps - ((package jbuilder) (files_recursively_in test-cases/github717-odoc-index))) + ((package dune) (files_recursively_in test-cases/github717-odoc-index))) (action (chdir test-cases/github717-odoc-index @@ -183,7 +179,7 @@ (alias ((name include-loop) - (deps ((package jbuilder) (files_recursively_in test-cases/include-loop))) + (deps ((package dune) (files_recursively_in test-cases/include-loop))) (action (chdir test-cases/include-loop @@ -191,7 +187,7 @@ (alias ((name inline_tests) - (deps ((package jbuilder) (files_recursively_in test-cases/inline_tests))) + (deps ((package dune) (files_recursively_in test-cases/inline_tests))) (action (chdir test-cases/inline_tests @@ -200,7 +196,7 @@ (alias ((name installable-dup-private-libs) (deps - ((package jbuilder) + ((package dune) (files_recursively_in test-cases/installable-dup-private-libs))) (action (chdir @@ -209,7 +205,7 @@ (alias ((name intf-only) - (deps ((package jbuilder) (files_recursively_in test-cases/intf-only))) + (deps ((package dune) (files_recursively_in test-cases/intf-only))) (action (chdir test-cases/intf-only @@ -217,7 +213,7 @@ (alias ((name js_of_ocaml) - (deps ((package jbuilder) (files_recursively_in test-cases/js_of_ocaml))) + (deps ((package dune) (files_recursively_in test-cases/js_of_ocaml))) (action (setenv NODE @@ -228,7 +224,7 @@ (alias ((name lib-available) - (deps ((package jbuilder) (files_recursively_in test-cases/lib-available))) + (deps ((package dune) (files_recursively_in test-cases/lib-available))) (action (chdir test-cases/lib-available @@ -236,7 +232,7 @@ (alias ((name loop) - (deps ((package jbuilder) (files_recursively_in test-cases/loop))) + (deps ((package dune) (files_recursively_in test-cases/loop))) (action (chdir test-cases/loop @@ -244,7 +240,7 @@ (alias ((name menhir) - (deps ((package jbuilder) (files_recursively_in test-cases/menhir))) + (deps ((package dune) (files_recursively_in test-cases/menhir))) (action (chdir test-cases/menhir @@ -252,7 +248,7 @@ (alias ((name merlin-tests) - (deps ((package jbuilder) (files_recursively_in test-cases/merlin-tests))) + (deps ((package dune) (files_recursively_in test-cases/merlin-tests))) (action (chdir test-cases/merlin-tests @@ -260,7 +256,7 @@ (alias ((name meta-gen) - (deps ((package jbuilder) (files_recursively_in test-cases/meta-gen))) + (deps ((package dune) (files_recursively_in test-cases/meta-gen))) (action (chdir test-cases/meta-gen @@ -268,7 +264,7 @@ (alias ((name misc) - (deps ((package jbuilder) (files_recursively_in test-cases/misc))) + (deps ((package dune) (files_recursively_in test-cases/misc))) (action (chdir test-cases/misc @@ -277,8 +273,7 @@ (alias ((name multiple-private-libs) (deps - ((package jbuilder) - (files_recursively_in test-cases/multiple-private-libs))) + ((package dune) (files_recursively_in test-cases/multiple-private-libs))) (action (chdir test-cases/multiple-private-libs @@ -288,7 +283,7 @@ (alias ((name null-dep) - (deps ((package jbuilder) (files_recursively_in test-cases/null-dep))) + (deps ((package dune) (files_recursively_in test-cases/null-dep))) (action (chdir test-cases/null-dep @@ -296,7 +291,7 @@ (alias ((name ocaml-syntax) - (deps ((package jbuilder) (files_recursively_in test-cases/ocaml-syntax))) + (deps ((package dune) (files_recursively_in test-cases/ocaml-syntax))) (action (chdir test-cases/ocaml-syntax @@ -305,8 +300,7 @@ (alias ((name ocamldep-multi-stanzas) (deps - ((package jbuilder) - (files_recursively_in test-cases/ocamldep-multi-stanzas))) + ((package dune) (files_recursively_in test-cases/ocamldep-multi-stanzas))) (action (chdir test-cases/ocamldep-multi-stanzas @@ -314,7 +308,7 @@ (alias ((name odoc) - (deps ((package jbuilder) (files_recursively_in test-cases/odoc))) + (deps ((package dune) (files_recursively_in test-cases/odoc))) (action (chdir test-cases/odoc @@ -324,8 +318,7 @@ (alias ((name odoc-unique-mlds) - (deps - ((package jbuilder) (files_recursively_in test-cases/odoc-unique-mlds))) + (deps ((package dune) (files_recursively_in test-cases/odoc-unique-mlds))) (action (chdir test-cases/odoc-unique-mlds @@ -335,7 +328,7 @@ (alias ((name output-obj) - (deps ((package jbuilder) (files_recursively_in test-cases/output-obj))) + (deps ((package dune) (files_recursively_in test-cases/output-obj))) (action (chdir test-cases/output-obj @@ -352,7 +345,7 @@ (alias ((name package-dep) - (deps ((package jbuilder) (files_recursively_in test-cases/package-dep))) + (deps ((package dune) (files_recursively_in test-cases/package-dep))) (action (chdir test-cases/package-dep @@ -360,7 +353,7 @@ (alias ((name ppx-rewriter) - (deps ((package jbuilder) (files_recursively_in test-cases/ppx-rewriter))) + (deps ((package dune) (files_recursively_in test-cases/ppx-rewriter))) (action (chdir test-cases/ppx-rewriter @@ -371,8 +364,7 @@ (alias ((name private-public-overlap) (deps - ((package jbuilder) - (files_recursively_in test-cases/private-public-overlap))) + ((package dune) (files_recursively_in test-cases/private-public-overlap))) (action (chdir test-cases/private-public-overlap @@ -380,7 +372,7 @@ (alias ((name promote) - (deps ((package jbuilder) (files_recursively_in test-cases/promote))) + (deps ((package dune) (files_recursively_in test-cases/promote))) (action (chdir test-cases/promote @@ -388,7 +380,7 @@ (alias ((name quoting) - (deps ((package jbuilder) (files_recursively_in test-cases/quoting))) + (deps ((package dune) (files_recursively_in test-cases/quoting))) (action (chdir test-cases/quoting @@ -396,7 +388,7 @@ (alias ((name reason) - (deps ((package jbuilder) (files_recursively_in test-cases/reason))) + (deps ((package dune) (files_recursively_in test-cases/reason))) (action (chdir test-cases/reason @@ -404,7 +396,7 @@ (alias ((name redirections) - (deps ((package jbuilder) (files_recursively_in test-cases/redirections))) + (deps ((package dune) (files_recursively_in test-cases/redirections))) (action (chdir test-cases/redirections @@ -412,7 +404,7 @@ (alias ((name scope-bug) - (deps ((package jbuilder) (files_recursively_in test-cases/scope-bug))) + (deps ((package dune) (files_recursively_in test-cases/scope-bug))) (action (chdir test-cases/scope-bug @@ -420,7 +412,7 @@ (alias ((name scope-ppx-bug) - (deps ((package jbuilder) (files_recursively_in test-cases/scope-ppx-bug))) + (deps ((package dune) (files_recursively_in test-cases/scope-ppx-bug))) (action (chdir test-cases/scope-ppx-bug @@ -428,7 +420,7 @@ (alias ((name select) - (deps ((package jbuilder) (files_recursively_in test-cases/select))) + (deps ((package dune) (files_recursively_in test-cases/select))) (action (chdir test-cases/select @@ -436,7 +428,7 @@ (alias ((name utop) - (deps ((package jbuilder) (files_recursively_in test-cases/utop))) + (deps ((package dune) (files_recursively_in test-cases/utop))) (action (chdir test-cases/utop diff --git a/test/blackbox-tests/test-cases/aliases/run.t b/test/blackbox-tests/test-cases/aliases/run.t index 1211d4d56ad..b249a3bbb63 100644 --- a/test/blackbox-tests/test-cases/aliases/run.t +++ b/test/blackbox-tests/test-cases/aliases/run.t @@ -1,22 +1,22 @@ - $ jbuilder clean --display short - $ jbuilder build --display short @just-in-src + $ dune clean --display short + $ dune build --display short @just-in-src running in src - $ jbuilder clean --display short - $ jbuilder build --display short @everywhere + $ dune clean --display short + $ dune build --display short @everywhere running in src/foo/bar running in src/foo/baz running in src - $ jbuilder clean --display short - $ jbuilder build --display short @x + $ dune clean --display short + $ dune build --display short @x running in src/foo/bar running in src/foo/baz running in src - $ jbuilder build --display short @plop + $ dune build --display short @plop From the command line: Error: Alias plop is empty. It is not defined in . or any of its descendants. [1] - $ jbuilder build --display short @truc/x + $ dune build --display short @truc/x From the command line: Error: Don't know about directory truc! [1] diff --git a/test/blackbox-tests/test-cases/c-stubs/run.t b/test/blackbox-tests/test-cases/c-stubs/run.t index bdf668e4e82..5dcbb41986c 100644 --- a/test/blackbox-tests/test-cases/c-stubs/run.t +++ b/test/blackbox-tests/test-cases/c-stubs/run.t @@ -1,4 +1,4 @@ - $ jbuilder exec ./qnativerun/run.exe --display short + $ dune exec ./qnativerun/run.exe --display short ocamldep qnativerun/run.ml.d ocamlc q/q_stub$ext_obj ocamlmklib q/dllq_stubs$ext_dll,q/libq_stubs$ext_lib @@ -11,4 +11,4 @@ ocamlopt qnativerun/.run.eobjs/run.{cmx,o} ocamlopt qnativerun/run.exe 42 -# $ jbuilder exec ./qbyterun/run.bc --display short +# $ dune exec ./qbyterun/run.bc --display short diff --git a/test/blackbox-tests/test-cases/configurator/c_test/jbuild b/test/blackbox-tests/test-cases/configurator/c_test/jbuild index 0f63b54a30c..422628bfc75 100644 --- a/test/blackbox-tests/test-cases/configurator/c_test/jbuild +++ b/test/blackbox-tests/test-cases/configurator/c_test/jbuild @@ -2,4 +2,4 @@ (executable ((name run) - (libraries (jbuilder.configurator)))) + (libraries (dune.configurator)))) diff --git a/test/blackbox-tests/test-cases/configurator/config/jbuild b/test/blackbox-tests/test-cases/configurator/config/jbuild index 0f63b54a30c..422628bfc75 100644 --- a/test/blackbox-tests/test-cases/configurator/config/jbuild +++ b/test/blackbox-tests/test-cases/configurator/config/jbuild @@ -2,4 +2,4 @@ (executable ((name run) - (libraries (jbuilder.configurator)))) + (libraries (dune.configurator)))) diff --git a/test/blackbox-tests/test-cases/configurator/import-define/jbuild b/test/blackbox-tests/test-cases/configurator/import-define/jbuild index 0f63b54a30c..422628bfc75 100644 --- a/test/blackbox-tests/test-cases/configurator/import-define/jbuild +++ b/test/blackbox-tests/test-cases/configurator/import-define/jbuild @@ -2,4 +2,4 @@ (executable ((name run) - (libraries (jbuilder.configurator)))) + (libraries (dune.configurator)))) diff --git a/test/blackbox-tests/test-cases/configurator/run.t b/test/blackbox-tests/test-cases/configurator/run.t index 3e29af3b883..533b38039b5 100644 --- a/test/blackbox-tests/test-cases/configurator/run.t +++ b/test/blackbox-tests/test-cases/configurator/run.t @@ -1,14 +1,14 @@ Show that config values are present - $ jbuilder exec config/run.exe + $ dune exec config/run.exe DUNE_CONFIGURATOR is present version is present We're able to compile C program sucessfully - $ jbuilder exec c_test/run.exe + $ dune exec c_test/run.exe Successfully compiled c program Importing #define's from code is successful - $ jbuilder exec import-define/run.exe + $ dune exec import-define/run.exe CAML_CONFIG_H=true Page_log=12 CONFIGURATOR_TESTING=foobar diff --git a/test/blackbox-tests/test-cases/copy_files/run.t b/test/blackbox-tests/test-cases/copy_files/run.t index feba60bcd8c..eb92ac921cc 100644 --- a/test/blackbox-tests/test-cases/copy_files/run.t +++ b/test/blackbox-tests/test-cases/copy_files/run.t @@ -1,4 +1,4 @@ - $ jbuilder build test.exe .merlin --display short --debug-dependency-path + $ dune build test.exe .merlin --display short --debug-dependency-path ocamllex lexers/lexer1.ml ocamldep lexer1.ml.d ocamldep test.ml.d @@ -13,6 +13,6 @@ ocamlc .test.eobjs/test.{cmi,cmo,cmt} ocamlopt .test.eobjs/test.{cmx,o} ocamlopt test.exe - $ jbuilder build @bar-source --display short + $ dune build @bar-source --display short #line 1 "include/bar.h" int foo () {return 42;} diff --git a/test/blackbox-tests/test-cases/depend-on-the-universe/run.t b/test/blackbox-tests/test-cases/depend-on-the-universe/run.t index 362ffdc53e5..720c0ab08b5 100644 --- a/test/blackbox-tests/test-cases/depend-on-the-universe/run.t +++ b/test/blackbox-tests/test-cases/depend-on-the-universe/run.t @@ -1,10 +1,10 @@ - $ jbuilder build @x + $ dune build @x Hello, world! - $ jbuilder build @x + $ dune build @x Hello, world! - $ jbuilder build @x + $ dune build @x Hello, world! - $ jbuilder build @x + $ dune build @x Hello, world! - $ jbuilder build @x + $ dune build @x Hello, world! diff --git a/test/blackbox-tests/test-cases/exclude-missing-module/run.t b/test/blackbox-tests/test-cases/exclude-missing-module/run.t index 1748c2435fb..900bbcae9f4 100644 --- a/test/blackbox-tests/test-cases/exclude-missing-module/run.t +++ b/test/blackbox-tests/test-cases/exclude-missing-module/run.t @@ -1,3 +1,3 @@ - $ jbuilder build --display short + $ dune build --display short File "jbuild", line 3, characters 24-28: Warning: Module Fake is excluded but it doesn't exist. diff --git a/test/blackbox-tests/test-cases/exec-cmd/run.t b/test/blackbox-tests/test-cases/exec-cmd/run.t index 04381a7c018..230a7552652 100644 --- a/test/blackbox-tests/test-cases/exec-cmd/run.t +++ b/test/blackbox-tests/test-cases/exec-cmd/run.t @@ -1,22 +1,22 @@ - $ jbuilder clean --display short - $ jbuilder exec --no-build ./foo.exe --display short + $ dune clean --display short + $ dune exec --no-build ./foo.exe --display short Error: Program "./foo.exe" isn't built yet you need to buid it first or remove the --no-build option. [1] - $ jbuilder exec ./foo.exe --display short + $ dune exec ./foo.exe --display short ocamldep foo.ml.d ocamlc .foo.eobjs/foo.{cmi,cmo,cmt} ocamlopt .foo.eobjs/foo.{cmx,o} ocamlopt foo.exe Foo - $ jbuilder exec --dev ./foo.exe --display short + $ dune exec --dev ./foo.exe --display short ocamlc .foo.eobjs/foo.{cmi,cmo,cmt} ocamlopt .foo.eobjs/foo.{cmx,o} ocamlopt foo.exe Foo - $ jbuilder exec dunetestbar --no-build --display short + $ dune exec dunetestbar --no-build --display short Error: Program "dunetestbar" isn't built yet you need to buid it first or remove the --no-build option. [1] - $ jbuilder exec dunetestbar --display short + $ dune exec dunetestbar --display short ocamldep bar.ml.d ocamlc .bar.eobjs/bar.{cmi,cmo,cmt} ocamlopt .bar.eobjs/bar.{cmx,o} diff --git a/test/blackbox-tests/test-cases/findlib/run.t b/test/blackbox-tests/test-cases/findlib/run.t index d8028be9e6d..8d6adaec77d 100644 --- a/test/blackbox-tests/test-cases/findlib/run.t +++ b/test/blackbox-tests/test-cases/findlib/run.t @@ -1,4 +1,4 @@ - $ jbuilder external-lib-deps @install + $ dune external-lib-deps @install These are the external library dependencies in the default context: - a - b @@ -6,8 +6,8 @@ Reproduction case for #484. The error should point to src/jbuild - $ jbuilder build @install + $ dune build @install File "src/jbuild", line 4, characters 16-17: Error: Library "a" not found. - Hint: try: jbuilder external-lib-deps --missing @install + Hint: try: dune external-lib-deps --missing @install [1] diff --git a/test/blackbox-tests/test-cases/force-test/run.t b/test/blackbox-tests/test-cases/force-test/run.t index 2da42648115..23530751bb0 100644 --- a/test/blackbox-tests/test-cases/force-test/run.t +++ b/test/blackbox-tests/test-cases/force-test/run.t @@ -1,12 +1,12 @@ - $ jbuilder clean --display short - $ jbuilder runtest --display short + $ dune clean --display short + $ dune runtest --display short ocamldep f.ml.d ocamlc .f.eobjs/f.{cmi,cmo,cmt} ocamlopt .f.eobjs/f.{cmx,o} ocamlopt f.exe f alias runtest Foo Bar - $ jbuilder runtest --display short - $ jbuilder runtest --force --display short + $ dune runtest --display short + $ dune runtest --force --display short f alias runtest Foo Bar diff --git a/test/blackbox-tests/test-cases/gen-opam-install-file/run.t b/test/blackbox-tests/test-cases/gen-opam-install-file/run.t index d2b1e354a2b..990fb4ad249 100644 --- a/test/blackbox-tests/test-cases/gen-opam-install-file/run.t +++ b/test/blackbox-tests/test-cases/gen-opam-install-file/run.t @@ -1,4 +1,4 @@ - $ jbuilder runtest --display short + $ dune runtest --display short ocamldep bar.ml.d ocamldep foo.ml.d ocamldep foo.mli.d diff --git a/test/blackbox-tests/test-cases/github20/run.t b/test/blackbox-tests/test-cases/github20/run.t index a409cea8823..bee70b53c36 100644 --- a/test/blackbox-tests/test-cases/github20/run.t +++ b/test/blackbox-tests/test-cases/github20/run.t @@ -1 +1 @@ - $ jbuilder build .merlin --display short + $ dune build .merlin --display short diff --git a/test/blackbox-tests/test-cases/github24/run.t b/test/blackbox-tests/test-cases/github24/run.t index 766b11ee60c..3ddf0a6fc21 100644 --- a/test/blackbox-tests/test-cases/github24/run.t +++ b/test/blackbox-tests/test-cases/github24/run.t @@ -1 +1 @@ - $ jbuilder build @install --display short --debug-dependency-path + $ dune build @install --display short --debug-dependency-path diff --git a/test/blackbox-tests/test-cases/github25/run.t b/test/blackbox-tests/test-cases/github25/run.t index bdab8e7a529..1da192cc177 100644 --- a/test/blackbox-tests/test-cases/github25/run.t +++ b/test/blackbox-tests/test-cases/github25/run.t @@ -6,19 +6,19 @@ problem. So jbuilder shouldn't crash because of "plop.ca-marche-pas" We need ocamlfind to run this test - $ jbuilder build @install --display short --only hello + $ dune build @install --display short --only hello ocamlc root/.hello.objs/hello.{cmi,cmo,cmt} ocamlopt root/.hello.objs/hello.{cmx,o} ocamlopt root/hello.{a,cmxa} ocamlopt root/hello.cmxs ocamlc root/hello.cma - $ jbuilder build @install --display short --only pas-de-bol 2>&1 | sed 's/[^ "]*findlib-packages/.../' + $ dune build @install --display short --only pas-de-bol 2>&1 | sed 's/[^ "]*findlib-packages/.../' ocamldep root/a.ml.d File ".../plop/META", line 1, characters 0-0: Error: Library "une-lib-qui-nexiste-pas" not found. -> required by library "plop.ca-marche-pas" in .../plop - Hint: try: jbuilder external-lib-deps --missing --only-packages pas-de-bol @install + Hint: try: dune external-lib-deps --missing --only-packages pas-de-bol @install ocamldep root/b.ml.d ocamlc root/.pas_de_bol.objs/pas_de_bol.{cmi,cmo,cmt} ocamlopt root/.pas_de_bol.objs/pas_de_bol.{cmx,o} diff --git a/test/blackbox-tests/test-cases/github534/run.t b/test/blackbox-tests/test-cases/github534/run.t index 6e65f624dbb..4de9911bbf5 100644 --- a/test/blackbox-tests/test-cases/github534/run.t +++ b/test/blackbox-tests/test-cases/github534/run.t @@ -1,4 +1,4 @@ - $ jbuilder exec ./main.exe --display short + $ dune exec ./main.exe --display short echo main.ml ocamldep main.ml.d ocamlc .main.eobjs/main.{cmi,cmo,cmt} diff --git a/test/blackbox-tests/test-cases/github568/run.t b/test/blackbox-tests/test-cases/github568/run.t index dae6e266f9f..6fc6e849020 100644 --- a/test/blackbox-tests/test-cases/github568/run.t +++ b/test/blackbox-tests/test-cases/github568/run.t @@ -1,4 +1,4 @@ - $ jbuilder runtest --display short -p lib1 --debug-dependency-path + $ dune runtest --display short -p lib1 --debug-dependency-path ocamldep test1.ml.d ocamldep lib1.ml.d ocamlc .lib1.objs/lib1.{cmi,cmo,cmt} diff --git a/test/blackbox-tests/test-cases/github597/run.t b/test/blackbox-tests/test-cases/github597/run.t index b9f40b7a65a..786edd87e11 100644 --- a/test/blackbox-tests/test-cases/github597/run.t +++ b/test/blackbox-tests/test-cases/github597/run.t @@ -1 +1 @@ - $ jbuilder build b/b.cma + $ dune build b/b.cma diff --git a/test/blackbox-tests/test-cases/github644/run.t b/test/blackbox-tests/test-cases/github644/run.t index d5bf265dab9..ac881f2d567 100644 --- a/test/blackbox-tests/test-cases/github644/run.t +++ b/test/blackbox-tests/test-cases/github644/run.t @@ -1,17 +1,17 @@ - $ jbuilder runtest + $ dune runtest File "jbuild", line 4, characters 20-42: Error: Library "ppx_that_doesn't_exist" not found. - Hint: try: jbuilder external-lib-deps --missing @runtest + Hint: try: dune external-lib-deps --missing @runtest [1] These should print something: - $ jbuilder external-lib-deps --display quiet @runtest + $ dune external-lib-deps --display quiet @runtest These are the external library dependencies in the default context: - ocaml-migrate-parsetree.driver-main - ppx_that_doesn't_exist - $ jbuilder external-lib-deps --display quiet --missing @runtest + $ dune external-lib-deps --display quiet --missing @runtest Error: The following libraries are missing in the default context: - ppx_that_doesn't_exist Hint: try: opam install ppx_that_doesn't_exist diff --git a/test/blackbox-tests/test-cases/github660/run.t b/test/blackbox-tests/test-cases/github660/run.t index 2b37f52ef7f..8e5b0f64851 100644 --- a/test/blackbox-tests/test-cases/github660/run.t +++ b/test/blackbox-tests/test-cases/github660/run.t @@ -1,20 +1,20 @@ When there are explicit interfaces, modules must be rebuilt. - $ jbuilder runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering + $ dune runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering main alias runtest hello $ echo 'let x = 1' >> explicit-interfaces/lib_sub.ml - $ jbuilder runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt + $ dune runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt main alias runtest hello When there are no interfaces, the situation is the same, but it is not possible to rely on these. - $ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering + $ dune runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering main alias runtest hello $ echo 'let x = 1' >> no-interfaces/lib_sub.ml - $ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt + $ dune runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt main alias runtest hello diff --git a/test/blackbox-tests/test-cases/github717-odoc-index/run.t b/test/blackbox-tests/test-cases/github717-odoc-index/run.t index bc867e11647..0ad4da8bfb5 100644 --- a/test/blackbox-tests/test-cases/github717-odoc-index/run.t +++ b/test/blackbox-tests/test-cases/github717-odoc-index/run.t @@ -1 +1 @@ - $ jbuilder build @doc + $ dune build @doc diff --git a/test/blackbox-tests/test-cases/include-loop/run.t b/test/blackbox-tests/test-cases/include-loop/run.t index b8e089d5f64..28650d8484b 100644 --- a/test/blackbox-tests/test-cases/include-loop/run.t +++ b/test/blackbox-tests/test-cases/include-loop/run.t @@ -1,4 +1,4 @@ - $ jbuilder build --display short + $ dune build --display short File "jbuild", line 2, characters 0-15: Error: Recursive inclusion of jbuild files detected: File a.inc is included from c.inc:2 diff --git a/test/blackbox-tests/test-cases/inline_tests/run.t b/test/blackbox-tests/test-cases/inline_tests/run.t index 6b43987f7f9..4e2e7e450ba 100644 --- a/test/blackbox-tests/test-cases/inline_tests/run.t +++ b/test/blackbox-tests/test-cases/inline_tests/run.t @@ -4,23 +4,23 @@ Fatal error: exception File "simple/.foo_simple.inline-tests/run.ml", line 1, characters 10-16: Assertion failed [1] - $ jbuilder runtest missing-backend + $ dune runtest missing-backend File "missing-backend/jbuild", line 3, characters 2-16: Error: No inline tests backend found. [1] - $ jbuilder runtest too-many-backends + $ dune runtest too-many-backends File "too-many-backends/jbuild", line 17, characters 2-16: Error: Too many independant inline tests backends found: - "backend_tmb1" in _build/default/too-many-backends - "backend_tmb2" in _build/default/too-many-backends [1] - $ jbuilder runtest many-backends-choose + $ dune runtest many-backends-choose run alias many-backends-choose/runtest backend_mbc1 - $ jbuilder runtest dune-file + $ dune runtest dune-file (dune 1 ((inline_tests.backend diff --git a/test/blackbox-tests/test-cases/installable-dup-private-libs/run.t b/test/blackbox-tests/test-cases/installable-dup-private-libs/run.t index 623b3e481be..1f836ebbfb7 100644 --- a/test/blackbox-tests/test-cases/installable-dup-private-libs/run.t +++ b/test/blackbox-tests/test-cases/installable-dup-private-libs/run.t @@ -1,4 +1,4 @@ - $ jbuilder build @install --display short + $ dune build @install --display short ocamldep a1/a.ml.d ocamlc a1/.a.objs/a.{cmi,cmo,cmt} ocamlopt a1/.a.objs/a.{cmx,o} diff --git a/test/blackbox-tests/test-cases/intf-only/run.t b/test/blackbox-tests/test-cases/intf-only/run.t index b52067c2518..3d3a3c1f3a6 100644 --- a/test/blackbox-tests/test-cases/intf-only/run.t +++ b/test/blackbox-tests/test-cases/intf-only/run.t @@ -1,6 +1,6 @@ Successes: - $ jbuilder build --display short --root foo --debug-dep 2>&1 | grep -v Entering + $ dune build --display short --root foo --debug-dep 2>&1 | grep -v Entering ocamldep test/bar.ml.d ocamldep foo.ml.d ocamlc .foo.objs/foo__.{cmi,cmo,cmt} @@ -20,7 +20,7 @@ Successes: Errors: - $ jbuilder build --display short --root a foo.cma 2>&1 | grep -v Entering + $ dune build --display short --root a foo.cma 2>&1 | grep -v Entering File "jbuild", line 2, characters 1-13: Warning: Some modules don't have an implementation. You need to add the following field to this stanza: @@ -30,16 +30,16 @@ Errors: This will become an error in the future. ocamlc .foo.objs/foo.{cmi,cmo,cmt} ocamlc foo.cma - $ jbuilder build --display short --root b foo.cma 2>&1 | grep -v Entering + $ dune build --display short --root b foo.cma 2>&1 | grep -v Entering File "jbuild", line 3, characters 34-37: Warning: The following modules must be listed here as they don't have an implementation: - y This will become an error in the future. ocamlc .foo.objs/foo.{cmi,cmo,cmt} ocamlc foo.cma - $ jbuilder build --display short --root c foo.cma 2>&1 | grep -v Entering + $ dune build --display short --root c foo.cma 2>&1 | grep -v Entering File "jbuild", line 3, characters 35-36: Error: Module X doesn't exist. - $ jbuilder build --display short --root d foo.cma 2>&1 | grep -v Entering + $ dune build --display short --root d foo.cma 2>&1 | grep -v Entering File "jbuild", line 3, characters 35-36: Error: Module X has an implementation, it cannot be listed here diff --git a/test/blackbox-tests/test-cases/js_of_ocaml/run.t b/test/blackbox-tests/test-cases/js_of_ocaml/run.t index d0c442f88a4..56caadd96e6 100644 --- a/test/blackbox-tests/test-cases/js_of_ocaml/run.t +++ b/test/blackbox-tests/test-cases/js_of_ocaml/run.t @@ -1,4 +1,4 @@ - $ jbuilder build --display short --dev bin/technologic.bc.js @install lib/x.cma.js lib/x__Y.cmo.js bin/z.cmo.js + $ dune build --display short --dev bin/technologic.bc.js @install lib/x.cma.js lib/x__Y.cmo.js bin/z.cmo.js ocamlc lib/stubs$ext_obj ocamlmklib lib/dllx_stubs$ext_dll,lib/libx_stubs$ext_lib ocamlopt .ppx/js_of_ocaml-ppx/ppx.exe @@ -34,7 +34,7 @@ use it break it fix it - $ jbuilder build --display short bin/technologic.bc.js @install + $ dune build --display short bin/technologic.bc.js @install ocamlc lib/.x.objs/x__.{cmi,cmo,cmt} ocamlc lib/.x.objs/x__Y.{cmi,cmo,cmt} ocamlc lib/.x.objs/x.{cmi,cmo,cmt} diff --git a/test/blackbox-tests/test-cases/lib-available/run.t b/test/blackbox-tests/test-cases/lib-available/run.t index a38b9fad41b..b8e91df63f5 100644 --- a/test/blackbox-tests/test-cases/lib-available/run.t +++ b/test/blackbox-tests/test-cases/lib-available/run.t @@ -1,3 +1,3 @@ - $ jbuilder build @runtest --display short --debug-dependency-path 2>&1 | sed "s/ cmd / sh /" + $ dune build @runtest --display short --debug-dependency-path 2>&1 | sed "s/ cmd / sh /" sh alias runtest sh alias runtest diff --git a/test/blackbox-tests/test-cases/loop/run.t b/test/blackbox-tests/test-cases/loop/run.t index 0d568fe781a..5569a88e70a 100644 --- a/test/blackbox-tests/test-cases/loop/run.t +++ b/test/blackbox-tests/test-cases/loop/run.t @@ -1,4 +1,4 @@ - $ jbuilder build --display short a + $ dune build --display short a true x true y Dependency cycle between the following files: @@ -11,14 +11,14 @@ This second example is slightly more complicated as we request result1 but the cycle doesn't involve result1. We must make sure the output does show a cycle. - $ jbuilder build --display short result1 + $ dune build --display short result1 Dependency cycle between the following files: _build/default/result2 --> _build/default/input --> _build/default/result2 [1] - $ jbuilder build --display short result1 --debug-dependency-path + $ dune build --display short result1 --debug-dependency-path Dependency cycle between the following files: _build/default/result2 --> _build/default/input diff --git a/test/blackbox-tests/test-cases/menhir/run.t b/test/blackbox-tests/test-cases/menhir/run.t index 8dc89d999d1..83912cf3172 100644 --- a/test/blackbox-tests/test-cases/menhir/run.t +++ b/test/blackbox-tests/test-cases/menhir/run.t @@ -1,4 +1,4 @@ - $ jbuilder build src/test.exe --display short --debug-dependency-path + $ dune build src/test.exe --display short --debug-dependency-path ocamllex src/lexer1.ml ocamldep src/lexer1.ml.d ocamllex src/lexer2.ml diff --git a/test/blackbox-tests/test-cases/merlin-tests/run.t b/test/blackbox-tests/test-cases/merlin-tests/run.t index ac15339788c..a65734540aa 100644 --- a/test/blackbox-tests/test-cases/merlin-tests/run.t +++ b/test/blackbox-tests/test-cases/merlin-tests/run.t @@ -1,4 +1,4 @@ - $ jbuilder build @print-merlins --display short + $ dune build @print-merlins --display short ocamldep sanitize-dot-merlin/sanitize_dot_merlin.ml.d ocamlc sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmi,cmo,cmt} ocamlopt sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmx,o} diff --git a/test/blackbox-tests/test-cases/meta-gen/run.t b/test/blackbox-tests/test-cases/meta-gen/run.t index a423c5ca30f..ba2558481be 100644 --- a/test/blackbox-tests/test-cases/meta-gen/run.t +++ b/test/blackbox-tests/test-cases/meta-gen/run.t @@ -1,4 +1,4 @@ - $ jbuilder runtest --force --display short + $ dune runtest --force --display short description = "contains \"quotes\"" requires = "bytes" archive(byte) = "foobar.cma" diff --git a/test/blackbox-tests/test-cases/misc/run.t b/test/blackbox-tests/test-cases/misc/run.t index cd9d83f3d40..0dcbe42ec64 100644 --- a/test/blackbox-tests/test-cases/misc/run.t +++ b/test/blackbox-tests/test-cases/misc/run.t @@ -1,4 +1,4 @@ - $ jbuilder runtest --display short + $ dune runtest --display short File "jbuild", line 65, characters 21-44: Warning: Directory dir-that-doesnt-exist doesn't exist. diff alias runtest diff --git a/test/blackbox-tests/test-cases/multiple-private-libs/run.t b/test/blackbox-tests/test-cases/multiple-private-libs/run.t index 3ecc4bf4c41..d4ca816648a 100644 --- a/test/blackbox-tests/test-cases/multiple-private-libs/run.t +++ b/test/blackbox-tests/test-cases/multiple-private-libs/run.t @@ -1,6 +1,6 @@ This test checks that there is no clash when two private libraries have the same name - $ jbuilder build --display short @doc-private + $ dune build --display short @doc-private ocamldep a/test.ml.d ocamlc a/.test.objs/test.{cmi,cmo,cmt} odoc _doc/_odoc/lib/test@a/test.odoc diff --git a/test/blackbox-tests/test-cases/null-dep/run.t b/test/blackbox-tests/test-cases/null-dep/run.t index c3b3574c608..41f62eea89b 100644 --- a/test/blackbox-tests/test-cases/null-dep/run.t +++ b/test/blackbox-tests/test-cases/null-dep/run.t @@ -1 +1 @@ - $ jbuilder runtest --debug-dependency-path + $ dune runtest --debug-dependency-path diff --git a/test/blackbox-tests/test-cases/ocaml-syntax/run.t b/test/blackbox-tests/test-cases/ocaml-syntax/run.t index b9c7f7e5b71..15f1ec1cea4 100644 --- a/test/blackbox-tests/test-cases/ocaml-syntax/run.t +++ b/test/blackbox-tests/test-cases/ocaml-syntax/run.t @@ -1,2 +1,2 @@ - $ jbuilder runtest --force --display short + $ dune runtest --force --display short ocaml syntax diff --git a/test/blackbox-tests/test-cases/ocamldep-multi-stanzas/run.t b/test/blackbox-tests/test-cases/ocamldep-multi-stanzas/run.t index bd4bdc97ea0..0bd5be8a6af 100644 --- a/test/blackbox-tests/test-cases/ocamldep-multi-stanzas/run.t +++ b/test/blackbox-tests/test-cases/ocamldep-multi-stanzas/run.t @@ -1,4 +1,4 @@ - $ jbuilder exec ./test.exe --debug-dep --display short + $ dune exec ./test.exe --debug-dep --display short File "jbuild", line 1, characters 0-0: Warning: Module "Lib" is used in several stanzas: - jbuild:8 @@ -13,7 +13,7 @@ - [1] - $ jbuilder build src/a.cma --debug-dep --display short + $ dune build src/a.cma --debug-dep --display short File "src/jbuild", line 1, characters 0-0: Warning: Module "X" is used in several stanzas: - src/jbuild:4 diff --git a/test/blackbox-tests/test-cases/odoc-unique-mlds/run.t b/test/blackbox-tests/test-cases/odoc-unique-mlds/run.t index b677338b14f..65ff14bc492 100644 --- a/test/blackbox-tests/test-cases/odoc-unique-mlds/run.t +++ b/test/blackbox-tests/test-cases/odoc-unique-mlds/run.t @@ -1,5 +1,5 @@ Duplicate mld's in the same scope - $ jbuilder build @doc --display short --root ./same-scope 2>&1 | grep -v Entering + $ dune build @doc --display short --root ./same-scope 2>&1 | grep -v Entering odoc _doc/_html/odoc.css ocamlc lib1/.root_lib1.objs/root_lib1.{cmi,cmo,cmt} odoc _doc/_odoc/lib/root.lib1/root_lib1.odoc @@ -12,7 +12,7 @@ Duplicate mld's in the same scope Duplicate mld's in different scope $ rm -rf diff-scope/_build - $ jbuilder build @doc --display short --root ./diff-scope 2>&1 | grep -v Entering + $ dune build @doc --display short --root ./diff-scope 2>&1 | grep -v Entering odoc _doc/_html/odoc.css ocamlc scope1/.scope1.objs/scope1.{cmi,cmo,cmt} odoc _doc/_odoc/lib/scope1/scope1.odoc diff --git a/test/blackbox-tests/test-cases/odoc/run.t b/test/blackbox-tests/test-cases/odoc/run.t index 5d4d79cfcda..32a544307d0 100644 --- a/test/blackbox-tests/test-cases/odoc/run.t +++ b/test/blackbox-tests/test-cases/odoc/run.t @@ -1,4 +1,4 @@ - $ jbuilder build @doc --display short + $ dune build @doc --display short ocamldep bar.ml.d ocamlc .bar.objs/bar.{cmi,cmo,cmt} odoc _doc/_odoc/lib/bar/bar.odoc @@ -20,7 +20,7 @@ odoc _doc/_html/foo/index.html odoc _doc/_html/foo/Foo_byte/.jbuilder-keep,_doc/_html/foo/Foo_byte/index.html odoc _doc/_html/foo/Foo2/.jbuilder-keep,_doc/_html/foo/Foo2/index.html - $ jbuilder runtest --display short + $ dune runtest --display short @@ -40,7 +40,7 @@ - $ jbuilder build @foo-mld --display short + $ dune build @foo-mld --display short {1 Library foo} This library exposes the following toplevel modules: {!modules:Foo Foo2}. @@ -48,7 +48,7 @@ The entry point of this library is the module: {!module-Foo_byte}. - $ jbuilder build @bar-mld --display short + $ dune build @bar-mld --display short {1 Library bar} The entry point of this library is the module: {!module-Bar}. diff --git a/test/blackbox-tests/test-cases/output-obj/run.t b/test/blackbox-tests/test-cases/output-obj/run.t index b93484d7e26..6a1dc8337d2 100644 --- a/test/blackbox-tests/test-cases/output-obj/run.t +++ b/test/blackbox-tests/test-cases/output-obj/run.t @@ -1,4 +1,4 @@ - $ jbuilder build --display short @all + $ dune build --display short @all ocamldep test.ml.d ocamlc .test.eobjs/test.{cmi,cmo,cmt} ocamlc test.bc.o @@ -11,7 +11,7 @@ ocamlopt test.exe ocamlopt test$ext_dll - $ jbuilder build @runtest + $ dune build @runtest static alias runtest OK: ./static.bc dynamic alias runtest diff --git a/test/blackbox-tests/test-cases/package-dep/run.t b/test/blackbox-tests/test-cases/package-dep/run.t index c7462fa2861..10e5e34be6b 100644 --- a/test/blackbox-tests/test-cases/package-dep/run.t +++ b/test/blackbox-tests/test-cases/package-dep/run.t @@ -1,4 +1,4 @@ - $ jbuilder runtest --display short + $ dune runtest --display short ocamldep bar.ml.d ocamldep foo.ml.d ocamlc .foo.objs/foo.{cmi,cmo,cmt} diff --git a/test/blackbox-tests/test-cases/ppx-rewriter/run.t b/test/blackbox-tests/test-cases/ppx-rewriter/run.t index 465a6879d1c..f5fbe1cea8f 100644 --- a/test/blackbox-tests/test-cases/ppx-rewriter/run.t +++ b/test/blackbox-tests/test-cases/ppx-rewriter/run.t @@ -1,4 +1,4 @@ - $ jbuilder build ./w_omp_driver.exe --display short + $ dune build ./w_omp_driver.exe --display short ocamldep ppx/fooppx.ml.d ocamlc ppx/.fooppx.objs/fooppx.{cmi,cmo,cmt} ocamlopt ppx/.fooppx.objs/fooppx.{cmx,o} @@ -9,7 +9,7 @@ ocamlc .w_omp_driver.eobjs/w_omp_driver.{cmi,cmo,cmt} ocamlopt .w_omp_driver.eobjs/w_omp_driver.{cmx,o} ocamlopt w_omp_driver.exe - $ jbuilder build ./w_ppx_driver.exe --display short + $ dune build ./w_ppx_driver.exe --display short ocamlopt .ppx/ppx_driver.runner/ppx.exe ppx w_ppx_driver.pp.ml ocamldep w_ppx_driver.pp.ml.d @@ -17,4 +17,4 @@ ocamlopt .w_ppx_driver.eobjs/w_ppx_driver.{cmx,o} ocamlopt w_ppx_driver.exe This test is broken because ppx_driver doesn't support migrate custom arguments -# $ jbuilder build ./w_ppx_driver_flags.exe --display short +# $ dune build ./w_ppx_driver_flags.exe --display short diff --git a/test/blackbox-tests/test-cases/private-public-overlap/run.t b/test/blackbox-tests/test-cases/private-public-overlap/run.t index 5c74df5db44..c3aa05d40d1 100644 --- a/test/blackbox-tests/test-cases/private-public-overlap/run.t +++ b/test/blackbox-tests/test-cases/private-public-overlap/run.t @@ -1,13 +1,13 @@ public libraries may not have private dependencies - $ jbuilder build --display short --root private-dep 2>&1 | grep -v Entering + $ dune build --display short --root private-dep 2>&1 | grep -v Entering File "jbuild", line 10, characters 14-24: Error: Library "privatelib" is private, it cannot be a dependency of a public library. You need to give "privatelib" a public name. ocamldep publiclib.ml.d On the other hand, public libraries may have private preprocessors - $ jbuilder build --display short --root private-rewriter 2>&1 | grep -v Entering + $ dune build --display short --root private-rewriter 2>&1 | grep -v Entering ocamlc .ppx_internal.objs/ppx_internal.{cmi,cmo,cmt} ocamlopt .ppx_internal.objs/ppx_internal.{cmx,o} ocamlopt ppx_internal.{a,cmxa} @@ -21,7 +21,7 @@ On the other hand, public libraries may have private preprocessors ocamlc mylib.cma Unless they introduce private runtime dependencies: - $ jbuilder build --display short --root private-runtime-deps 2>&1 | grep -v Entering + $ dune build --display short --root private-runtime-deps 2>&1 | grep -v Entering File "jbuild", line 16, characters 20-31: Error: Library "private_runtime_dep" is private, it cannot be a dependency of a public library. You need to give "private_runtime_dep" a public name. @@ -33,12 +33,12 @@ Unless they introduce private runtime dependencies: ocamldep mylib.pp.ml.d However, public binaries may accept private dependencies - $ jbuilder build --display short --root exes 2>&1 | grep -v Entering + $ dune build --display short --root exes 2>&1 | grep -v Entering ocamldep publicbin.ml.d ocamlc .publicbin.eobjs/publicbin.{cmi,cmo,cmt} ocamlopt .publicbin.eobjs/publicbin.{cmx,o} ocamlopt publicbin.exe Private dependencies shouldn't make the library optional - $ jbuilder build --display short --root optional 2>&1 | grep -v Entering + $ dune build --display short --root optional 2>&1 | grep -v Entering [1] diff --git a/test/blackbox-tests/test-cases/promote/run.t b/test/blackbox-tests/test-cases/promote/run.t index abf6c6b08e1..3564d891427 100644 --- a/test/blackbox-tests/test-cases/promote/run.t +++ b/test/blackbox-tests/test-cases/promote/run.t @@ -1,30 +1,30 @@ $ printf titi > x - $ jbuilder build --display short --diff-command false @blah 2>&1 | sed 's/.*false.*/DIFF/' + $ dune build --display short --diff-command false @blah 2>&1 | sed 's/.*false.*/DIFF/' sh (internal) (exit 1) DIFF $ cat x titi - $ jbuilder promote --display short + $ dune promote --display short Promoting _build/default/x.gen to x. $ cat x toto - $ jbuilder build --display short --diff-command false @blah + $ dune build --display short --diff-command false @blah $ cat x toto Otherwise this test fails on OSX - $ jbuilder clean --display short + $ dune clean --display short $ printf titi > x - $ jbuilder build --display short --diff-command false @blah --auto-promote 2>&1 | sed 's/.*false.*/DIFF/' + $ dune build --display short --diff-command false @blah --auto-promote 2>&1 | sed 's/.*false.*/DIFF/' sh (internal) (exit 1) DIFF Promoting _build/default/x.gen to x. $ cat x toto - $ jbuilder build --display short --diff-command false @blah + $ dune build --display short --diff-command false @blah $ cat x toto diff --git a/test/blackbox-tests/test-cases/quoting/run.t b/test/blackbox-tests/test-cases/quoting/run.t index ade020b2844..4116104902f 100644 --- a/test/blackbox-tests/test-cases/quoting/run.t +++ b/test/blackbox-tests/test-cases/quoting/run.t @@ -1,7 +1,7 @@ This behavior is surprising, we should get an error about the fact that ${@} is not quoted and doesn't contain exactly 1 element - $ jbuilder build x + $ dune build x Error: Rule failed to generate the following targets: - x - y diff --git a/test/blackbox-tests/test-cases/reason/run.t b/test/blackbox-tests/test-cases/reason/run.t index 7f8815f3366..29a914478b7 100644 --- a/test/blackbox-tests/test-cases/reason/run.t +++ b/test/blackbox-tests/test-cases/reason/run.t @@ -1,4 +1,4 @@ - $ jbuilder build @runtest @install-file --display short + $ dune build @runtest @install-file --display short refmt bar.re.ml ocamldep pp/reasononlypp.depends.ocamldep-output ocamldep ppx/reasonppx.depends.ocamldep-output diff --git a/test/blackbox-tests/test-cases/redirections/run.t b/test/blackbox-tests/test-cases/redirections/run.t index 8e655100ab0..8df19d09eed 100644 --- a/test/blackbox-tests/test-cases/redirections/run.t +++ b/test/blackbox-tests/test-cases/redirections/run.t @@ -1,4 +1,4 @@ - $ jbuilder runtest --display short 2>&1 | sed "s/ cmd / sh /" + $ dune runtest --display short 2>&1 | sed "s/ cmd / sh /" sh stderr,stdout sh stderr,stdout diff alias runtest diff --git a/test/blackbox-tests/test-cases/scope-bug/run.t b/test/blackbox-tests/test-cases/scope-bug/run.t index 29aab26dd2b..cff4674d169 100644 --- a/test/blackbox-tests/test-cases/scope-bug/run.t +++ b/test/blackbox-tests/test-cases/scope-bug/run.t @@ -1,4 +1,4 @@ - $ jbuilder build --display short @install + $ dune build --display short @install ocamldep alib/alib.ml.d ocamldep alib/main.ml.d ocamldep blib/blib.ml.d diff --git a/test/blackbox-tests/test-cases/scope-ppx-bug/run.t b/test/blackbox-tests/test-cases/scope-ppx-bug/run.t index ef83f91c59b..7920c5d42aa 100644 --- a/test/blackbox-tests/test-cases/scope-ppx-bug/run.t +++ b/test/blackbox-tests/test-cases/scope-ppx-bug/run.t @@ -1,4 +1,4 @@ - $ jbuilder build --display short @install --debug-dep + $ dune build --display short @install --debug-dep ocamlc a/ppx/.a.objs/a.{cmi,cmo,cmt} ocamlopt a/ppx/.a.objs/a.{cmx,o} ocamlopt a/ppx/a.{a,cmxa} diff --git a/test/blackbox-tests/test-cases/select/run.t b/test/blackbox-tests/test-cases/select/run.t index 379b874b7cc..3d03d99b241 100644 --- a/test/blackbox-tests/test-cases/select/run.t +++ b/test/blackbox-tests/test-cases/select/run.t @@ -1,4 +1,4 @@ - $ jbuilder runtest --display short + $ dune runtest --display short ocamldep bar.ml.d ocamldep bar_no_unix.ml.d ocamldep bar_unix.ml.d diff --git a/test/blackbox-tests/test-cases/utop/run.t b/test/blackbox-tests/test-cases/utop/run.t index e859918b44f..118c19b5439 100644 --- a/test/blackbox-tests/test-cases/utop/run.t +++ b/test/blackbox-tests/test-cases/utop/run.t @@ -1,4 +1,4 @@ - $ jbuilder utop --display short forutop -- init_forutop.ml + $ dune utop --display short forutop -- init_forutop.ml ocamldep forutop/.utop/utop.ml.d ocamldep forutop/forutop.ml.d ocamlc forutop/.forutop.objs/forutop.{cmi,cmo,cmt} diff --git a/test/unit-tests/action.mlt b/test/unit-tests/action.mlt index a4a28804c8f..45ba02a76b3 100644 --- a/test/unit-tests/action.mlt +++ b/test/unit-tests/action.mlt @@ -2,7 +2,7 @@ #warnings "-40";; -open Jbuilder;; +open Dune;; open Import;; open Action.Infer.Outcome;; @@ -12,8 +12,8 @@ let infer (a : Action.t) = (List.map (Path.Set.to_list x.deps) ~f:Path.to_string, List.map (Path.Set.to_list x.targets) ~f:Path.to_string) [%%expect{| -val p : ?error_loc:Usexp.Loc.t -> string -> Jbuilder.Import.Path.t = -val infer : Jbuilder.Action.t -> string list * string list = +val p : ?error_loc:Usexp.Loc.t -> string -> Dune.Import.Path.t = +val infer : Dune.Action.t -> string list * string list = |}] infer (Copy (p "a", p "b"));; diff --git a/test/unit-tests/expect_test.mll b/test/unit-tests/expect_test.mll index 51dec32eaf5..806ca671e64 100644 --- a/test/unit-tests/expect_test.mll +++ b/test/unit-tests/expect_test.mll @@ -45,7 +45,7 @@ let main () = Toploop.initialize_toplevel_env (); List.iter [ "src/stdune/.stdune.objs" - ; "src/.jbuilder.objs" + ; "src/.dune.objs" ] ~f:Topdirs.dir_directory; diff --git a/test/unit-tests/filename.mlt b/test/unit-tests/filename.mlt index 2c53ea8631d..96f8b9ec1bf 100644 --- a/test/unit-tests/filename.mlt +++ b/test/unit-tests/filename.mlt @@ -2,7 +2,7 @@ #warnings "-40";; -open Jbuilder;; +open Dune;; open Import;; Filename.extension "toto.titi";; diff --git a/test/unit-tests/import_dot_map.mlt b/test/unit-tests/import_dot_map.mlt index a82fc6d8758..1f2f70a6878 100644 --- a/test/unit-tests/import_dot_map.mlt +++ b/test/unit-tests/import_dot_map.mlt @@ -2,7 +2,7 @@ #warnings "-40";; -open Jbuilder;; +open Dune;; open Import;; (* Check that [of_alist_multi] groups elements in the right order *) @@ -15,6 +15,6 @@ String.Map.of_list_multi ] |> String.Map.to_list;; [%%expect{| -- : (Jbuilder.Import.String.Map.key * int list) list = +- : (Dune.Import.String.Map.key * int list) list = [("a", [1; 2; 3]); ("b", [1; 2])] |}] diff --git a/test/unit-tests/jbuild b/test/unit-tests/jbuild index eae5a2813b6..9764b1c4b6e 100644 --- a/test/unit-tests/jbuild +++ b/test/unit-tests/jbuild @@ -5,7 +5,7 @@ (modules (expect_test)) (link_flags (-linkall)) (modes (byte)) - (libraries (unix jbuilder compiler-libs.toplevel test_common)))) + (libraries (unix dune compiler-libs.toplevel test_common)))) (ocamllex (expect_test)) @@ -21,7 +21,7 @@ (alias ((name runtest) (deps (tests.mlt - (glob_files ${SCOPE_ROOT}/src/.jbuilder.objs/*.cmi) + (glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi) (glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi) (files_recursively_in toolchain.d) (files_recursively_in findlib-db))) @@ -33,7 +33,7 @@ (alias ((name runtest) (deps (filename.mlt - (glob_files ${SCOPE_ROOT}/src/.jbuilder.objs/*.cmi) + (glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi) (glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))) (action (chdir ${SCOPE_ROOT} (progn @@ -43,7 +43,7 @@ (alias ((name runtest) (deps (import_dot_map.mlt - (glob_files ${SCOPE_ROOT}/src/.jbuilder.objs/*.cmi) + (glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi) (glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))) (action (chdir ${SCOPE_ROOT} (progn @@ -53,7 +53,7 @@ (alias ((name runtest) (deps (action.mlt - (glob_files ${SCOPE_ROOT}/src/.jbuilder.objs/*.cmi) + (glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi) (glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))) (action (chdir ${SCOPE_ROOT} (progn @@ -63,7 +63,7 @@ (alias ((name runtest) (deps (path.mlt - (glob_files ${SCOPE_ROOT}/src/.jbuilder.objs/*.cmi) + (glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi) (glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))) (action (chdir ${SCOPE_ROOT} (progn diff --git a/test/unit-tests/tests.mlt b/test/unit-tests/tests.mlt index c3fafb4e68a..af422c8bd45 100644 --- a/test/unit-tests/tests.mlt +++ b/test/unit-tests/tests.mlt @@ -2,7 +2,7 @@ #warnings "-40";; -open Jbuilder +open Dune open Import let print_pkg ppf pkg = @@ -13,8 +13,7 @@ let print_pkg ppf pkg = #install_printer String_map.pp;; [%%expect{| -val print_pkg : Format.formatter -> Jbuilder.Findlib.Package.t -> unit = - +val print_pkg : Format.formatter -> Dune.Findlib.Package.t -> unit = |}] let findlib = @@ -25,7 +24,7 @@ let findlib = ;; [%%expect{| -val findlib : Jbuilder.Findlib.t = +val findlib : Dune.Findlib.t = |}] let pkg = @@ -34,7 +33,7 @@ let pkg = | Error _ -> assert false;; [%%expect{| -val pkg : Jbuilder.Findlib.Package.t = +val pkg : Dune.Findlib.Package.t = |}] (* "foo" should depend on "baz" *) @@ -56,7 +55,7 @@ let meta = |> Meta.load ~name:"foo" [%%expect{| -val meta : Jbuilder.Meta.Simplified.t = +val meta : Dune.Meta.Simplified.t = { name = "foo" ; vars = (requires = @@ -85,7 +84,7 @@ let conf = ~toolchain:"tlc" ~context:"" [%%expect{| -val conf : Jbuilder.Findlib.Config.t = +val conf : Dune.Findlib.Config.t = { vars = [ (FOO_BAR, { set_rules = [ { preds_required = [ "tlc"; "env" ] @@ -104,11 +103,11 @@ let env_pp fmt env = Sexp.pp fmt (Env.sexp_of_t env);; #install_printer env_pp;; [%%expect{| -val env_pp : Format.formatter -> Jbuilder.Env.t -> unit = +val env_pp : Format.formatter -> Dune.Env.t -> unit = |}] let env = Findlib.Config.env conf [%%expect{| -val env : Jbuilder.Env.t = ((FOO_BAR "my variable")) +val env : Dune.Env.t = ((FOO_BAR "my variable")) |}] diff --git a/vendor/boot/opamBaseParser.ml b/vendor/boot/opamBaseParser.ml index 434b59b37db..b90785758fa 100644 --- a/vendor/boot/opamBaseParser.ml +++ b/vendor/boot/opamBaseParser.ml @@ -1,6 +1,6 @@ open OpamParserTypes let main _lex _lexbuf fn = - assert (fn = "jbuilder.opam"); + assert (fn = "dune.opam"); { file_contents = [] ; file_name = fn } diff --git a/vendor/re/src/jbuild b/vendor/re/src/jbuild index b24a23ef2a9..1f311e23ed1 100644 --- a/vendor/re/src/jbuild +++ b/vendor/re/src/jbuild @@ -3,4 +3,4 @@ (library ((name re) (flags (:standard -w -50)) - (synopsis "Internal Jbuilder library, do not use!"))) + (synopsis "Internal Dune library, do not use!")))