Skip to content

Commit

Permalink
fix: remove check for [.dune] files (#8611)
Browse files Browse the repository at this point in the history
These files are absolutely ancient and there's nobody out there still
has them. We were supposed to get rid of this warning in 3.0, but
there's no reason to not do it now.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Sep 11, 2023
1 parent 8eb5af4 commit 05d5468
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 51 deletions.
2 changes: 2 additions & 0 deletions doc/changes/8611.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Remove warning against `.dune` files generated by pre dune 2.0 (#8611,
@rgrinberg)
17 changes: 0 additions & 17 deletions src/dune_rules/findlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,6 @@ let hash { stdlib_dir; paths; builtins; ext_lib } =

let findlib_predicates_set_by_dune = Ps.of_list [ P.ppx_driver; P.mt; P.mt_posix ]

let check_dot_dune_exists ~dir ~dir_contents name =
match dir_contents with
| Error _ -> ()
| Ok fnames ->
let fname = sprintf "%s.dune" (Lib_name.to_string name) in
if List.mem fnames fname ~equal:String.equal
then
User_warning.emit
~loc:(Loc.in_file (Path.relative dir fname))
[ 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."
]
;;

let has_double_underscore s =
let len = String.length s in
len >= 2
Expand All @@ -98,7 +82,6 @@ let has_double_underscore s =
let to_dune_library (t : Findlib.Package.t) ~dir_contents ~ext_lib =
let loc = Loc.in_file t.meta_file in
let add_loc x = loc, x in
check_dot_dune_exists ~dir:t.dir ~dir_contents t.name;
let archives = Findlib.Package.archives t in
let obj_dir = Obj_dir.make_external_no_private ~dir:t.dir in
let modes : Lib_mode.Map.Set.t =
Expand Down

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions test/blackbox-tests/test-cases/old-dune-subsystem.t/run.t

This file was deleted.

0 comments on commit 05d5468

Please sign in to comment.