Monorepo management for opam overlays
0
fork

Configure Feed

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

Fix monopam lint: add 39 missing deps, remove 2 unused, detect menhir

Add missing opam dependencies across 17 packages (vec3, bytesrw, http,
cbort, fmt, etc.) and remove unused deps (requests from respond, menhir
from sqlite). Teach monopam lint to recognize (menhir ...) dune stanzas
as requiring the menhir package. Move bytesrw dep from scitt to
atp-lexicon-scitt where it actually belongs.

+17 -9
+17 -9
lib/lint.ml
··· 207 207 | Sexp.List (Sexp.Atom n :: rest) when n = name -> Some rest | _ -> None) 208 208 sexps 209 209 210 - (** Extract all libraries from [(libraries ...)] in any build stanza. *) 210 + (** Extract all libraries from [(libraries ...)] in any build stanza, plus build 211 + tools like menhir detected from [(menhir ...)] stanzas. *) 211 212 let extract_used_libs sexps = 212 213 let from_fields fields = 213 214 match find_field "libraries" fields with ··· 220 221 | _ -> None) 221 222 libs 222 223 in 223 - List.concat_map 224 - (function 225 - | Sexp.List (Sexp.Atom kind :: fields) 226 - when List.mem kind 227 - [ "library"; "executable"; "executables"; "test"; "tests" ] -> 228 - from_fields fields 229 - | _ -> []) 230 - sexps 224 + let build_tools = 225 + List.filter_map 226 + (function 227 + | Sexp.List (Sexp.Atom "menhir" :: _) -> Some "menhir" | _ -> None) 228 + sexps 229 + in 230 + build_tools 231 + @ List.concat_map 232 + (function 233 + | Sexp.List (Sexp.Atom kind :: fields) 234 + when List.mem kind 235 + [ "library"; "executable"; "executables"; "test"; "tests" ] -> 236 + from_fields fields 237 + | _ -> []) 238 + sexps 231 239 232 240 let rec find_dune_files ~fs dir = 233 241 let eio_path = Eio.Path.(fs / Fpath.to_string dir) in