Skip to content

Commit

Permalink
Remove support for old style subsystems (#2480)
Browse files Browse the repository at this point in the history
Remove support for old style subsystems
  • Loading branch information
rgrinberg authored Aug 1, 2019
2 parents 19c8af5 + 90b5f60 commit 18e4b62
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 119 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
The global configuration merely specifies the default.
(#2213, @aalekseyev, @jdimino)

- Remove support for old style subsystems. Dune will now emit a warning to
reinstall the library with the old style subsystem. (#2480, @rgrinberg)

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

Expand Down
14 changes: 10 additions & 4 deletions src/findlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,17 @@ module Package = struct
let to_dune t =
let loc = loc t in
let add_loc x = (loc, x) in
let sub_systems =
match dune_file t with
| None -> Sub_system_name.Map.empty
| Some p -> Installed_dune_file.load p
let () =
dune_file t
|> Option.iter ~f:(fun p ->
User_warning.emit ~loc:(Loc.in_file p)
[ Pp.text
".dune files are ignored since 2.0. Reinstall the library with \
dune >= 2.0 to get rid of this warning and enable support for \
the subsystem this library provides."
])
in
let sub_systems = Sub_system_name.Map.empty in
let archives = archives t in
let obj_dir = Obj_dir.make_external_no_private ~dir:t.dir in
let modes : Mode.Dict.Set.t =
Expand Down
3 changes: 0 additions & 3 deletions src/installed_dune_file.boot.ml

This file was deleted.

103 changes: 0 additions & 103 deletions src/installed_dune_file.ml

This file was deleted.

9 changes: 0 additions & 9 deletions src/installed_dune_file.mli

This file was deleted.

9 changes: 9 additions & 0 deletions test/blackbox-tests/test-cases/old-dune-subsystem/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ we understand the old files.

$ env OCAMLPATH=install/lib dune runtest --root example
Entering directory 'example'
File "$TESTCASE_ROOT/install/lib/dune_inline_tests/dune_inline_tests.dune", line 1, characters 0-0:
Warning: .dune files are ignored since 2.0. Reinstall the library with dune
>= 2.0 to get rid of this warning and enable support for the subsystem this
library provides.
File "src/dune", line 3, characters 25-42:
3 | (inline_tests (backend dune_inline_tests)))
^^^^^^^^^^^^^^^^^
Error: dune_inline_tests is not an inline tests backend
[1]

0 comments on commit 18e4b62

Please sign in to comment.