src/metamodel (linkml_meta) is generated by gen-rust from a linkml checkout, but nothing
recorded which generator revision produced the committed crate. That makes a regen
unreproducible and, worse, silently destructive: a regen from the wrong revision reverts whatever
the committed crate has that the generator no longer emits.
Not hypothetical. The per-key map merge strategy (option_map_overwrite, which keeps a
slot_usage override of annotations from dropping the inherited ones) was missing from the
generator branch that happened to be checked out; a regen would have replaced it with whole-map
overwrite_except_none and no test would have failed.
What was added
The criterion, corrected
The first version of this issue required the generator PRs to be merged before a regenerated
crate could land here. That was wrong, and it would have parked every regen behind an upstream
review queue. Naming the changes is enough: the stamp lists the PRs, and applying them on top of
linkml/main and running ./regen.sh reproduces the crate. A generator fix has to be
identifiable — pushed, with a PR open — not merged.
Status
Done, via #115: the metamodel is regenerated, --check is clean against the stamped revision, and
the stamp names linkml/linkml#3919 as the change needed to reproduce it.
The per-PR tracking issues stay open until they merge upstream and drop out of the stamp on a later
regen: #108 (now fixed here), #110, #111.
Two loose ends, neither worth its own issue: src/metamodel/Cargo.toml~ is a committed editor
backup, and --check needs a local linkml checkout so it cannot run in CI as-is.
src/metamodel(linkml_meta) is generated bygen-rustfrom a linkml checkout, but nothingrecorded which generator revision produced the committed crate. That makes a regen
unreproducible and, worse, silently destructive: a regen from the wrong revision reverts whatever
the committed crate has that the generator no longer emits.
Not hypothetical. The per-key map merge strategy (
option_map_overwrite, which keeps aslot_usageoverride ofannotationsfrom dropping the inherited ones) was missing from thegenerator branch that happened to be checked out; a regen would have replaced it with whole-map
overwrite_except_noneand no test would have failed.What was added
./regen.sh --checkregenerates into a temp dir, formats it the same way, and diffs against thecommitted crate without writing anything (chore(metamodel): make regeneration reproducible, and pin down the dropped-typeof bug #112).
./regen.shstampssrc/metamodel/GENERATED_FROMwith the generator revision used and withevery generator change it needed that is not in
linkml/main, each resolved to the PR carryingit (chore(metamodel): regenerate to fix the dropped typeof:/abstract: keys #115).
determine the output (chore(metamodel): regenerate to fix the dropped typeof:/abstract: keys #115).
The criterion, corrected
The first version of this issue required the generator PRs to be merged before a regenerated
crate could land here. That was wrong, and it would have parked every regen behind an upstream
review queue. Naming the changes is enough: the stamp lists the PRs, and applying them on top of
linkml/mainand running./regen.shreproduces the crate. A generator fix has to beidentifiable — pushed, with a PR open — not merged.
Status
Done, via #115: the metamodel is regenerated,
--checkis clean against the stamped revision, andthe stamp names
linkml/linkml#3919as the change needed to reproduce it.The per-PR tracking issues stay open until they merge upstream and drop out of the stamp on a later
regen: #108 (now fixed here), #110, #111.
Two loose ends, neither worth its own issue:
src/metamodel/Cargo.toml~is a committed editorbackup, and
--checkneeds a local linkml checkout so it cannot run in CI as-is.