Skip to content

Commit

Permalink
Change the default target to @all
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Jul 26, 2019
1 parent 04b8b8a commit 88bbe36
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 10 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

- Enable `(explicit_js_mode)` by default. (#1941, @nojb)

- Add an option to clear the console in-between builds with
- Add an option to clear the console in-between builds with
`--terminal-persistence=clear-on-rebuild`

- Stop symlinking object files to main directory for stanzas defined `jbuild`
Expand All @@ -43,6 +43,8 @@
- Define (paths ...) fields in (context ...) definitions in order to set or
extend any PATH-like variable in the context environment. (#2426, @nojb)

- Change default target from `@install` to `@all`. (#2449, @rgrinberg)

1.11.0 (23/07/2019)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion src/build_system.ml
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ end = struct
String.Map.set aliases "default"
{ deps = Path.Set.empty
; dyn_deps =
(Alias0.dep_rec_internal ~name:"install" ~dir ~ctx_dir
(Alias0.dep_rec_internal ~name:"all" ~dir ~ctx_dir
>>^ fun (_ : bool) ->
Path.Set.empty)
; actions = Appendable_list.empty
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/byte-code-only/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ocamldep src/.foo.objs/foo.ml.d
ocamlc src/.foo.objs/byte/foo.{cmi,cmo,cmt}
ocamlc src/foo.cma
ocamlc bin/toto.bc

Check that building a native only executable fails
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" dune build --display short native-only/foo.exe
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/dune-project-edition/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Test that using menhir automatically update the dune-project file

$ echo '(library (name x)) (menhir (modules x))' >> src/dune
$ dune build
$ dune build @install
Info: Appending this line to dune-project: (using menhir 2.0)
$ cat dune-project
(lang dune 2.0)
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github1529/run.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Reproduction case for #1529: using an extension when no dune-project
file is present.

$ dune build
$ dune build @install
Info: Creating file dune-project with this contents:
| (lang dune 2.0)
Info: Appending this line to dune-project: (using menhir 2.0)
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github1549/run.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Reproduction case for #1549: too many parentheses in installed .dune files

$ dune build --root backend
$ dune build @install --root backend
Entering directory 'backend'

$ cat backend/_build/install/default/lib/dune_inline_tests/dune-package
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github2033/run.t
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
. should be allowed in c names
$ dune build
$ dune build @install
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/optional/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Various tests for optional libraries
Regression test for non-wrapped optional libraries with missing
dependencies (#1281):

$ dune build
$ dune build @install

Interaction between `@all` and optional libraries:

Expand Down
25 changes: 24 additions & 1 deletion test/blackbox-tests/test-cases/private-public-overlap/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ public libraries may not have private dependencies
Error: Library "privatelib" is private, it cannot be a dependency of a public
library.
You need to give "privatelib" a public name.
ocamldep .privatelib.objs/privatelib.ml.d
ocamlc .privatelib.objs/byte/privatelib.{cmi,cmo,cmt}
ocamlc privatelib.cma
ocamldep .publiclib.objs/publiclib.ml.d
ocamlopt .privatelib.objs/native/privatelib.{cmx,o}
ocamlopt privatelib.{a,cmxa}
ocamlopt privatelib.cmxs
[1]

On the other hand, public libraries may have private preprocessors
$ dune build --display short --root private-rewriter
Entering directory 'private-rewriter'
ocamlc .ppx_internal.objs/byte/ppx_internal.{cmi,cmo,cmt}
ocamlc ppx_internal.cma
ocamlopt .ppx_internal.objs/native/ppx_internal.{cmx,o}
ocamlopt ppx_internal.{a,cmxa}
ocamlopt ppx_internal.cmxs
ocamlopt .ppx/56104176c8a6db31b669b5ba60470694/ppx.exe
ppx mylib.pp.ml
ocamldep .mylib.objs/mylib.pp.ml.d
Expand All @@ -36,8 +44,16 @@ Unless they introduce private runtime dependencies:
a public library.
You need to give "private_runtime_dep" a public name.
ocamlc .private_ppx.objs/byte/private_ppx.{cmi,cmo,cmt}
ocamlc private_ppx.cma
ocamldep .private_runtime_dep.objs/private_runtime_dep.ml.d
ocamlc .private_runtime_dep.objs/byte/private_runtime_dep.{cmi,cmo,cmt}
ocamlc private_runtime_dep.cma
ocamlopt .private_ppx.objs/native/private_ppx.{cmx,o}
ocamlopt private_ppx.{a,cmxa}
ocamlopt private_ppx.cmxs
ocamlopt .private_runtime_dep.objs/native/private_runtime_dep.{cmx,o}
ocamlopt private_runtime_dep.{a,cmxa}
ocamlopt private_runtime_dep.cmxs
ocamlopt .ppx/6100aaab21a64480982f84e67ccfce18/ppx.exe
ppx mylib.pp.ml
ocamldep .mylib.objs/mylib.pp.ml.d
Expand All @@ -50,7 +66,14 @@ However, public binaries may accept private dependencies
ocamlc .publicbin.eobjs/byte/publicbin.{cmi,cmo,cmt}
ocamlopt .publicbin.eobjs/native/publicbin.{cmx,o}
ocamlopt publicbin.exe
ocamldep .privatelib.objs/privatelib.ml.d
ocamlc .privatelib.objs/byte/privatelib.{cmi,cmo,cmt}
ocamlc privatelib.cma
ocamlc publicbin.bc
ocamlopt .privatelib.objs/native/privatelib.{cmx,o}
ocamlopt privatelib.{a,cmxa}
ocamlopt privatelib.cmxs

Private dependencies shouldn't make the library optional
$ dune build --display short --root optional
$ dune build @install --display short --root optional
Entering directory 'optional'
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/use-meta/run.t
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$ dune build && dune exec -- ocamlfind opt -package foobarlib -linkpkg main.ml -o main.exe && ./main.exe
$ dune build @install && dune exec -- ocamlfind opt -package foobarlib -linkpkg main.ml -o main.exe && ./main.exe
foobarlib
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/variants/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ variants and finally default implementation.

Check that variant data is installed in the dune package file.

$ dune build --root dune-package
$ dune build @install --root dune-package
Entering directory 'dune-package'
$ cat dune-package/_build/install/default/lib/a/dune-package
(lang dune 2.0)
Expand Down

0 comments on commit 88bbe36

Please sign in to comment.