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
This commit is contained in:
parent
b54c438fda
commit
325584adfc
|
@ -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 <<EOF
|
||||
version: "1.0+dev$DATE"
|
||||
opam-version: "1.2"
|
||||
maintainer: "opensource@janestreet.com"
|
||||
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"]
|
||||
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
|
||||
|
|
2
Makefile
2
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
|
||||
|
|
|
@ -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)))))
|
||||
|
|
90
bin/main.ml
90
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, <package>.install, and .merlin|}
|
||||
; `P {|Removes files added by dune such as _build, <package>.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 <package>.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,<package>.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
|
||||
|
|
13
doc/jbuild
13
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)
|
||||
|
|
|
@ -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))))
|
||||
|
||||
|
|
|
@ -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
|
||||
-------
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
Project Layout and Metadata Specification
|
||||
*****************************************
|
||||
|
||||
A typical jbuilder project will have one or more ``<package>.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 ``<package>.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 <name>)
|
||||
|
||||
<package>.opam files
|
||||
====================
|
||||
|
||||
|
|
|
@ -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 <<EOF
|
||||
|
||||
(rule
|
||||
((targets (jbuilder-$cmd.1))
|
||||
((targets (dune-$cmd.1))
|
||||
(action (with-stdout-to \${@}
|
||||
(run \${bin:jbuilder} $cmd --help=groff)))))
|
||||
(run dune $cmd --help=groff)))))
|
||||
|
||||
(install
|
||||
((section man)
|
||||
(files (jbuilder-$cmd.1))))
|
||||
(files (dune-$cmd.1))))
|
||||
EOF
|
||||
done
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ jbuild-workspace
|
|||
----------------
|
||||
|
||||
The root of the current workspace is determined by looking up a
|
||||
``jbuild-workspace`` file in the current directory and parent directories.
|
||||
``jbuild-workspace`` or ``dune-project`` file in the current directory
|
||||
and parent directories.
|
||||
|
||||
``jbuilder`` prints out the root when starting if it is not the
|
||||
current directory:
|
||||
|
@ -50,6 +51,8 @@ this file.
|
|||
jbuild-workspace\*
|
||||
------------------
|
||||
|
||||
The following is deprecated and no longer works with ``dune``.
|
||||
|
||||
In addition to the previous rule, if no ``jbuild-workspace`` file is found,
|
||||
``jbuilder`` will look for any file whose name starts with ``jbuild-workspace``
|
||||
in ancestor directories. For instance ``jbuild-workspace.dev``. If such a file
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 0.1)
|
||||
(name dune)
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((files_recursively_in sample-projects/hello_world)))
|
||||
(deps ((package dune)
|
||||
(files_recursively_in sample-projects/hello_world)))
|
||||
(action
|
||||
(chdir sample-projects/hello_world
|
||||
(setenv JBUILDER ${bin:jbuilder}
|
||||
(run ${exe:../test/blackbox-tests/cram.exe} -test run.t))))))
|
||||
(run ${exe:../test/blackbox-tests/cram.exe} -test run.t)))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((files_recursively_in sample-projects/with-configure-step)))
|
||||
(deps ((package dune)
|
||||
(files_recursively_in sample-projects/with-configure-step)))
|
||||
(action
|
||||
(chdir sample-projects/with-configure-step
|
||||
(setenv JBUILDER ${bin:jbuilder}
|
||||
(run ${exe:../test/blackbox-tests/cram.exe} -test run.t))))))
|
||||
(run ${exe:../test/blackbox-tests/cram.exe} -test run.t)))))
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$ $JBUILDER build -j1 --root . @install @runtest
|
||||
$ jbuilder build @install @runtest
|
||||
ocamldep bin/main.depends.ocamldep-output
|
||||
ocamldep lib/hello_world.depends.ocamldep-output
|
||||
ocamlc lib/hello_world.{cmi,cmo,cmt}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$ $JBUILDER build -j1 --root . @install @runtest
|
||||
$ jbuilder build @install @runtest
|
||||
ocaml config.full
|
||||
ocamldep src/plop.depends.ocamldep-output
|
||||
ocamlc src/config.{cmi,cmo,cmt}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(library
|
||||
((name configurator)
|
||||
(public_name jbuilder.configurator)
|
||||
(public_name dune.configurator)
|
||||
(libraries (stdune ocaml_config))
|
||||
(flags (:standard -safe-string (:include flags/flags.sexp)))
|
||||
(preprocess no_preprocessing)))
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
open Import
|
||||
open Sexp.Of_sexp
|
||||
|
||||
type t =
|
||||
{ name : string
|
||||
}
|
||||
|
||||
let filename = "dune-project"
|
||||
|
||||
type lang =
|
||||
| Dune_0_1
|
||||
|
||||
let lang =
|
||||
let version ver =
|
||||
match string ver with
|
||||
| "0.1" -> 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)
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
(** dune-project files *)
|
||||
|
||||
open Import
|
||||
|
||||
type t =
|
||||
{ name : string
|
||||
}
|
||||
|
||||
val load : dir:Path.t -> t
|
||||
|
||||
(** "dune-project" *)
|
||||
val filename : string
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
37
src/main.ml
37
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 ()
|
||||
|
|
|
@ -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'")))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(library
|
||||
((name caml)
|
||||
(public_name jbuilder.caml)
|
||||
(public_name dune.caml)
|
||||
(synopsis "[Internal] Wrapped version of the OCaml stdlib")))
|
||||
|
|
|
@ -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))))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(executable
|
||||
((name cram)
|
||||
(modules (cram))
|
||||
(libraries (test_common platform jbuilder configurator))))
|
||||
(libraries (test_common platform dune configurator))))
|
||||
|
||||
(ocamllex (cram))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
(executable
|
||||
((name run)
|
||||
(libraries (jbuilder.configurator))))
|
||||
(libraries (dune.configurator))))
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
(executable
|
||||
((name run)
|
||||
(libraries (jbuilder.configurator))))
|
||||
(libraries (dune.configurator))))
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
(executable
|
||||
((name run)
|
||||
(libraries (jbuilder.configurator))))
|
||||
(libraries (dune.configurator))))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$ jbuilder runtest --display short
|
||||
$ dune runtest --display short
|
||||
ocamldep bar.ml.d
|
||||
ocamldep foo.ml.d
|
||||
ocamldep foo.mli.d
|
||||
|
|
|
@ -1 +1 @@
|
|||
$ jbuilder build .merlin --display short
|
||||
$ dune build .merlin --display short
|
||||
|
|
|
@ -1 +1 @@
|
|||
$ jbuilder build @install --display short --debug-dependency-path
|
||||
$ dune build @install --display short --debug-dependency-path
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -1 +1 @@
|
|||
$ jbuilder build b/b.cma
|
||||
$ dune build b/b.cma
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
$ jbuilder build @doc
|
||||
$ dune build @doc
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$ jbuilder runtest --force --display short
|
||||
$ dune runtest --force --display short
|
||||
description = "contains \"quotes\""
|
||||
requires = "bytes"
|
||||
archive(byte) = "foobar.cma"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
$ jbuilder runtest --debug-dependency-path
|
||||
$ dune runtest --debug-dependency-path
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
$ jbuilder runtest --force --display short
|
||||
$ dune runtest --force --display short
|
||||
ocaml syntax
|
||||
|
|
|
@ -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 @@
|
|||
- <internal location>
|
||||
[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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</body>
|
||||
</html>
|
||||
|
||||
$ 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}.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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 = <fun>
|
||||
val infer : Jbuilder.Action.t -> string list * string list = <fun>
|
||||
val p : ?error_loc:Usexp.Loc.t -> string -> Dune.Import.Path.t = <fun>
|
||||
val infer : Dune.Action.t -> string list * string list = <fun>
|
||||
|}]
|
||||
|
||||
infer (Copy (p "a", p "b"));;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#warnings "-40";;
|
||||
|
||||
open Jbuilder;;
|
||||
open Dune;;
|
||||
open Import;;
|
||||
|
||||
Filename.extension "toto.titi";;
|
||||
|
|
|
@ -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])]
|
||||
|}]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 =
|
||||
<fun>
|
||||
val print_pkg : Format.formatter -> Dune.Findlib.Package.t -> unit = <fun>
|
||||
|}]
|
||||
|
||||
let findlib =
|
||||
|
@ -25,7 +24,7 @@ let findlib =
|
|||
;;
|
||||
|
||||
[%%expect{|
|
||||
val findlib : Jbuilder.Findlib.t = <abstr>
|
||||
val findlib : Dune.Findlib.t = <abstr>
|
||||
|}]
|
||||
|
||||
let pkg =
|
||||
|
@ -34,7 +33,7 @@ let pkg =
|
|||
| Error _ -> assert false;;
|
||||
|
||||
[%%expect{|
|
||||
val pkg : Jbuilder.Findlib.Package.t = <package:foo>
|
||||
val pkg : Dune.Findlib.Package.t = <package:foo>
|
||||
|}]
|
||||
|
||||
(* "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:"<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 = <fun>
|
||||
val env_pp : Format.formatter -> Dune.Env.t -> unit = <fun>
|
||||
|}]
|
||||
|
||||
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"))
|
||||
|}]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
open OpamParserTypes
|
||||
let main _lex _lexbuf fn =
|
||||
assert (fn = "jbuilder.opam");
|
||||
assert (fn = "dune.opam");
|
||||
{ file_contents = []
|
||||
; file_name = fn
|
||||
}
|
||||
|
|
|
@ -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!")))
|
||||
|
|
Loading…
Reference in New Issue