Monorepo management for opam overlays
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "monopam: drop is_setup_only_sublib allowlist"

This reverts commit ecc09d8ea144c14f085ed372cd847da0275f8dd0.

+15 -1
+15 -1
lib/lint.ml
··· 590 590 files; module-name candidates are derived from the library name plus 591 591 its dune [(name ...)] internal alias when one exists. *) 592 592 593 + (** Libraries that exist only for link-time or setup side-effects: CLI 594 + output styling, OS-specific clocks, C stubs registered via the runtime, 595 + and similar. They are routinely declared in [(libraries ...)] without 596 + ever opening a module, so the textual Dead_lib check always flags them 597 + as false positives. *) 598 + let is_setup_only_sublib lib = 599 + match lib with 600 + | "fmt.tty" | "fmt.cli" | "fmt.top" | "logs.cli" | "logs.fmt" 601 + | "logs.threaded" | "eio.runtime_events" | "eio.unix" | "eio_main" 602 + | "ptime.clock.os" | "ptime.clock.jsoo" | "wire.stubs" | "wire.3d" 603 + | "dune-build-info" | "dune-configurator" | "nox-crypto.ocaml" -> 604 + true 605 + | _ -> false 606 + 593 607 let dead_libs_in_subtree ~fs ~public_to_internal ~archive_modules ~subtree 594 608 subtree_path = 595 609 let dune_files = dune_files_in ~fs subtree_path in ··· 608 622 let libs = libs_of_fields fields in 609 623 List.filter_map 610 624 (fun lib -> 611 - if is_builtin lib then None 625 + if is_builtin lib || is_setup_only_sublib lib then None 612 626 else 613 627 let candidates = 614 628 module_candidates ~public_to_internal