Skip to content

Commit

Permalink
Change remaining log to Console.print and update test
Browse files Browse the repository at this point in the history
Signed-off-by: Ulysse Gérard <thevoodoos@gmail.com>
  • Loading branch information
voodoos committed Mar 16, 2020
1 parent ac0f2c3 commit c9e4845
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/dune/upgrader.ml
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ let rec upgrade ?(last = false) () =
let v2_updates = ref false in
let log_update dir ver =
Console.print
[ Pp.textf "Project in dir %s will be upgraded to dune %s.\n" dir ver ]
[ Pp.textf "Project in dir %s will be upgraded to dune %s." dir ver ]
in
List.iter current_versions ~f:(fun (dir, version) ->
let d = Path.Source.to_string_maybe_quoted (File_tree.Dir.path dir) in
Expand Down Expand Up @@ -694,11 +694,12 @@ let rec upgrade ?(last = false) () =
Memo.reset ();
upgrade ~last:true ()
) else if !v2_updates then
log
Console.print
[ Pp.textf
"\n\
Some projects were upgraded to dune v2. Some breaking changes may not\n\
have been treated automatically. Here is a list of things you should \
check\n\
to complete the migration:\n\
%s"
V2.todo_log
V2.todo_log ]
12 changes: 8 additions & 4 deletions test/blackbox-tests/test-cases/upgrader/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
have been treated automatically. Here is a list of things you should check
to complete the migration:

- If you use generated dune.inc files you probably should update your generators.
- If you use generated dune.inc files you probably should update your
generators.
- mli only modules must now be explicitly declared. This was previously a
warning and is now an error.
- Stop installing the `ocaml-syntax-shims` binary. In order to use
Expand All @@ -44,13 +45,16 @@
package.
- Do not put the `<package>.install` files in the source tree unless `-p` or
`--promote-install-files` is passed on the command line
- Library names are now validated in a strict fashion. Previously, invalid names
- Library names are now validated in a strict fashion. Previously, invalid
names
would be allowed for unwrapped libraries
- Stricter validation of file names in `select`. The file names of conditional
- Stricter validation of file names in `select`. The file names of
conditional
sources must match the prefix and the extension of the resultant filename.
- Modules filtered out from the module list via the Ordered Set Language must
now be actual modules.
- Stub names are no longer allowed relative paths. This was previously a warning
- Stub names are no longer allowed relative paths. This was previously a
warning
and is now an error.
- In `(diff? x y)` action, require `x` to exist and register a
dependency on that file.
Expand Down

0 comments on commit c9e4845

Please sign in to comment.