Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for old style subsystems #2480

Merged
merged 1 commit into from
Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]