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)
|
eval $(opam config env)
|
||||||
opam install utop ppx_driver odoc menhir ocaml-migrate-parsetree js_of_ocaml-ppx js_of_ocaml-compiler--yes
|
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
|
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
|
fi
|
||||||
cp -a ~/.opam ~/.opam-start
|
cp -a ~/.opam ~/.opam-start
|
||||||
echo -en "travis_fold:end:opam.init\r"
|
echo -en "travis_fold:end:opam.init\r"
|
||||||
|
@ -63,6 +66,10 @@ case "$TARGET" in
|
||||||
UPDATE_OPAM=1
|
UPDATE_OPAM=1
|
||||||
opam pin remove jbuilder --no-action --yes
|
opam pin remove jbuilder --no-action --yes
|
||||||
opam remove jbuilder --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
|
fi
|
||||||
if [ ! -e ~/.opam/last-update ] || [ $(cat ~/.opam/last-update) != $DATE ] ; then
|
if [ ! -e ~/.opam/last-update ] || [ $(cat ~/.opam/last-update) != $DATE ] ; then
|
||||||
opam update --yes
|
opam update --yes
|
||||||
|
@ -71,22 +78,35 @@ case "$TARGET" in
|
||||||
opam upgrade --yes
|
opam upgrade --yes
|
||||||
fi
|
fi
|
||||||
opam list
|
opam list
|
||||||
echo "version: \"1.0+dev$DATE\"" >> jbuilder.opam
|
echo "version: \"1.0+dev$DATE\"" >> dune.opam
|
||||||
opam pin add jbuilder . --no-action --yes
|
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
|
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"
|
echo -en "travis_fold:end:opam.deps\r"
|
||||||
fi
|
fi
|
||||||
echo -en "travis_fold:start:jbuilder.bootstrap\r"
|
echo -en "travis_fold:start:dune.bootstrap\r"
|
||||||
ocaml bootstrap.ml
|
ocaml bootstrap.ml
|
||||||
echo -en "travis_fold:end:jbuilder.bootstrap\r"
|
echo -en "travis_fold:end:dune.bootstrap\r"
|
||||||
./boot.exe --subst
|
./boot.exe --subst
|
||||||
echo -en "travis_fold:start:jbuilder.boot\r"
|
echo -en "travis_fold:start:dune.boot\r"
|
||||||
./boot.exe --dev
|
./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
|
if [ $WITH_OPAM -eq 1 ] ; then
|
||||||
_build/install/default/bin/jbuilder runtest && \
|
_build/install/default/bin/dune runtest && \
|
||||||
_build/install/default/bin/jbuilder build @test/blackbox-tests/runtest-js && \
|
_build/install/default/bin/dune build @test/blackbox-tests/runtest-js && \
|
||||||
! _build/install/default/bin/jbuilder build @test/fail-with-background-jobs-running
|
! _build/install/default/bin/dune build @test/fail-with-background-jobs-running
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
if [ $UPDATE_OPAM -eq 0 ] ; then
|
if [ $UPDATE_OPAM -eq 0 ] ; then
|
||||||
rm -rf ~/.opam
|
rm -rf ~/.opam
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -35,7 +35,7 @@ promote:
|
||||||
accept-corrections: promote
|
accept-corrections: promote
|
||||||
|
|
||||||
all-supported-ocaml-versions:
|
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:
|
clean:
|
||||||
$(BIN) clean
|
$(BIN) clean
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
(executable
|
(executable
|
||||||
((name main)
|
((name main)
|
||||||
(public_name jbuilder)
|
(public_name dune)
|
||||||
(libraries (unix jbuilder cmdliner))
|
(libraries (unix dune cmdliner))
|
||||||
(preprocess no_preprocessing)))
|
(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 Import
|
||||||
open Cmdliner
|
open Cmdliner
|
||||||
open Fiber.O
|
open Fiber.O
|
||||||
|
|
||||||
(* Things in src/ don't depend on cmdliner to speed up the bootstrap, so we set this
|
(* Things in src/ don't depend on cmdliner to speed up the
|
||||||
reference here *)
|
bootstrap, so we set this reference here *)
|
||||||
let () = suggest_function := Cmdliner_suggest.value
|
let () = suggest_function := Cmdliner_suggest.value
|
||||||
|
|
||||||
type common =
|
type common =
|
||||||
|
@ -43,7 +43,7 @@ let set_common c ~targets =
|
||||||
Clflags.force := c.force;
|
Clflags.force := c.force;
|
||||||
Clflags.external_lib_deps_hint :=
|
Clflags.external_lib_deps_hint :=
|
||||||
List.concat
|
List.concat
|
||||||
[ ["jbuilder"; "external-lib-deps"; "--missing"]
|
[ ["dune"; "external-lib-deps"; "--missing"]
|
||||||
; c.orig_args
|
; c.orig_args
|
||||||
; targets
|
; targets
|
||||||
]
|
]
|
||||||
|
@ -70,12 +70,13 @@ let restore_cwd_and_execve common prog argv env =
|
||||||
Unix.execve prog argv env
|
Unix.execve prog argv env
|
||||||
|
|
||||||
module Main = struct
|
module Main = struct
|
||||||
include Jbuilder.Main
|
include Dune.Main
|
||||||
|
|
||||||
let setup ~log ?external_lib_deps_mode common =
|
let setup ~log ?external_lib_deps_mode common =
|
||||||
setup
|
setup
|
||||||
~log
|
~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
|
?only_packages:common.only_packages
|
||||||
?external_lib_deps_mode
|
?external_lib_deps_mode
|
||||||
?x:common.x
|
?x:common.x
|
||||||
|
@ -85,14 +86,14 @@ module Main = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
module Log = struct
|
module Log = struct
|
||||||
include Jbuilder.Log
|
include Dune.Log
|
||||||
|
|
||||||
let create common =
|
let create common =
|
||||||
Log.create ~display:common.config.display ()
|
Log.create ~display:common.config.display ()
|
||||||
end
|
end
|
||||||
|
|
||||||
module Scheduler = struct
|
module Scheduler = struct
|
||||||
include Jbuilder.Scheduler
|
include Dune.Scheduler
|
||||||
|
|
||||||
let go ?log ~common fiber =
|
let go ?log ~common fiber =
|
||||||
let fiber =
|
let fiber =
|
||||||
|
@ -137,11 +138,14 @@ let find_root () =
|
||||||
let cwd = Sys.getcwd () in
|
let cwd = Sys.getcwd () in
|
||||||
let rec loop counter ~candidates ~to_cwd dir =
|
let rec loop counter ~candidates ~to_cwd dir =
|
||||||
let files = Sys.readdir dir |> Array.to_list |> String.Set.of_list in
|
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
|
cont counter ~candidates:((0, dir, to_cwd) :: candidates) dir ~to_cwd
|
||||||
else if String.Set.exists files ~f:(fun fn ->
|
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
|
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
|
else
|
||||||
cont counter ~candidates dir ~to_cwd
|
cont counter ~candidates dir ~to_cwd
|
||||||
and cont counter ~candidates ~to_cwd dir =
|
and cont counter ~candidates ~to_cwd dir =
|
||||||
|
@ -342,7 +346,7 @@ let common =
|
||||||
Arg.(value
|
Arg.(value
|
||||||
& opt (some (enum Config.Display.all)) None
|
& opt (some (enum Config.Display.all)) None
|
||||||
& info ["display"] ~docs ~docv:"MODE"
|
& 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.|})
|
See $(b,dune-config\(5\)) for more details.|})
|
||||||
in
|
in
|
||||||
let merge verbose display =
|
let merge verbose display =
|
||||||
|
@ -358,8 +362,8 @@ let common =
|
||||||
Arg.(value
|
Arg.(value
|
||||||
& flag
|
& flag
|
||||||
& info ["no-buffer"] ~docs ~docv:"DIR"
|
& info ["no-buffer"] ~docs ~docv:"DIR"
|
||||||
~doc:{|Do not buffer the output of commands executed by jbuilder.
|
~doc:{|Do not buffer the output of commands executed by dune.
|
||||||
By default jbuilder buffers the output of subcommands, in order
|
By default dune buffers the output of subcommands, in order
|
||||||
to prevent interleaving when multiple commands are executed
|
to prevent interleaving when multiple commands are executed
|
||||||
in parallel. However, this can be an issue when debugging
|
in parallel. However, this can be an issue when debugging
|
||||||
long running tests. With $(b,--no-buffer), commands have direct
|
long running tests. With $(b,--no-buffer), commands have direct
|
||||||
|
@ -382,7 +386,7 @@ let common =
|
||||||
& flag
|
& flag
|
||||||
& info ["auto-promote"] ~docs
|
& info ["auto-promote"] ~docs
|
||||||
~doc:"Automatically promote files. This is similar to running
|
~doc:"Automatically promote files. This is similar to running
|
||||||
$(b,jbuilder promote) after the build.")
|
$(b,dune promote) after the build.")
|
||||||
in
|
in
|
||||||
let force =
|
let force =
|
||||||
Arg.(value
|
Arg.(value
|
||||||
|
@ -556,7 +560,7 @@ let resolve_package_install setup pkg =
|
||||||
die "Unknown package %s!%s" pkg
|
die "Unknown package %s!%s" pkg
|
||||||
(hint pkg
|
(hint pkg
|
||||||
(Package.Name.Map.keys setup.packages
|
(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 =
|
let target_hint (setup : Main.setup) path =
|
||||||
assert (Path.is_local path);
|
assert (Path.is_local path);
|
||||||
|
@ -593,7 +597,7 @@ let check_path contexts =
|
||||||
in
|
in
|
||||||
fun path ->
|
fun path ->
|
||||||
let internal 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)
|
(Path.to_string_maybe_quoted path)
|
||||||
in
|
in
|
||||||
if Path.is_in_build_dir path then
|
if Path.is_in_build_dir path then
|
||||||
|
@ -701,7 +705,7 @@ let runtest =
|
||||||
let man =
|
let man =
|
||||||
[ `S "DESCRIPTION"
|
[ `S "DESCRIPTION"
|
||||||
; `P {|This is a short-hand for calling:|}
|
; `P {|This is a short-hand for calling:|}
|
||||||
; `Pre {| jbuilder build @runtest|}
|
; `Pre {| dune build @runtest|}
|
||||||
; `Blocks help_secs
|
; `Blocks help_secs
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
|
@ -732,7 +736,7 @@ let clean =
|
||||||
let doc = "Clean the project." in
|
let doc = "Clean the project." in
|
||||||
let man =
|
let man =
|
||||||
[ `S "DESCRIPTION"
|
[ `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
|
; `Blocks help_secs
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
|
@ -856,7 +860,7 @@ let rules =
|
||||||
let doc = "Dump internal rules." in
|
let doc = "Dump internal rules." in
|
||||||
let man =
|
let man =
|
||||||
[ `S "DESCRIPTION"
|
[ `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.|}
|
If no targets are given, dump all the internal rules.|}
|
||||||
; `P {|By default the output is a list of S-expressions,
|
; `P {|By default the output is a list of S-expressions,
|
||||||
one S-expression per rule. Each S-expression is of the form:|}
|
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
|
if missing_install_files <> [] then begin
|
||||||
die "The following <package>.install are missing:\n\
|
die "The following <package>.install are missing:\n\
|
||||||
%s\n\
|
%s\n\
|
||||||
You need to run: jbuilder build @install"
|
You need to run: dune build @install"
|
||||||
(String.concat ~sep:"\n"
|
(String.concat ~sep:"\n"
|
||||||
(List.map missing_install_files
|
(List.map missing_install_files
|
||||||
~f:(fun p -> sprintf "- %s" (Path.to_string p))))
|
~f:(fun p -> sprintf "- %s" (Path.to_string p))))
|
||||||
|
@ -1068,11 +1072,11 @@ let exec =
|
||||||
in
|
in
|
||||||
let man =
|
let man =
|
||||||
[ `S "DESCRIPTION"
|
[ `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:|}
|
do:|}
|
||||||
; `Pre " \\$ jbuilder install\n\
|
; `Pre " \\$ dune install\n\
|
||||||
\ \\$ COMMAND"
|
\ \\$ 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
|
access to the libraries defined in the workspace using your usual
|
||||||
directives ($(b,#require) for instance)|}
|
directives ($(b,#require) for instance)|}
|
||||||
; `P {|When a leading / is present in the command (absolute path), then the
|
; `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
|
by the version obtained from the vcs. Currently only git is supported and
|
||||||
the version is obtained from the output of:|}
|
the version is obtained from the output of:|}
|
||||||
; `Pre {| \$ git describe --always --dirty|}
|
; `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:|}
|
the defatult configuration:|}
|
||||||
; var "NAME" "the name of the package"
|
; var "NAME" "the name of the package"
|
||||||
; var "VERSION" "output of $(b,git describe --always --dirty)"
|
; 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
|
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
|
prefixed by the shortest package name, this prefix is used. Otherwise you must
|
||||||
specify a name with the $(b,-n) command line option.|}
|
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:|}
|
to the $(b,build:) field of your opam file:|}
|
||||||
; `Pre {| ["jbuilder" "subst"] {pinned}|}
|
; `Pre {| [dune "subst"] {pinned}|}
|
||||||
; `Blocks help_secs
|
; `Blocks help_secs
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
|
@ -1234,7 +1238,7 @@ let utop =
|
||||||
let doc = "Load library in utop" in
|
let doc = "Load library in utop" in
|
||||||
let man =
|
let man =
|
||||||
[ `S "DESCRIPTION"
|
[ `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
|
; `Blocks help_secs
|
||||||
] in
|
] in
|
||||||
let go common dir ctx_name args =
|
let go common dir ctx_name args =
|
||||||
|
@ -1271,12 +1275,12 @@ let promote =
|
||||||
let man =
|
let man =
|
||||||
[ `S "DESCRIPTION"
|
[ `S "DESCRIPTION"
|
||||||
; `P {|Considering all actions of the form $(b,(diff a b)) that failed
|
; `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
|
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
|
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
|
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
|
; `Blocks help_secs
|
||||||
] in
|
] in
|
||||||
|
@ -1294,13 +1298,13 @@ let promote =
|
||||||
|
|
||||||
module Help = struct
|
module Help = struct
|
||||||
let config =
|
let config =
|
||||||
("dune-config", 5, "", "Jbuilder", "Jbuilder manual"),
|
("dune-config", 5, "", "Dune", "Dune manual"),
|
||||||
[ `S Manpage.s_synopsis
|
[ `S Manpage.s_synopsis
|
||||||
; `Pre "~/.config/dune/config"
|
; `Pre "~/.config/dune/config"
|
||||||
; `S Manpage.s_description
|
; `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
|
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
|
; `P {|The configuration file is normally $(b,~/.config/dune/config) on
|
||||||
Unix systems and $(b,Local Settings/dune/config) in the User home
|
Unix systems and $(b,Local Settings/dune/config) in the User home
|
||||||
directory on Windows. However, it is possible to specify an
|
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.|}
|
a list of stanzas. The following sections describe the stanzas available.|}
|
||||||
; `S "DISPLAY MODES"
|
; `S "DISPLAY MODES"
|
||||||
; `P {|Syntax: $(b,\(display MODE\))|}
|
; `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).
|
This parameter can also be set from the command line via $(b,--display MODE).
|
||||||
The following display modes are available:|}
|
The following display modes are available:|}
|
||||||
; `Blocks
|
; `Blocks
|
||||||
(List.map ~f:(fun (x, desc) -> `I (sprintf "$(b,%s)" x, desc))
|
(List.map ~f:(fun (x, desc) -> `I (sprintf "$(b,%s)" x, desc))
|
||||||
[ "progress",
|
[ "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.|}
|
status line as build goals are being completed.|}
|
||||||
; "quiet",
|
; "quiet",
|
||||||
{|Only display errors.|}
|
{|Only display errors.|}
|
||||||
|
@ -1325,13 +1329,13 @@ module Help = struct
|
||||||
on the right.|}
|
on the right.|}
|
||||||
; "verbose",
|
; "verbose",
|
||||||
{|Print the full command lines of programs being
|
{|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.|}
|
programs.|}
|
||||||
])
|
])
|
||||||
; `P {|Note that when the selected display mode is $(b,progress) and the
|
; `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
|
output is not a terminal then the $(b,quiet) mode is selected
|
||||||
instead. This rule doesn't apply when running Jbuilder inside Emacs.
|
instead. This rule doesn't apply when running Dune inside Emacs.
|
||||||
Jbuilder detects whether it is executed from inside Emacs or not by
|
Dune detects whether it is executed from inside Emacs or not by
|
||||||
looking at the environment variable $(b,INSIDE_EMACS) that is set 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
|
Emacs. If you want the same behavior with another editor, you can set
|
||||||
this variable. If your editor already sets another variable,
|
this variable. If your editor already sets another variable,
|
||||||
|
@ -1339,7 +1343,7 @@ module Help = struct
|
||||||
add support for it.|}
|
add support for it.|}
|
||||||
; `S "JOBS"
|
; `S "JOBS"
|
||||||
; `P {|Syntax: $(b,\(jobs NUMBER\))|}
|
; `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).|}
|
This can also be set from the command line via $(b,-j NUMBER).|}
|
||||||
; `P {|The default for this value is 4.|}
|
; `P {|The default for this value is 4.|}
|
||||||
; common_footer
|
; common_footer
|
||||||
|
@ -1355,10 +1359,10 @@ module Help = struct
|
||||||
]
|
]
|
||||||
|
|
||||||
let help =
|
let help =
|
||||||
let doc = "Additional Jbuilder help" in
|
let doc = "Additional Dune help" in
|
||||||
let man =
|
let man =
|
||||||
[ `S "DESCRIPTION"
|
[ `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:|}
|
The following topics are available:|}
|
||||||
; `Blocks (List.concat_map commands ~f:(fun (s, what) ->
|
; `Blocks (List.concat_map commands ~f:(fun (s, what) ->
|
||||||
match what with
|
match what with
|
||||||
|
@ -1413,13 +1417,13 @@ let all =
|
||||||
let default =
|
let default =
|
||||||
let doc = "composable build system for OCaml" in
|
let doc = "composable build system for OCaml" in
|
||||||
( Term.(ret (const (fun _ -> `Help (`Pager, None)) $ common))
|
( Term.(ret (const (fun _ -> `Help (`Pager, None)) $ common))
|
||||||
, Term.info "jbuilder" ~doc ~version:"%%VERSION%%"
|
, Term.info "dune" ~doc ~version:"%%VERSION%%"
|
||||||
~man:
|
~man:
|
||||||
[ `S "DESCRIPTION"
|
[ `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
|
focuses on providing the user with a consistent experience and takes
|
||||||
care of most of the low-level details of OCaml compilation. All you
|
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.
|
do the rest.
|
||||||
|}
|
|}
|
||||||
; `P {|The scheme it implements is inspired from the one used inside Jane
|
; `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)
|
(jbuild_version 1)
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder.1))
|
((targets (dune.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} --help=groff)))))
|
(run ${bin:dune} --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder.1))))
|
(files (dune.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (dune-config.5))
|
((targets (dune-config.5))
|
||||||
|
@ -21,8 +21,11 @@
|
||||||
(include jbuild.inc)
|
(include jbuild.inc)
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(with-stdout-to jbuild.inc.gen
|
((targets (jbuild.inc.gen))
|
||||||
(run bash ${path:update-jbuild.sh} ${bin:jbuilder})))
|
(deps ((package dune)))
|
||||||
|
(action
|
||||||
|
(with-stdout-to ${@}
|
||||||
|
(run bash ${path:update-jbuild.sh})))))
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
|
|
|
@ -1,118 +1,118 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-build.1))
|
((targets (dune-build.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} build --help=groff)))))
|
(run dune build --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-build.1))))
|
(files (dune-build.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-clean.1))
|
((targets (dune-clean.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} clean --help=groff)))))
|
(run dune clean --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-clean.1))))
|
(files (dune-clean.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-exec.1))
|
((targets (dune-exec.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} exec --help=groff)))))
|
(run dune exec --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-exec.1))))
|
(files (dune-exec.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-external-lib-deps.1))
|
((targets (dune-external-lib-deps.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} external-lib-deps --help=groff)))))
|
(run dune external-lib-deps --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-external-lib-deps.1))))
|
(files (dune-external-lib-deps.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-help.1))
|
((targets (dune-help.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} help --help=groff)))))
|
(run dune help --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-help.1))))
|
(files (dune-help.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-install.1))
|
((targets (dune-install.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} install --help=groff)))))
|
(run dune install --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-install.1))))
|
(files (dune-install.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-installed-libraries.1))
|
((targets (dune-installed-libraries.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} installed-libraries --help=groff)))))
|
(run dune installed-libraries --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-installed-libraries.1))))
|
(files (dune-installed-libraries.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-promote.1))
|
((targets (dune-promote.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} promote --help=groff)))))
|
(run dune promote --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-promote.1))))
|
(files (dune-promote.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-rules.1))
|
((targets (dune-rules.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} rules --help=groff)))))
|
(run dune rules --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-rules.1))))
|
(files (dune-rules.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-runtest.1))
|
((targets (dune-runtest.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} runtest --help=groff)))))
|
(run dune runtest --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-runtest.1))))
|
(files (dune-runtest.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-subst.1))
|
((targets (dune-subst.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} subst --help=groff)))))
|
(run dune subst --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-subst.1))))
|
(files (dune-subst.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-uninstall.1))
|
((targets (dune-uninstall.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} uninstall --help=groff)))))
|
(run dune uninstall --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-uninstall.1))))
|
(files (dune-uninstall.1))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-utop.1))
|
((targets (dune-utop.1))
|
||||||
(action (with-stdout-to ${@}
|
(action (with-stdout-to ${@}
|
||||||
(run ${bin:jbuilder} utop --help=groff)))))
|
(run dune utop --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((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
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
``(jbuild_version 1)`` specifies that we are using the version 1 of
|
Deprecated. This stanza is no longer used and will be removed in the
|
||||||
the Jbuilder metadata format in this ``jbuild`` file.
|
future.
|
||||||
|
|
||||||
library
|
library
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
Project Layout and Metadata Specification
|
Project Layout and Metadata Specification
|
||||||
*****************************************
|
*****************************************
|
||||||
|
|
||||||
A typical jbuilder project will have one or more ``<package>.opam`` file
|
A typical jbuilder project will have a ```dune-project`` and one or
|
||||||
at toplevel as well as ``jbuild`` files wherever interesting things are:
|
more ``<package>.opam`` file at toplevel as well as ``jbuild`` files
|
||||||
libraries, executables, tests, documents to install, etc...
|
wherever interesting things are: libraries, executables, tests,
|
||||||
|
documents to install, etc...
|
||||||
|
|
||||||
It is recommended to organize your project so that you have exactly one
|
It is recommended to organize your project so that you have exactly one
|
||||||
library per directory. You can have several executables in the same
|
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
|
this_is_an_atom_123'&^%! ; this is a comment
|
||||||
"another atom in an OCaml-string \"string in a string\" \123"
|
"another atom in an OCaml-string \"string in a string\" \123"
|
||||||
|
|
||||||
; empty list follows below
|
; empty list follows below
|
||||||
()
|
()
|
||||||
|
|
||||||
; a more complex example
|
; a more complex example
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
|
@ -103,6 +104,33 @@ Examples
|
||||||
|
|
||||||
.. _opam-files:
|
.. _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
|
<package>.opam files
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
|
|
@ -4,22 +4,20 @@
|
||||||
|
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
||||||
jbuilder=$1
|
CMDS=$(dune --help=plain | \
|
||||||
|
|
||||||
CMDS=$($jbuilder --help=plain | \
|
|
||||||
sed -n '/COMMANDS/,/OPTIONS/p' | sed -En 's/^ ([a-z-]+)/\1/p')
|
sed -n '/COMMANDS/,/OPTIONS/p' | sed -En 's/^ ([a-z-]+)/\1/p')
|
||||||
|
|
||||||
for cmd in $CMDS; do
|
for cmd in $CMDS; do
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (jbuilder-$cmd.1))
|
((targets (dune-$cmd.1))
|
||||||
(action (with-stdout-to \${@}
|
(action (with-stdout-to \${@}
|
||||||
(run \${bin:jbuilder} $cmd --help=groff)))))
|
(run dune $cmd --help=groff)))))
|
||||||
|
|
||||||
(install
|
(install
|
||||||
((section man)
|
((section man)
|
||||||
(files (jbuilder-$cmd.1))))
|
(files (dune-$cmd.1))))
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@ jbuild-workspace
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
The root of the current workspace is determined by looking up a
|
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
|
``jbuilder`` prints out the root when starting if it is not the
|
||||||
current directory:
|
current directory:
|
||||||
|
@ -50,6 +51,8 @@ this file.
|
||||||
jbuild-workspace\*
|
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,
|
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``
|
``jbuilder`` will look for any file whose name starts with ``jbuild-workspace``
|
||||||
in ancestor directories. For instance ``jbuild-workspace.dev``. If such a file
|
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
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in sample-projects/hello_world)))
|
(deps ((package dune)
|
||||||
|
(files_recursively_in sample-projects/hello_world)))
|
||||||
(action
|
(action
|
||||||
(chdir sample-projects/hello_world
|
(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
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in sample-projects/with-configure-step)))
|
(deps ((package dune)
|
||||||
|
(files_recursively_in sample-projects/with-configure-step)))
|
||||||
(action
|
(action
|
||||||
(chdir sample-projects/with-configure-step
|
(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 bin/main.depends.ocamldep-output
|
||||||
ocamldep lib/hello_world.depends.ocamldep-output
|
ocamldep lib/hello_world.depends.ocamldep-output
|
||||||
ocamlc lib/hello_world.{cmi,cmo,cmt}
|
ocamlc lib/hello_world.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build -j1 --root . @install @runtest
|
$ jbuilder build @install @runtest
|
||||||
ocaml config.full
|
ocaml config.full
|
||||||
ocamldep src/plop.depends.ocamldep-output
|
ocamldep src/plop.depends.ocamldep-output
|
||||||
ocamlc src/config.{cmi,cmo,cmt}
|
ocamlc src/config.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(library
|
(library
|
||||||
((name configurator)
|
((name configurator)
|
||||||
(public_name jbuilder.configurator)
|
(public_name dune.configurator)
|
||||||
(libraries (stdune ocaml_config))
|
(libraries (stdune ocaml_config))
|
||||||
(flags (:standard -safe-string (:include flags/flags.sexp)))
|
(flags (:standard -safe-string (:include flags/flags.sexp)))
|
||||||
(preprocess no_preprocessing)))
|
(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)
|
(jbuild_version 1)
|
||||||
|
|
||||||
(library
|
(library
|
||||||
((name jbuilder)
|
((name dune)
|
||||||
;; (public_name jbuilder)
|
|
||||||
(libraries (unix
|
(libraries (unix
|
||||||
stdune
|
stdune
|
||||||
fiber
|
fiber
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
opam_file_format
|
opam_file_format
|
||||||
usexp
|
usexp
|
||||||
ocaml_config))
|
ocaml_config))
|
||||||
(synopsis "Internal Jbuilder library, do not use!")))
|
(synopsis "Internal Dune library, do not use!")))
|
||||||
|
|
||||||
(ocamllex (meta_lexer glob_lexer))
|
(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.of_list_multi
|
||||||
|> Path.Map.map ~f:Scope_info.make
|
|> Path.Map.map ~f:Scope_info.make
|
||||||
in
|
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 =
|
let scopes =
|
||||||
if Path.Map.mem scopes Path.root then
|
if Path.Map.mem scopes Path.root then
|
||||||
scopes
|
scopes
|
||||||
|
|
37
src/main.ml
37
src/main.ml
|
@ -30,7 +30,7 @@ let setup_env ~capture_outputs =
|
||||||
|
|
||||||
let setup ?(log=Log.no_log)
|
let setup ?(log=Log.no_log)
|
||||||
?external_lib_deps_mode
|
?external_lib_deps_mode
|
||||||
?workspace ?(workspace_file=Path.of_string "jbuild-workspace")
|
?workspace ?workspace_file
|
||||||
?only_packages
|
?only_packages
|
||||||
?extra_ignored_subtrees
|
?extra_ignored_subtrees
|
||||||
?x
|
?x
|
||||||
|
@ -55,16 +55,27 @@ let setup ?(log=Log.no_log)
|
||||||
match workspace with
|
match workspace with
|
||||||
| Some w -> w
|
| Some w -> w
|
||||||
| None ->
|
| None ->
|
||||||
if Path.exists workspace_file then
|
match workspace_file with
|
||||||
Workspace.load ?x workspace_file
|
| Some p ->
|
||||||
else
|
Workspace.load ?x p
|
||||||
{ merlin_context = Some "default"
|
| _ ->
|
||||||
; contexts = [Default [
|
match
|
||||||
match x with
|
List.find_map ["dune-workspace"; "jbuild-workspace"] ~f:(fun fn ->
|
||||||
| None -> Native
|
let p = Path.of_string fn in
|
||||||
| Some x -> Named x
|
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
|
in
|
||||||
|
|
||||||
Fiber.parallel_map workspace.contexts ~f:(fun ctx_def ->
|
Fiber.parallel_map workspace.contexts ~f:(fun ctx_def ->
|
||||||
|
@ -193,7 +204,7 @@ let bootstrap () =
|
||||||
let main () =
|
let main () =
|
||||||
let anon s = raise (Arg.Bad (Printf.sprintf "don't know what to do with %s\n" s)) in
|
let anon s = raise (Arg.Bad (Printf.sprintf "don't know what to do with %s\n" s)) in
|
||||||
let subst () =
|
let subst () =
|
||||||
Scheduler.go (Watermarks.subst () ~name:"jbuilder");
|
Scheduler.go (Watermarks.subst () ~name:"dune");
|
||||||
exit 0
|
exit 0
|
||||||
in
|
in
|
||||||
let display = ref None in
|
let display = ref None in
|
||||||
|
@ -248,7 +259,7 @@ let bootstrap () =
|
||||||
()
|
()
|
||||||
>>= fun { build_system = bs; _ } ->
|
>>= fun { build_system = bs; _ } ->
|
||||||
Build_system.do_build 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
|
in
|
||||||
try
|
try
|
||||||
main ()
|
main ()
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
(library
|
(library
|
||||||
((name ocaml_config)
|
((name ocaml_config)
|
||||||
(public_name jbuilder.ocaml_config)
|
(public_name dune.ocaml_config)
|
||||||
(libraries (stdune usexp))
|
(libraries (stdune usexp))
|
||||||
(synopsis "[Internal] Interpret the output of 'ocamlc -config'")))
|
(synopsis "[Internal] Interpret the output of 'ocamlc -config'")))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(library
|
(library
|
||||||
((name caml)
|
((name caml)
|
||||||
(public_name jbuilder.caml)
|
(public_name dune.caml)
|
||||||
(synopsis "[Internal] Wrapped version of the OCaml stdlib")))
|
(synopsis "[Internal] Wrapped version of the OCaml stdlib")))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(library
|
(library
|
||||||
((name stdune)
|
((name stdune)
|
||||||
(public_name jbuilder.stdune)
|
(public_name dune.stdune)
|
||||||
(synopsis "[Internal] Standard library of Dune")
|
(synopsis "[Internal] Standard library of Dune")
|
||||||
(libraries (caml unix usexp))))
|
(libraries (caml unix usexp))))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
(library
|
(library
|
||||||
((name usexp)
|
((name usexp)
|
||||||
(synopsis "[Internal] S-expression library")
|
(synopsis "[Internal] S-expression library")
|
||||||
(public_name jbuilder.usexp)))
|
(public_name dune.usexp)))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(with-stdout-to table.ml.gen (run gen/gen_parser_automaton.exe)))
|
(with-stdout-to table.ml.gen (run gen/gen_parser_automaton.exe)))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(* Mini implementation of cram tests *)
|
(* Mini implementation of cram tests *)
|
||||||
|
|
||||||
{
|
{
|
||||||
open Jbuilder
|
open Dune
|
||||||
open Import
|
open Import
|
||||||
|
|
||||||
type item =
|
type item =
|
||||||
|
@ -132,7 +132,7 @@ and postprocess tbl b = parse
|
||||||
end;
|
end;
|
||||||
Test_common.run_expect_test expect_test ~f:(fun file_contents lexbuf ->
|
Test_common.run_expect_test expect_test ~f:(fun file_contents lexbuf ->
|
||||||
let items = file lexbuf in
|
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);
|
at_exit (fun () -> Sys.remove temp_file);
|
||||||
let buf = Buffer.create (String.length file_contents + 1024) in
|
let buf = Buffer.create (String.length file_contents + 1024) in
|
||||||
List.iter items ~f:(function
|
List.iter items ~f:(function
|
||||||
|
|
|
@ -79,7 +79,7 @@ module Test = struct
|
||||||
; action ] in
|
; action ] in
|
||||||
alias t.name
|
alias t.name
|
||||||
~deps:(
|
~deps:(
|
||||||
[ Sexp.strings ["package"; "jbuilder"]
|
[ Sexp.strings ["package"; "dune"]
|
||||||
; Sexp.strings [ "files_recursively_in"
|
; Sexp.strings [ "files_recursively_in"
|
||||||
; sprintf "test-cases/%s" t.name]
|
; sprintf "test-cases/%s" t.name]
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(executable
|
(executable
|
||||||
((name cram)
|
((name cram)
|
||||||
(modules (cram))
|
(modules (cram))
|
||||||
(libraries (test_common platform jbuilder configurator))))
|
(libraries (test_common platform dune configurator))))
|
||||||
|
|
||||||
(ocamllex (cram))
|
(ocamllex (cram))
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(alias
|
(alias
|
||||||
((name aliases)
|
((name aliases)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/aliases)))
|
(deps ((package dune) (files_recursively_in test-cases/aliases)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/aliases
|
test-cases/aliases
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name byte-code-only)
|
((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
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/byte-code-only
|
test-cases/byte-code-only
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name c-stubs)
|
((name c-stubs)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/c-stubs)))
|
(deps ((package dune) (files_recursively_in test-cases/c-stubs)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/c-stubs
|
test-cases/c-stubs
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name configurator)
|
((name configurator)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/configurator)))
|
(deps ((package dune) (files_recursively_in test-cases/configurator)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/configurator
|
test-cases/configurator
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name copy_files)
|
((name copy_files)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/copy_files)))
|
(deps ((package dune) (files_recursively_in test-cases/copy_files)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/copy_files
|
test-cases/copy_files
|
||||||
|
@ -42,8 +42,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name cross-compilation)
|
((name cross-compilation)
|
||||||
(deps
|
(deps ((package dune) (files_recursively_in test-cases/cross-compilation)))
|
||||||
((package jbuilder) (files_recursively_in test-cases/cross-compilation)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/cross-compilation
|
test-cases/cross-compilation
|
||||||
|
@ -52,8 +51,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name depend-on-the-universe)
|
((name depend-on-the-universe)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder)
|
((package dune) (files_recursively_in test-cases/depend-on-the-universe)))
|
||||||
(files_recursively_in test-cases/depend-on-the-universe)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/depend-on-the-universe
|
test-cases/depend-on-the-universe
|
||||||
|
@ -62,8 +60,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name exclude-missing-module)
|
((name exclude-missing-module)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder)
|
((package dune) (files_recursively_in test-cases/exclude-missing-module)))
|
||||||
(files_recursively_in test-cases/exclude-missing-module)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/exclude-missing-module
|
test-cases/exclude-missing-module
|
||||||
|
@ -71,7 +68,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name exec-cmd)
|
((name exec-cmd)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/exec-cmd)))
|
(deps ((package dune) (files_recursively_in test-cases/exec-cmd)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/exec-cmd
|
test-cases/exec-cmd
|
||||||
|
@ -79,7 +76,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name findlib)
|
((name findlib)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/findlib)))
|
(deps ((package dune) (files_recursively_in test-cases/findlib)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/findlib
|
test-cases/findlib
|
||||||
|
@ -87,7 +84,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name force-test)
|
((name force-test)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/force-test)))
|
(deps ((package dune) (files_recursively_in test-cases/force-test)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/force-test
|
test-cases/force-test
|
||||||
|
@ -96,8 +93,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name gen-opam-install-file)
|
((name gen-opam-install-file)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder)
|
((package dune) (files_recursively_in test-cases/gen-opam-install-file)))
|
||||||
(files_recursively_in test-cases/gen-opam-install-file)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/gen-opam-install-file
|
test-cases/gen-opam-install-file
|
||||||
|
@ -105,7 +101,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github20)
|
((name github20)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github20)))
|
(deps ((package dune) (files_recursively_in test-cases/github20)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github20
|
test-cases/github20
|
||||||
|
@ -113,7 +109,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github24)
|
((name github24)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github24)))
|
(deps ((package dune) (files_recursively_in test-cases/github24)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github24
|
test-cases/github24
|
||||||
|
@ -121,7 +117,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github25)
|
((name github25)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github25)))
|
(deps ((package dune) (files_recursively_in test-cases/github25)))
|
||||||
(action
|
(action
|
||||||
(setenv
|
(setenv
|
||||||
OCAMLPATH
|
OCAMLPATH
|
||||||
|
@ -132,7 +128,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github534)
|
((name github534)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github534)))
|
(deps ((package dune) (files_recursively_in test-cases/github534)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github534
|
test-cases/github534
|
||||||
|
@ -140,7 +136,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github568)
|
((name github568)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github568)))
|
(deps ((package dune) (files_recursively_in test-cases/github568)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github568
|
test-cases/github568
|
||||||
|
@ -148,7 +144,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github597)
|
((name github597)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github597)))
|
(deps ((package dune) (files_recursively_in test-cases/github597)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github597
|
test-cases/github597
|
||||||
|
@ -156,7 +152,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github644)
|
((name github644)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github644)))
|
(deps ((package dune) (files_recursively_in test-cases/github644)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github644
|
test-cases/github644
|
||||||
|
@ -164,7 +160,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name github660)
|
((name github660)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/github660)))
|
(deps ((package dune) (files_recursively_in test-cases/github660)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github660
|
test-cases/github660
|
||||||
|
@ -173,7 +169,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name github717-odoc-index)
|
((name github717-odoc-index)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder) (files_recursively_in test-cases/github717-odoc-index)))
|
((package dune) (files_recursively_in test-cases/github717-odoc-index)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/github717-odoc-index
|
test-cases/github717-odoc-index
|
||||||
|
@ -183,7 +179,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name include-loop)
|
((name include-loop)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/include-loop)))
|
(deps ((package dune) (files_recursively_in test-cases/include-loop)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/include-loop
|
test-cases/include-loop
|
||||||
|
@ -191,7 +187,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name inline_tests)
|
((name inline_tests)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/inline_tests)))
|
(deps ((package dune) (files_recursively_in test-cases/inline_tests)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/inline_tests
|
test-cases/inline_tests
|
||||||
|
@ -200,7 +196,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name installable-dup-private-libs)
|
((name installable-dup-private-libs)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder)
|
((package dune)
|
||||||
(files_recursively_in test-cases/installable-dup-private-libs)))
|
(files_recursively_in test-cases/installable-dup-private-libs)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
|
@ -209,7 +205,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name intf-only)
|
((name intf-only)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/intf-only)))
|
(deps ((package dune) (files_recursively_in test-cases/intf-only)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/intf-only
|
test-cases/intf-only
|
||||||
|
@ -217,7 +213,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name js_of_ocaml)
|
((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
|
(action
|
||||||
(setenv
|
(setenv
|
||||||
NODE
|
NODE
|
||||||
|
@ -228,7 +224,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name lib-available)
|
((name lib-available)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/lib-available)))
|
(deps ((package dune) (files_recursively_in test-cases/lib-available)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/lib-available
|
test-cases/lib-available
|
||||||
|
@ -236,7 +232,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name loop)
|
((name loop)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/loop)))
|
(deps ((package dune) (files_recursively_in test-cases/loop)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/loop
|
test-cases/loop
|
||||||
|
@ -244,7 +240,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name menhir)
|
((name menhir)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/menhir)))
|
(deps ((package dune) (files_recursively_in test-cases/menhir)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/menhir
|
test-cases/menhir
|
||||||
|
@ -252,7 +248,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name merlin-tests)
|
((name merlin-tests)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/merlin-tests)))
|
(deps ((package dune) (files_recursively_in test-cases/merlin-tests)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/merlin-tests
|
test-cases/merlin-tests
|
||||||
|
@ -260,7 +256,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name meta-gen)
|
((name meta-gen)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/meta-gen)))
|
(deps ((package dune) (files_recursively_in test-cases/meta-gen)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/meta-gen
|
test-cases/meta-gen
|
||||||
|
@ -268,7 +264,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name misc)
|
((name misc)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/misc)))
|
(deps ((package dune) (files_recursively_in test-cases/misc)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/misc
|
test-cases/misc
|
||||||
|
@ -277,8 +273,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name multiple-private-libs)
|
((name multiple-private-libs)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder)
|
((package dune) (files_recursively_in test-cases/multiple-private-libs)))
|
||||||
(files_recursively_in test-cases/multiple-private-libs)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/multiple-private-libs
|
test-cases/multiple-private-libs
|
||||||
|
@ -288,7 +283,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name null-dep)
|
((name null-dep)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/null-dep)))
|
(deps ((package dune) (files_recursively_in test-cases/null-dep)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/null-dep
|
test-cases/null-dep
|
||||||
|
@ -296,7 +291,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name ocaml-syntax)
|
((name ocaml-syntax)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/ocaml-syntax)))
|
(deps ((package dune) (files_recursively_in test-cases/ocaml-syntax)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/ocaml-syntax
|
test-cases/ocaml-syntax
|
||||||
|
@ -305,8 +300,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name ocamldep-multi-stanzas)
|
((name ocamldep-multi-stanzas)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder)
|
((package dune) (files_recursively_in test-cases/ocamldep-multi-stanzas)))
|
||||||
(files_recursively_in test-cases/ocamldep-multi-stanzas)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/ocamldep-multi-stanzas
|
test-cases/ocamldep-multi-stanzas
|
||||||
|
@ -314,7 +308,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name odoc)
|
((name odoc)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/odoc)))
|
(deps ((package dune) (files_recursively_in test-cases/odoc)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/odoc
|
test-cases/odoc
|
||||||
|
@ -324,8 +318,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name odoc-unique-mlds)
|
((name odoc-unique-mlds)
|
||||||
(deps
|
(deps ((package dune) (files_recursively_in test-cases/odoc-unique-mlds)))
|
||||||
((package jbuilder) (files_recursively_in test-cases/odoc-unique-mlds)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/odoc-unique-mlds
|
test-cases/odoc-unique-mlds
|
||||||
|
@ -335,7 +328,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name output-obj)
|
((name output-obj)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/output-obj)))
|
(deps ((package dune) (files_recursively_in test-cases/output-obj)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/output-obj
|
test-cases/output-obj
|
||||||
|
@ -352,7 +345,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name package-dep)
|
((name package-dep)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/package-dep)))
|
(deps ((package dune) (files_recursively_in test-cases/package-dep)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/package-dep
|
test-cases/package-dep
|
||||||
|
@ -360,7 +353,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name ppx-rewriter)
|
((name ppx-rewriter)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/ppx-rewriter)))
|
(deps ((package dune) (files_recursively_in test-cases/ppx-rewriter)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/ppx-rewriter
|
test-cases/ppx-rewriter
|
||||||
|
@ -371,8 +364,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name private-public-overlap)
|
((name private-public-overlap)
|
||||||
(deps
|
(deps
|
||||||
((package jbuilder)
|
((package dune) (files_recursively_in test-cases/private-public-overlap)))
|
||||||
(files_recursively_in test-cases/private-public-overlap)))
|
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/private-public-overlap
|
test-cases/private-public-overlap
|
||||||
|
@ -380,7 +372,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name promote)
|
((name promote)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/promote)))
|
(deps ((package dune) (files_recursively_in test-cases/promote)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/promote
|
test-cases/promote
|
||||||
|
@ -388,7 +380,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name quoting)
|
((name quoting)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/quoting)))
|
(deps ((package dune) (files_recursively_in test-cases/quoting)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/quoting
|
test-cases/quoting
|
||||||
|
@ -396,7 +388,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name reason)
|
((name reason)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/reason)))
|
(deps ((package dune) (files_recursively_in test-cases/reason)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/reason
|
test-cases/reason
|
||||||
|
@ -404,7 +396,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name redirections)
|
((name redirections)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/redirections)))
|
(deps ((package dune) (files_recursively_in test-cases/redirections)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/redirections
|
test-cases/redirections
|
||||||
|
@ -412,7 +404,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name scope-bug)
|
((name scope-bug)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/scope-bug)))
|
(deps ((package dune) (files_recursively_in test-cases/scope-bug)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/scope-bug
|
test-cases/scope-bug
|
||||||
|
@ -420,7 +412,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name scope-ppx-bug)
|
((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
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/scope-ppx-bug
|
test-cases/scope-ppx-bug
|
||||||
|
@ -428,7 +420,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name select)
|
((name select)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/select)))
|
(deps ((package dune) (files_recursively_in test-cases/select)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/select
|
test-cases/select
|
||||||
|
@ -436,7 +428,7 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name utop)
|
((name utop)
|
||||||
(deps ((package jbuilder) (files_recursively_in test-cases/utop)))
|
(deps ((package dune) (files_recursively_in test-cases/utop)))
|
||||||
(action
|
(action
|
||||||
(chdir
|
(chdir
|
||||||
test-cases/utop
|
test-cases/utop
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
$ jbuilder clean --display short
|
$ dune clean --display short
|
||||||
$ jbuilder build --display short @just-in-src
|
$ dune build --display short @just-in-src
|
||||||
running in src
|
running in src
|
||||||
$ jbuilder clean --display short
|
$ dune clean --display short
|
||||||
$ jbuilder build --display short @everywhere
|
$ dune build --display short @everywhere
|
||||||
running in src/foo/bar
|
running in src/foo/bar
|
||||||
running in src/foo/baz
|
running in src/foo/baz
|
||||||
running in src
|
running in src
|
||||||
$ jbuilder clean --display short
|
$ dune clean --display short
|
||||||
$ jbuilder build --display short @x
|
$ dune build --display short @x
|
||||||
running in src/foo/bar
|
running in src/foo/bar
|
||||||
running in src/foo/baz
|
running in src/foo/baz
|
||||||
running in src
|
running in src
|
||||||
$ jbuilder build --display short @plop
|
$ dune build --display short @plop
|
||||||
From the command line:
|
From the command line:
|
||||||
Error: Alias plop is empty.
|
Error: Alias plop is empty.
|
||||||
It is not defined in . or any of its descendants.
|
It is not defined in . or any of its descendants.
|
||||||
[1]
|
[1]
|
||||||
$ jbuilder build --display short @truc/x
|
$ dune build --display short @truc/x
|
||||||
From the command line:
|
From the command line:
|
||||||
Error: Don't know about directory truc!
|
Error: Don't know about directory truc!
|
||||||
[1]
|
[1]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder exec ./qnativerun/run.exe --display short
|
$ dune exec ./qnativerun/run.exe --display short
|
||||||
ocamldep qnativerun/run.ml.d
|
ocamldep qnativerun/run.ml.d
|
||||||
ocamlc q/q_stub$ext_obj
|
ocamlc q/q_stub$ext_obj
|
||||||
ocamlmklib q/dllq_stubs$ext_dll,q/libq_stubs$ext_lib
|
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.eobjs/run.{cmx,o}
|
||||||
ocamlopt qnativerun/run.exe
|
ocamlopt qnativerun/run.exe
|
||||||
42
|
42
|
||||||
# $ jbuilder exec ./qbyterun/run.bc --display short
|
# $ dune exec ./qbyterun/run.bc --display short
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
(executable
|
(executable
|
||||||
((name run)
|
((name run)
|
||||||
(libraries (jbuilder.configurator))))
|
(libraries (dune.configurator))))
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
(executable
|
(executable
|
||||||
((name run)
|
((name run)
|
||||||
(libraries (jbuilder.configurator))))
|
(libraries (dune.configurator))))
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
(executable
|
(executable
|
||||||
((name run)
|
((name run)
|
||||||
(libraries (jbuilder.configurator))))
|
(libraries (dune.configurator))))
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
Show that config values are present
|
Show that config values are present
|
||||||
$ jbuilder exec config/run.exe
|
$ dune exec config/run.exe
|
||||||
DUNE_CONFIGURATOR is present
|
DUNE_CONFIGURATOR is present
|
||||||
version is present
|
version is present
|
||||||
|
|
||||||
We're able to compile C program sucessfully
|
We're able to compile C program sucessfully
|
||||||
$ jbuilder exec c_test/run.exe
|
$ dune exec c_test/run.exe
|
||||||
Successfully compiled c program
|
Successfully compiled c program
|
||||||
|
|
||||||
Importing #define's from code is successful
|
Importing #define's from code is successful
|
||||||
$ jbuilder exec import-define/run.exe
|
$ dune exec import-define/run.exe
|
||||||
CAML_CONFIG_H=true
|
CAML_CONFIG_H=true
|
||||||
Page_log=12
|
Page_log=12
|
||||||
CONFIGURATOR_TESTING=foobar
|
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
|
ocamllex lexers/lexer1.ml
|
||||||
ocamldep lexer1.ml.d
|
ocamldep lexer1.ml.d
|
||||||
ocamldep test.ml.d
|
ocamldep test.ml.d
|
||||||
|
@ -13,6 +13,6 @@
|
||||||
ocamlc .test.eobjs/test.{cmi,cmo,cmt}
|
ocamlc .test.eobjs/test.{cmi,cmo,cmt}
|
||||||
ocamlopt .test.eobjs/test.{cmx,o}
|
ocamlopt .test.eobjs/test.{cmx,o}
|
||||||
ocamlopt test.exe
|
ocamlopt test.exe
|
||||||
$ jbuilder build @bar-source --display short
|
$ dune build @bar-source --display short
|
||||||
#line 1 "include/bar.h"
|
#line 1 "include/bar.h"
|
||||||
int foo () {return 42;}
|
int foo () {return 42;}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
$ jbuilder build @x
|
$ dune build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ jbuilder build @x
|
$ dune build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ jbuilder build @x
|
$ dune build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ jbuilder build @x
|
$ dune build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ jbuilder build @x
|
$ dune build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
$ jbuilder build --display short
|
$ dune build --display short
|
||||||
File "jbuild", line 3, characters 24-28:
|
File "jbuild", line 3, characters 24-28:
|
||||||
Warning: Module Fake is excluded but it doesn't exist.
|
Warning: Module Fake is excluded but it doesn't exist.
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
$ jbuilder clean --display short
|
$ dune clean --display short
|
||||||
$ jbuilder exec --no-build ./foo.exe --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.
|
Error: Program "./foo.exe" isn't built yet you need to buid it first or remove the --no-build option.
|
||||||
[1]
|
[1]
|
||||||
$ jbuilder exec ./foo.exe --display short
|
$ dune exec ./foo.exe --display short
|
||||||
ocamldep foo.ml.d
|
ocamldep foo.ml.d
|
||||||
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
||||||
ocamlopt .foo.eobjs/foo.{cmx,o}
|
ocamlopt .foo.eobjs/foo.{cmx,o}
|
||||||
ocamlopt foo.exe
|
ocamlopt foo.exe
|
||||||
Foo
|
Foo
|
||||||
$ jbuilder exec --dev ./foo.exe --display short
|
$ dune exec --dev ./foo.exe --display short
|
||||||
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
||||||
ocamlopt .foo.eobjs/foo.{cmx,o}
|
ocamlopt .foo.eobjs/foo.{cmx,o}
|
||||||
ocamlopt foo.exe
|
ocamlopt foo.exe
|
||||||
Foo
|
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.
|
Error: Program "dunetestbar" isn't built yet you need to buid it first or remove the --no-build option.
|
||||||
[1]
|
[1]
|
||||||
$ jbuilder exec dunetestbar --display short
|
$ dune exec dunetestbar --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamlc .bar.eobjs/bar.{cmi,cmo,cmt}
|
ocamlc .bar.eobjs/bar.{cmi,cmo,cmt}
|
||||||
ocamlopt .bar.eobjs/bar.{cmx,o}
|
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:
|
These are the external library dependencies in the default context:
|
||||||
- a
|
- a
|
||||||
- b
|
- b
|
||||||
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
Reproduction case for #484. The error should point to src/jbuild
|
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:
|
File "src/jbuild", line 4, characters 16-17:
|
||||||
Error: Library "a" not found.
|
Error: Library "a" not found.
|
||||||
Hint: try: jbuilder external-lib-deps --missing @install
|
Hint: try: dune external-lib-deps --missing @install
|
||||||
[1]
|
[1]
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
$ jbuilder clean --display short
|
$ dune clean --display short
|
||||||
$ jbuilder runtest --display short
|
$ dune runtest --display short
|
||||||
ocamldep f.ml.d
|
ocamldep f.ml.d
|
||||||
ocamlc .f.eobjs/f.{cmi,cmo,cmt}
|
ocamlc .f.eobjs/f.{cmi,cmo,cmt}
|
||||||
ocamlopt .f.eobjs/f.{cmx,o}
|
ocamlopt .f.eobjs/f.{cmx,o}
|
||||||
ocamlopt f.exe
|
ocamlopt f.exe
|
||||||
f alias runtest
|
f alias runtest
|
||||||
Foo Bar
|
Foo Bar
|
||||||
$ jbuilder runtest --display short
|
$ dune runtest --display short
|
||||||
$ jbuilder runtest --force --display short
|
$ dune runtest --force --display short
|
||||||
f alias runtest
|
f alias runtest
|
||||||
Foo Bar
|
Foo Bar
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder runtest --display short
|
$ dune runtest --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamldep foo.ml.d
|
ocamldep foo.ml.d
|
||||||
ocamldep foo.mli.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
|
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}
|
ocamlc root/.hello.objs/hello.{cmi,cmo,cmt}
|
||||||
ocamlopt root/.hello.objs/hello.{cmx,o}
|
ocamlopt root/.hello.objs/hello.{cmx,o}
|
||||||
ocamlopt root/hello.{a,cmxa}
|
ocamlopt root/hello.{a,cmxa}
|
||||||
ocamlopt root/hello.cmxs
|
ocamlopt root/hello.cmxs
|
||||||
ocamlc root/hello.cma
|
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
|
ocamldep root/a.ml.d
|
||||||
File ".../plop/META", line 1, characters 0-0:
|
File ".../plop/META", line 1, characters 0-0:
|
||||||
Error: Library "une-lib-qui-nexiste-pas" not found.
|
Error: Library "une-lib-qui-nexiste-pas" not found.
|
||||||
-> required by library "plop.ca-marche-pas" in .../plop
|
-> 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
|
ocamldep root/b.ml.d
|
||||||
ocamlc root/.pas_de_bol.objs/pas_de_bol.{cmi,cmo,cmt}
|
ocamlc root/.pas_de_bol.objs/pas_de_bol.{cmi,cmo,cmt}
|
||||||
ocamlopt root/.pas_de_bol.objs/pas_de_bol.{cmx,o}
|
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
|
echo main.ml
|
||||||
ocamldep main.ml.d
|
ocamldep main.ml.d
|
||||||
ocamlc .main.eobjs/main.{cmi,cmo,cmt}
|
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 test1.ml.d
|
||||||
ocamldep lib1.ml.d
|
ocamldep lib1.ml.d
|
||||||
ocamlc .lib1.objs/lib1.{cmi,cmo,cmt}
|
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:
|
File "jbuild", line 4, characters 20-42:
|
||||||
Error: Library "ppx_that_doesn't_exist" not found.
|
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]
|
[1]
|
||||||
|
|
||||||
These should print something:
|
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:
|
These are the external library dependencies in the default context:
|
||||||
- ocaml-migrate-parsetree.driver-main
|
- ocaml-migrate-parsetree.driver-main
|
||||||
- ppx_that_doesn't_exist
|
- 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:
|
Error: The following libraries are missing in the default context:
|
||||||
- ppx_that_doesn't_exist
|
- ppx_that_doesn't_exist
|
||||||
Hint: try: opam install 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.
|
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
|
main alias runtest
|
||||||
hello
|
hello
|
||||||
$ echo 'let x = 1' >> explicit-interfaces/lib_sub.ml
|
$ 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
|
main alias runtest
|
||||||
hello
|
hello
|
||||||
|
|
||||||
When there are no interfaces, the situation is the same, but it is not possible
|
When there are no interfaces, the situation is the same, but it is not possible
|
||||||
to rely on these.
|
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
|
main alias runtest
|
||||||
hello
|
hello
|
||||||
$ echo 'let x = 1' >> no-interfaces/lib_sub.ml
|
$ 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
|
main alias runtest
|
||||||
hello
|
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:
|
File "jbuild", line 2, characters 0-15:
|
||||||
Error: Recursive inclusion of jbuild files detected:
|
Error: Recursive inclusion of jbuild files detected:
|
||||||
File a.inc is included from c.inc:2
|
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
|
Fatal error: exception File "simple/.foo_simple.inline-tests/run.ml", line 1, characters 10-16: Assertion failed
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ jbuilder runtest missing-backend
|
$ dune runtest missing-backend
|
||||||
File "missing-backend/jbuild", line 3, characters 2-16:
|
File "missing-backend/jbuild", line 3, characters 2-16:
|
||||||
Error: No inline tests backend found.
|
Error: No inline tests backend found.
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ jbuilder runtest too-many-backends
|
$ dune runtest too-many-backends
|
||||||
File "too-many-backends/jbuild", line 17, characters 2-16:
|
File "too-many-backends/jbuild", line 17, characters 2-16:
|
||||||
Error: Too many independant inline tests backends found:
|
Error: Too many independant inline tests backends found:
|
||||||
- "backend_tmb1" in _build/default/too-many-backends
|
- "backend_tmb1" in _build/default/too-many-backends
|
||||||
- "backend_tmb2" in _build/default/too-many-backends
|
- "backend_tmb2" in _build/default/too-many-backends
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ jbuilder runtest many-backends-choose
|
$ dune runtest many-backends-choose
|
||||||
run alias many-backends-choose/runtest
|
run alias many-backends-choose/runtest
|
||||||
backend_mbc1
|
backend_mbc1
|
||||||
|
|
||||||
$ jbuilder runtest dune-file
|
$ dune runtest dune-file
|
||||||
(dune
|
(dune
|
||||||
1
|
1
|
||||||
((inline_tests.backend
|
((inline_tests.backend
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder build @install --display short
|
$ dune build @install --display short
|
||||||
ocamldep a1/a.ml.d
|
ocamldep a1/a.ml.d
|
||||||
ocamlc a1/.a.objs/a.{cmi,cmo,cmt}
|
ocamlc a1/.a.objs/a.{cmi,cmo,cmt}
|
||||||
ocamlopt a1/.a.objs/a.{cmx,o}
|
ocamlopt a1/.a.objs/a.{cmx,o}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Successes:
|
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 test/bar.ml.d
|
||||||
ocamldep foo.ml.d
|
ocamldep foo.ml.d
|
||||||
ocamlc .foo.objs/foo__.{cmi,cmo,cmt}
|
ocamlc .foo.objs/foo__.{cmi,cmo,cmt}
|
||||||
|
@ -20,7 +20,7 @@ Successes:
|
||||||
|
|
||||||
Errors:
|
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:
|
File "jbuild", line 2, characters 1-13:
|
||||||
Warning: Some modules don't have an implementation.
|
Warning: Some modules don't have an implementation.
|
||||||
You need to add the following field to this stanza:
|
You need to add the following field to this stanza:
|
||||||
|
@ -30,16 +30,16 @@ Errors:
|
||||||
This will become an error in the future.
|
This will become an error in the future.
|
||||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
||||||
ocamlc foo.cma
|
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:
|
File "jbuild", line 3, characters 34-37:
|
||||||
Warning: The following modules must be listed here as they don't have an implementation:
|
Warning: The following modules must be listed here as they don't have an implementation:
|
||||||
- y
|
- y
|
||||||
This will become an error in the future.
|
This will become an error in the future.
|
||||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
||||||
ocamlc foo.cma
|
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:
|
File "jbuild", line 3, characters 35-36:
|
||||||
Error: Module X doesn't exist.
|
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:
|
File "jbuild", line 3, characters 35-36:
|
||||||
Error: Module X has an implementation, it cannot be listed here
|
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
|
ocamlc lib/stubs$ext_obj
|
||||||
ocamlmklib lib/dllx_stubs$ext_dll,lib/libx_stubs$ext_lib
|
ocamlmklib lib/dllx_stubs$ext_dll,lib/libx_stubs$ext_lib
|
||||||
ocamlopt .ppx/js_of_ocaml-ppx/ppx.exe
|
ocamlopt .ppx/js_of_ocaml-ppx/ppx.exe
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
use it
|
use it
|
||||||
break it
|
break it
|
||||||
fix 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__.{cmi,cmo,cmt}
|
||||||
ocamlc lib/.x.objs/x__Y.{cmi,cmo,cmt}
|
ocamlc lib/.x.objs/x__Y.{cmi,cmo,cmt}
|
||||||
ocamlc lib/.x.objs/x.{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
|
||||||
sh alias runtest
|
sh alias runtest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder build --display short a
|
$ dune build --display short a
|
||||||
true x
|
true x
|
||||||
true y
|
true y
|
||||||
Dependency cycle between the following files:
|
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
|
but the cycle doesn't involve result1. We must make sure the output
|
||||||
does show a cycle.
|
does show a cycle.
|
||||||
|
|
||||||
$ jbuilder build --display short result1
|
$ dune build --display short result1
|
||||||
Dependency cycle between the following files:
|
Dependency cycle between the following files:
|
||||||
_build/default/result2
|
_build/default/result2
|
||||||
--> _build/default/input
|
--> _build/default/input
|
||||||
--> _build/default/result2
|
--> _build/default/result2
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ jbuilder build --display short result1 --debug-dependency-path
|
$ dune build --display short result1 --debug-dependency-path
|
||||||
Dependency cycle between the following files:
|
Dependency cycle between the following files:
|
||||||
_build/default/result2
|
_build/default/result2
|
||||||
--> _build/default/input
|
--> _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
|
ocamllex src/lexer1.ml
|
||||||
ocamldep src/lexer1.ml.d
|
ocamldep src/lexer1.ml.d
|
||||||
ocamllex src/lexer2.ml
|
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
|
ocamldep sanitize-dot-merlin/sanitize_dot_merlin.ml.d
|
||||||
ocamlc sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmi,cmo,cmt}
|
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}
|
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\""
|
description = "contains \"quotes\""
|
||||||
requires = "bytes"
|
requires = "bytes"
|
||||||
archive(byte) = "foobar.cma"
|
archive(byte) = "foobar.cma"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder runtest --display short
|
$ dune runtest --display short
|
||||||
File "jbuild", line 65, characters 21-44:
|
File "jbuild", line 65, characters 21-44:
|
||||||
Warning: Directory dir-that-doesnt-exist doesn't exist.
|
Warning: Directory dir-that-doesnt-exist doesn't exist.
|
||||||
diff alias runtest
|
diff alias runtest
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
This test checks that there is no clash when two private libraries have the same name
|
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
|
ocamldep a/test.ml.d
|
||||||
ocamlc a/.test.objs/test.{cmi,cmo,cmt}
|
ocamlc a/.test.objs/test.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/test@a/test.odoc
|
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
|
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:
|
File "jbuild", line 1, characters 0-0:
|
||||||
Warning: Module "Lib" is used in several stanzas:
|
Warning: Module "Lib" is used in several stanzas:
|
||||||
- jbuild:8
|
- jbuild:8
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
- <internal location>
|
- <internal location>
|
||||||
[1]
|
[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:
|
File "src/jbuild", line 1, characters 0-0:
|
||||||
Warning: Module "X" is used in several stanzas:
|
Warning: Module "X" is used in several stanzas:
|
||||||
- src/jbuild:4
|
- src/jbuild:4
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Duplicate mld's in the same scope
|
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
|
odoc _doc/_html/odoc.css
|
||||||
ocamlc lib1/.root_lib1.objs/root_lib1.{cmi,cmo,cmt}
|
ocamlc lib1/.root_lib1.objs/root_lib1.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/root.lib1/root_lib1.odoc
|
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
|
Duplicate mld's in different scope
|
||||||
$ rm -rf diff-scope/_build
|
$ 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
|
odoc _doc/_html/odoc.css
|
||||||
ocamlc scope1/.scope1.objs/scope1.{cmi,cmo,cmt}
|
ocamlc scope1/.scope1.objs/scope1.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/scope1/scope1.odoc
|
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
|
ocamldep bar.ml.d
|
||||||
ocamlc .bar.objs/bar.{cmi,cmo,cmt}
|
ocamlc .bar.objs/bar.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/bar/bar.odoc
|
odoc _doc/_odoc/lib/bar/bar.odoc
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
odoc _doc/_html/foo/index.html
|
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/Foo_byte/.jbuilder-keep,_doc/_html/foo/Foo_byte/index.html
|
||||||
odoc _doc/_html/foo/Foo2/.jbuilder-keep,_doc/_html/foo/Foo2/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>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
$ jbuilder build @foo-mld --display short
|
$ dune build @foo-mld --display short
|
||||||
{1 Library foo}
|
{1 Library foo}
|
||||||
This library exposes the following toplevel modules:
|
This library exposes the following toplevel modules:
|
||||||
{!modules:Foo Foo2}.
|
{!modules:Foo Foo2}.
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
The entry point of this library is the module:
|
The entry point of this library is the module:
|
||||||
{!module-Foo_byte}.
|
{!module-Foo_byte}.
|
||||||
|
|
||||||
$ jbuilder build @bar-mld --display short
|
$ dune build @bar-mld --display short
|
||||||
{1 Library bar}
|
{1 Library bar}
|
||||||
The entry point of this library is the module:
|
The entry point of this library is the module:
|
||||||
{!module-Bar}.
|
{!module-Bar}.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder build --display short @all
|
$ dune build --display short @all
|
||||||
ocamldep test.ml.d
|
ocamldep test.ml.d
|
||||||
ocamlc .test.eobjs/test.{cmi,cmo,cmt}
|
ocamlc .test.eobjs/test.{cmi,cmo,cmt}
|
||||||
ocamlc test.bc.o
|
ocamlc test.bc.o
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
ocamlopt test.exe
|
ocamlopt test.exe
|
||||||
ocamlopt test$ext_dll
|
ocamlopt test$ext_dll
|
||||||
|
|
||||||
$ jbuilder build @runtest
|
$ dune build @runtest
|
||||||
static alias runtest
|
static alias runtest
|
||||||
OK: ./static.bc
|
OK: ./static.bc
|
||||||
dynamic alias runtest
|
dynamic alias runtest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder runtest --display short
|
$ dune runtest --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamldep foo.ml.d
|
ocamldep foo.ml.d
|
||||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
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
|
ocamldep ppx/fooppx.ml.d
|
||||||
ocamlc ppx/.fooppx.objs/fooppx.{cmi,cmo,cmt}
|
ocamlc ppx/.fooppx.objs/fooppx.{cmi,cmo,cmt}
|
||||||
ocamlopt ppx/.fooppx.objs/fooppx.{cmx,o}
|
ocamlopt ppx/.fooppx.objs/fooppx.{cmx,o}
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
ocamlc .w_omp_driver.eobjs/w_omp_driver.{cmi,cmo,cmt}
|
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.eobjs/w_omp_driver.{cmx,o}
|
||||||
ocamlopt w_omp_driver.exe
|
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
|
ocamlopt .ppx/ppx_driver.runner/ppx.exe
|
||||||
ppx w_ppx_driver.pp.ml
|
ppx w_ppx_driver.pp.ml
|
||||||
ocamldep w_ppx_driver.pp.ml.d
|
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.eobjs/w_ppx_driver.{cmx,o}
|
||||||
ocamlopt w_ppx_driver.exe
|
ocamlopt w_ppx_driver.exe
|
||||||
This test is broken because ppx_driver doesn't support migrate custom arguments
|
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
|
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:
|
File "jbuild", line 10, characters 14-24:
|
||||||
Error: Library "privatelib" is private, it cannot be a dependency of a public library.
|
Error: Library "privatelib" is private, it cannot be a dependency of a public library.
|
||||||
You need to give "privatelib" a public name.
|
You need to give "privatelib" a public name.
|
||||||
ocamldep publiclib.ml.d
|
ocamldep publiclib.ml.d
|
||||||
|
|
||||||
On the other hand, public libraries may have private preprocessors
|
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}
|
ocamlc .ppx_internal.objs/ppx_internal.{cmi,cmo,cmt}
|
||||||
ocamlopt .ppx_internal.objs/ppx_internal.{cmx,o}
|
ocamlopt .ppx_internal.objs/ppx_internal.{cmx,o}
|
||||||
ocamlopt ppx_internal.{a,cmxa}
|
ocamlopt ppx_internal.{a,cmxa}
|
||||||
|
@ -21,7 +21,7 @@ On the other hand, public libraries may have private preprocessors
|
||||||
ocamlc mylib.cma
|
ocamlc mylib.cma
|
||||||
|
|
||||||
Unless they introduce private runtime dependencies:
|
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:
|
File "jbuild", line 16, characters 20-31:
|
||||||
Error: Library "private_runtime_dep" is private, it cannot be a dependency of a public library.
|
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.
|
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
|
ocamldep mylib.pp.ml.d
|
||||||
|
|
||||||
However, public binaries may accept private dependencies
|
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
|
ocamldep publicbin.ml.d
|
||||||
ocamlc .publicbin.eobjs/publicbin.{cmi,cmo,cmt}
|
ocamlc .publicbin.eobjs/publicbin.{cmi,cmo,cmt}
|
||||||
ocamlopt .publicbin.eobjs/publicbin.{cmx,o}
|
ocamlopt .publicbin.eobjs/publicbin.{cmx,o}
|
||||||
ocamlopt publicbin.exe
|
ocamlopt publicbin.exe
|
||||||
|
|
||||||
Private dependencies shouldn't make the library optional
|
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]
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
$ printf titi > x
|
$ 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)
|
sh (internal) (exit 1)
|
||||||
DIFF
|
DIFF
|
||||||
$ cat x
|
$ cat x
|
||||||
titi
|
titi
|
||||||
|
|
||||||
$ jbuilder promote --display short
|
$ dune promote --display short
|
||||||
Promoting _build/default/x.gen to x.
|
Promoting _build/default/x.gen to x.
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
|
|
||||||
$ jbuilder build --display short --diff-command false @blah
|
$ dune build --display short --diff-command false @blah
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
|
|
||||||
Otherwise this test fails on OSX
|
Otherwise this test fails on OSX
|
||||||
$ jbuilder clean --display short
|
$ dune clean --display short
|
||||||
|
|
||||||
$ printf titi > x
|
$ 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)
|
sh (internal) (exit 1)
|
||||||
DIFF
|
DIFF
|
||||||
Promoting _build/default/x.gen to x.
|
Promoting _build/default/x.gen to x.
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
$ jbuilder build --display short --diff-command false @blah
|
$ dune build --display short --diff-command false @blah
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
This behavior is surprising, we should get an error about the fact
|
This behavior is surprising, we should get an error about the fact
|
||||||
that ${@} is not quoted and doesn't contain exactly 1 element
|
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:
|
Error: Rule failed to generate the following targets:
|
||||||
- x
|
- x
|
||||||
- y
|
- y
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder build @runtest @install-file --display short
|
$ dune build @runtest @install-file --display short
|
||||||
refmt bar.re.ml
|
refmt bar.re.ml
|
||||||
ocamldep pp/reasononlypp.depends.ocamldep-output
|
ocamldep pp/reasononlypp.depends.ocamldep-output
|
||||||
ocamldep ppx/reasonppx.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
|
||||||
sh stderr,stdout
|
sh stderr,stdout
|
||||||
diff alias runtest
|
diff alias runtest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder build --display short @install
|
$ dune build --display short @install
|
||||||
ocamldep alib/alib.ml.d
|
ocamldep alib/alib.ml.d
|
||||||
ocamldep alib/main.ml.d
|
ocamldep alib/main.ml.d
|
||||||
ocamldep blib/blib.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}
|
ocamlc a/ppx/.a.objs/a.{cmi,cmo,cmt}
|
||||||
ocamlopt a/ppx/.a.objs/a.{cmx,o}
|
ocamlopt a/ppx/.a.objs/a.{cmx,o}
|
||||||
ocamlopt a/ppx/a.{a,cmxa}
|
ocamlopt a/ppx/a.{a,cmxa}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ jbuilder runtest --display short
|
$ dune runtest --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamldep bar_no_unix.ml.d
|
ocamldep bar_no_unix.ml.d
|
||||||
ocamldep bar_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/.utop/utop.ml.d
|
||||||
ocamldep forutop/forutop.ml.d
|
ocamldep forutop/forutop.ml.d
|
||||||
ocamlc forutop/.forutop.objs/forutop.{cmi,cmo,cmt}
|
ocamlc forutop/.forutop.objs/forutop.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#warnings "-40";;
|
#warnings "-40";;
|
||||||
|
|
||||||
open Jbuilder;;
|
open Dune;;
|
||||||
open Import;;
|
open Import;;
|
||||||
open Action.Infer.Outcome;;
|
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.deps) ~f:Path.to_string,
|
||||||
List.map (Path.Set.to_list x.targets) ~f:Path.to_string)
|
List.map (Path.Set.to_list x.targets) ~f:Path.to_string)
|
||||||
[%%expect{|
|
[%%expect{|
|
||||||
val p : ?error_loc:Usexp.Loc.t -> string -> Jbuilder.Import.Path.t = <fun>
|
val p : ?error_loc:Usexp.Loc.t -> string -> Dune.Import.Path.t = <fun>
|
||||||
val infer : Jbuilder.Action.t -> string list * string list = <fun>
|
val infer : Dune.Action.t -> string list * string list = <fun>
|
||||||
|}]
|
|}]
|
||||||
|
|
||||||
infer (Copy (p "a", p "b"));;
|
infer (Copy (p "a", p "b"));;
|
||||||
|
|
|
@ -45,7 +45,7 @@ let main () =
|
||||||
Toploop.initialize_toplevel_env ();
|
Toploop.initialize_toplevel_env ();
|
||||||
List.iter
|
List.iter
|
||||||
[ "src/stdune/.stdune.objs"
|
[ "src/stdune/.stdune.objs"
|
||||||
; "src/.jbuilder.objs"
|
; "src/.dune.objs"
|
||||||
]
|
]
|
||||||
~f:Topdirs.dir_directory;
|
~f:Topdirs.dir_directory;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#warnings "-40";;
|
#warnings "-40";;
|
||||||
|
|
||||||
open Jbuilder;;
|
open Dune;;
|
||||||
open Import;;
|
open Import;;
|
||||||
|
|
||||||
Filename.extension "toto.titi";;
|
Filename.extension "toto.titi";;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#warnings "-40";;
|
#warnings "-40";;
|
||||||
|
|
||||||
open Jbuilder;;
|
open Dune;;
|
||||||
open Import;;
|
open Import;;
|
||||||
|
|
||||||
(* Check that [of_alist_multi] groups elements in the right order *)
|
(* Check that [of_alist_multi] groups elements in the right order *)
|
||||||
|
@ -15,6 +15,6 @@ String.Map.of_list_multi
|
||||||
]
|
]
|
||||||
|> String.Map.to_list;;
|
|> String.Map.to_list;;
|
||||||
[%%expect{|
|
[%%expect{|
|
||||||
- : (Jbuilder.Import.String.Map.key * int list) list =
|
- : (Dune.Import.String.Map.key * int list) list =
|
||||||
[("a", [1; 2; 3]); ("b", [1; 2])]
|
[("a", [1; 2; 3]); ("b", [1; 2])]
|
||||||
|}]
|
|}]
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
(modules (expect_test))
|
(modules (expect_test))
|
||||||
(link_flags (-linkall))
|
(link_flags (-linkall))
|
||||||
(modes (byte))
|
(modes (byte))
|
||||||
(libraries (unix jbuilder compiler-libs.toplevel test_common))))
|
(libraries (unix dune compiler-libs.toplevel test_common))))
|
||||||
|
|
||||||
(ocamllex (expect_test))
|
(ocamllex (expect_test))
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps (tests.mlt
|
(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)
|
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi)
|
||||||
(files_recursively_in toolchain.d)
|
(files_recursively_in toolchain.d)
|
||||||
(files_recursively_in findlib-db)))
|
(files_recursively_in findlib-db)))
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps (filename.mlt
|
(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)))
|
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi)))
|
||||||
(action (chdir ${SCOPE_ROOT}
|
(action (chdir ${SCOPE_ROOT}
|
||||||
(progn
|
(progn
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps (import_dot_map.mlt
|
(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)))
|
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi)))
|
||||||
(action (chdir ${SCOPE_ROOT}
|
(action (chdir ${SCOPE_ROOT}
|
||||||
(progn
|
(progn
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps (action.mlt
|
(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)))
|
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi)))
|
||||||
(action (chdir ${SCOPE_ROOT}
|
(action (chdir ${SCOPE_ROOT}
|
||||||
(progn
|
(progn
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps (path.mlt
|
(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)))
|
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi)))
|
||||||
(action (chdir ${SCOPE_ROOT}
|
(action (chdir ${SCOPE_ROOT}
|
||||||
(progn
|
(progn
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#warnings "-40";;
|
#warnings "-40";;
|
||||||
|
|
||||||
open Jbuilder
|
open Dune
|
||||||
open Import
|
open Import
|
||||||
|
|
||||||
let print_pkg ppf pkg =
|
let print_pkg ppf pkg =
|
||||||
|
@ -13,8 +13,7 @@ let print_pkg ppf pkg =
|
||||||
#install_printer String_map.pp;;
|
#install_printer String_map.pp;;
|
||||||
|
|
||||||
[%%expect{|
|
[%%expect{|
|
||||||
val print_pkg : Format.formatter -> Jbuilder.Findlib.Package.t -> unit =
|
val print_pkg : Format.formatter -> Dune.Findlib.Package.t -> unit = <fun>
|
||||||
<fun>
|
|
||||||
|}]
|
|}]
|
||||||
|
|
||||||
let findlib =
|
let findlib =
|
||||||
|
@ -25,7 +24,7 @@ let findlib =
|
||||||
;;
|
;;
|
||||||
|
|
||||||
[%%expect{|
|
[%%expect{|
|
||||||
val findlib : Jbuilder.Findlib.t = <abstr>
|
val findlib : Dune.Findlib.t = <abstr>
|
||||||
|}]
|
|}]
|
||||||
|
|
||||||
let pkg =
|
let pkg =
|
||||||
|
@ -34,7 +33,7 @@ let pkg =
|
||||||
| Error _ -> assert false;;
|
| Error _ -> assert false;;
|
||||||
|
|
||||||
[%%expect{|
|
[%%expect{|
|
||||||
val pkg : Jbuilder.Findlib.Package.t = <package:foo>
|
val pkg : Dune.Findlib.Package.t = <package:foo>
|
||||||
|}]
|
|}]
|
||||||
|
|
||||||
(* "foo" should depend on "baz" *)
|
(* "foo" should depend on "baz" *)
|
||||||
|
@ -56,7 +55,7 @@ let meta =
|
||||||
|> Meta.load ~name:"foo"
|
|> Meta.load ~name:"foo"
|
||||||
|
|
||||||
[%%expect{|
|
[%%expect{|
|
||||||
val meta : Jbuilder.Meta.Simplified.t =
|
val meta : Dune.Meta.Simplified.t =
|
||||||
{ name = "foo"
|
{ name = "foo"
|
||||||
; vars =
|
; vars =
|
||||||
(requires =
|
(requires =
|
||||||
|
@ -85,7 +84,7 @@ let conf =
|
||||||
~toolchain:"tlc" ~context:"<context>"
|
~toolchain:"tlc" ~context:"<context>"
|
||||||
|
|
||||||
[%%expect{|
|
[%%expect{|
|
||||||
val conf : Jbuilder.Findlib.Config.t =
|
val conf : Dune.Findlib.Config.t =
|
||||||
{ vars =
|
{ vars =
|
||||||
[ (FOO_BAR, { set_rules =
|
[ (FOO_BAR, { set_rules =
|
||||||
[ { preds_required = [ "tlc"; "env" ]
|
[ { 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;;
|
#install_printer env_pp;;
|
||||||
|
|
||||||
[%%expect{|
|
[%%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
|
let env = Findlib.Config.env conf
|
||||||
|
|
||||||
[%%expect{|
|
[%%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
|
open OpamParserTypes
|
||||||
let main _lex _lexbuf fn =
|
let main _lex _lexbuf fn =
|
||||||
assert (fn = "jbuilder.opam");
|
assert (fn = "dune.opam");
|
||||||
{ file_contents = []
|
{ file_contents = []
|
||||||
; file_name = fn
|
; file_name = fn
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
(library
|
(library
|
||||||
((name re)
|
((name re)
|
||||||
(flags (:standard -w -50))
|
(flags (:standard -w -50))
|
||||||
(synopsis "Internal Jbuilder library, do not use!")))
|
(synopsis "Internal Dune library, do not use!")))
|
||||||
|
|
Loading…
Reference in New Issue