@@ -76,8 +76,6 @@ type t = {
76
76
loc : Location .t ;
77
77
section : section option ;
78
78
dir : string option ;
79
- source_trees : string list ;
80
- required_packages : string list ;
81
79
labels : Label .t list ;
82
80
legacy_labels : bool ;
83
81
contents : string list ;
@@ -200,8 +198,6 @@ let directory t = t.dir
200
198
201
199
let file t = match t.value with Include t -> Some t.file_included | _ -> None
202
200
203
- let source_trees t = t.source_trees
204
-
205
201
let non_det t =
206
202
match t.value with
207
203
| OCaml b -> b.non_det
@@ -215,32 +211,6 @@ let set_variables t = t.set_variables
215
211
216
212
let unset_variables t = t.unset_variables
217
213
218
- let explicit_required_packages t = t.required_packages
219
-
220
- let require_re =
221
- let open Re in
222
- seq [ str " #require \" " ; group (rep1 any); str " \" " ]
223
-
224
- let require_from_line line =
225
- let open Util.Result.Infix in
226
- let re = Re. compile require_re in
227
- match Re. exec_opt re line with
228
- | None -> Ok Library.Set. empty
229
- | Some group ->
230
- let matched = Re.Group. get group 1 in
231
- let libs_str = String. split_on_char ',' matched in
232
- Util.Result.List. map ~f: Library. from_string libs_str >> | fun libs ->
233
- Library.Set. of_list libs
234
-
235
- let require_from_lines lines =
236
- let open Util.Result.Infix in
237
- Util.Result.List. map ~f: require_from_line lines >> | fun libs ->
238
- List. fold_left Library.Set. union Library.Set. empty libs
239
-
240
- let required_libraries = function
241
- | { value = Toplevel _ ; contents; _ } -> require_from_lines contents
242
- | _ -> Ok Library.Set. empty
243
-
244
214
let value t = t.value
245
215
246
216
let section t = t.section
@@ -320,8 +290,6 @@ type block_config = {
320
290
dir : string option ;
321
291
skip : bool ;
322
292
version : (Label.Relation .t * Ocaml_version .t ) option ;
323
- source_trees : string list ;
324
- required_packages : string list ;
325
293
set_variables : (string * string ) list ;
326
294
unset_variables : string list ;
327
295
file_inc : string option ;
@@ -341,12 +309,6 @@ let get_block_config l =
341
309
dir = get_label (function Dir x -> Some x | _ -> None ) l;
342
310
skip = List. exists (function Label. Skip -> true | _ -> false ) l;
343
311
version = get_label (function Version (x , y ) -> Some (x, y) | _ -> None ) l;
344
- source_trees =
345
- List. filter_map (function Label. Source_tree x -> Some x | _ -> None ) l;
346
- required_packages =
347
- List. filter_map
348
- (function Label. Require_package x -> Some x | _ -> None )
349
- l;
350
312
set_variables =
351
313
List. filter_map (function Label. Set (v , x ) -> Some (v, x) | _ -> None ) l;
352
314
unset_variables =
@@ -449,8 +411,6 @@ let mk ~loc ~section ~labels ~legacy_labels ~header ~contents ~errors =
449
411
loc;
450
412
section;
451
413
dir = config.dir;
452
- source_trees = config.source_trees;
453
- required_packages = config.required_packages;
454
414
labels;
455
415
legacy_labels;
456
416
contents;
0 commit comments