Skip to content

Commit

Permalink
toplevel-init-file -> top
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremie Dimino <[email protected]>
  • Loading branch information
jeremiedimino committed Mar 26, 2020
1 parent f5b4635 commit 8bdbc3c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Unreleased
- `dune upgrade` will now try to upgrade projects using versions <2.0 to version
2.0 of the dune language. (#3174, @voodoos)

- Add a `toplevel-init-file` command to integrate dune with any
toplevel, not just utop. It is meant to be used with the new
`#use_output` directive of OCaml 4.11 (#2952, @mbernat, @diml)
- Add a `top` command to integrate dune with any toplevel, not just
utop. It is meant to be used with the new `#use_output` directive of
OCaml 4.11 (#2952, @mbernat, @diml)

2.4.0 (06/03/2020)
------------------
Expand Down
2 changes: 1 addition & 1 deletion bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ let all =
; Upgrade.command
; Caching.command
; Describe.command
; Toplevel_init_file.command
; Top.command
]

let common_commands_synopsis =
Expand Down
2 changes: 1 addition & 1 deletion bin/toplevel_init_file.ml → bin/top.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let man =
; `Blocks Common.help_secs
]

let info = Term.info "toplevel-init-file" ~doc ~man
let info = Term.info "top" ~doc ~man

let link_deps link ~lib_config =
List.concat_map link ~f:(fun t ->
Expand Down
6 changes: 3 additions & 3 deletions doc/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@
(files dune-subst.1))

(rule
(with-stdout-to dune-toplevel-init-file.1
(run dune toplevel-init-file --help=groff)))
(with-stdout-to dune-top.1
(run dune top --help=groff)))

(install
(section man)
(package dune)
(files dune-toplevel-init-file.1))
(files dune-top.1))

(rule
(with-stdout-to dune-uninstall.1
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox-tests/test-cases/toplevel-integration/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Test toplevel-init-file on a tiny project
> let hello () = print_endline "hello"
> EOF

$ dune toplevel-init-file
$ dune top
#directory "$TESTCASE_ROOT/_build/default/.test.objs/byte";;
#directory "$TESTCASE_ROOT/_build/default/.test.objs/native";;
#load "$TESTCASE_ROOT/_build/default/test.cma";;

$ ocaml -stdin <<EOF
> #use "topfind";;
> #use "use_output_compat";;
> #use_output "dune toplevel-init-file";;
> #use_output "dune top";;
> Test.Main.hello ();;
> EOF
hello
Expand All @@ -31,7 +31,7 @@ Test toplevel-init-file on a tiny project
> let oops () = undefined_function ()
> EOF

$ dune toplevel-init-file
$ dune top
File "error.ml", line 1, characters 14-32:
1 | let oops () = undefined_function ()
^^^^^^^^^^^^^^^^^^
Expand All @@ -41,7 +41,7 @@ Test toplevel-init-file on a tiny project
$ ocaml -stdin <<EOF
> #use "topfind";;
> #use "use_output_compat";;
> #use_output "dune toplevel-init-file";;
> #use_output "dune top";;
> EOF
File "error.ml", line 1, characters 14-32:
1 | let oops () = undefined_function ()
Expand Down

0 comments on commit 8bdbc3c

Please sign in to comment.