Documentation
¶
Overview ¶
Package legacy reads manifests stored in an earlier release's shape: it rewrites retired names and shapes into the current ones, in place, and says which deprecated fields a document still holds. It is pure: it knows a document's fields, never a store or a codec.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Rewrite ¶
Rewrite mutates a parsed manifest document in place for one release's worth of backward compatibility with names two earlier schemas retired: Goal's level value "team" (the first one's retired name, and its predecessor "functional", the second one's retired name) both become "strategic"; a Goal at "strategic" with no parent (the first one's root level, before the second split it into Pillar and Strategic) becomes "pillar"; and the KeyResult/KPI baseline and target date fields ("asOf"/"by", now plain "date" on both, since the parent object already names the grouping). The admitted-unknown baseline shape ({unknownReason, expectedBy}) is untouched: there the date means something different (when the baseline will be set), and neither earlier schema ever renamed it.
Returns one human-readable note per field actually rewritten (empty when the document was already in the current shape), so ImportDir can print what changed, once per file.
Types ¶
type Field ¶
Field is a deprecated field a document still holds, at its path.
func Deprecated ¶
Deprecated refuses, in a draft being written, a field that is read from older manifests but never written. Accepted, it would be checked as what it once meant and fail later with a message about something else: a gap's measuredBy is read as a data source, so an agent that meant the KPI measuring the gap heard about a missing data source at propose. Saved manifests are still read and folded as before.