diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 17:49:01 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 17:49:01 +0200 |
| commit | 71e8d83a094b90b7aa4a30fcc7e719d6399b85f4 (patch) | |
| tree | 140bf50f41776d75a71ef2368485ba73018236f3 /tools | |
| parent | a2654a1e4d8987a251bcefbad2b0f0b867a6c6e6 (diff) | |
| download | colitur-71e8d83a094b90b7aa4a30fcc7e719d6399b85f4.tar.gz colitur-71e8d83a094b90b7aa4a30fcc7e719d6399b85f4.zip | |
tools(bootstrap_sanctoral): name.pl is optional, not required
lectio's regenerated tridentine-calendar.ini (the fix that corrects the
15-entry rank cluster and adds the 5 missing entries this branch
re-bootstraps from) has 5 entries with no name.pl field at all
(agnes-secundo, boniface-martyr, eusebius-confessor, evaristus, theodore --
all either newly added or newly un-hidden). parse_names previously required
name.pl unconditionally (`field sec "name.pl"`, which dies on absence) --
correct for a source that always had it, wrong now that it legitimately
does not.
Names.t is an open, per-language assoc list (names.mli) with no rule that
every entry must carry every language colitur happens to know about, so
requiring pl here was this tool's own invented constraint, not a kernel
one. Falls back to an en-only Names.t when pl is absent, never a
placeholder string.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/bootstrap_sanctoral.ml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/bootstrap_sanctoral.ml b/tools/bootstrap_sanctoral.ml index 19adc0b..4135518 100644 --- a/tools/bootstrap_sanctoral.ml +++ b/tools/bootstrap_sanctoral.ml @@ -155,10 +155,25 @@ let parse_subject sec = | Some s -> s | None -> die "section [%s]: unknown class %S" sec.name raw) +(* name.en is always required; name.pl is not -- the 2026-08-12 re-bootstrap + (RG16(a) blast-radius task) found 5 of the source's 322 entries missing it + outright (agnes-secundo, boniface-martyr, eusebius-confessor, evaristus, + theodore -- all 5 either newly added or newly un-hidden by lectio's own + generator fix, never previously reachable through this tool at all, since + every entry the OLD ini shipped happened to carry both languages). Prior + to this the field was unconditionally required (`field sec "name.pl"`, + which `die`s on absence) -- correct for a byte-faithful mirror of a + source that always had it, wrong once the source legitimately does not: + Names.t itself is an open, per-language assoc list (names.mli) with no + rule that every entry must carry every language colitur happens to know + about, so requiring pl here was this tool's own invented constraint, not + a kernel one. Falling back to en-only (never a placeholder string) is the + same posture the kernel takes elsewhere for a genuinely absent field. *) let parse_names sec = let en = field sec "name.en" in - let pl = field sec "name.pl" in - Names.of_list [ (Lang.of_string_exn "en", en); (Lang.of_string_exn "pl", pl) ] + match field_opt sec "name.pl" with + | Some pl -> Names.of_list [ (Lang.of_string_exn "en", en); (Lang.of_string_exn "pl", pl) ] + | None -> Names.of_list [ (Lang.of_string_exn "en", en) ] (* reading.* is deliberately ignored -- Plan 4's lectionary bootstrap. *) let convert_entry sec : V.rank Layer.entry = |
