Documentation
¶
Overview ¶
Package compat is filex's compatibility window for what storage plugins and apps send it.
⚠⚠ The rule (docs/CONTRIBUTING.md → "Compatibility window for plugins and apps"): when a newer form replaces an old one - a signature format, a manifest field, a bridge call, a host function - the old form keeps working, with a warning, for at least Rule.Minors minor releases and Rule.Months months, whichever is longer, counted from the release that shipped the replacement. A plugin or an app published (built, signed) for that release therefore runs unchanged through the window. Only after it may a release refuse the old form, and only when the CHANGELOG of an earlier, published release announced that removal.
windows.json is the one place a window is written. The code that still accepts an old form reads its end from here (Get, Window.Until), the sentences that name the end take it as {version} and {date}, and web/tests/docs/compatWindow.test.ts holds the docs and the CHANGELOG to the same numbers. A window is never deleted: the release that finally refuses the old form sets `removed` (and `announced`, the earlier release whose CHANGELOG said so), which the test checks against the rule.
Index ¶
Constants ¶
const DateLayout = "2006-01-02"
DateLayout is how a window's dates are written (ISO 8601, a day).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
Rule is how long an old form stays accepted: Minors minor releases or Months months after the release that replaced it, whichever is longer.
type Window ¶
type Window struct {
// ID names the form for code, docs and the CHANGELOG
// ("storage-build-signature-sha256").
ID string `json:"id"`
// Form says what the old form is, in one English sentence.
Form string `json:"form"`
// Since is the minor release that shipped the replacement ("0.55") and
// SinceDate that release's date ("2026-10-09"); the window counts from
// them.
Since string `json:"since"`
SinceDate string `json:"since_date"`
// Docs is the page and anchor that describe the form, from the
// repository root.
Docs string `json:"docs"`
// Announced is the release whose CHANGELOG announced the removal, and
// Removed the release that refuses the old form; both empty while it is
// accepted.
Announced string `json:"announced,omitempty"`
Removed string `json:"removed,omitempty"`
// contains filtered or unexported fields
}
Window is one old form that is still accepted (or, once Removed is set, the record of when it stopped being).
func Get ¶
Get is the window of one old form. An unknown id is a defect in the code that asks (it names a form windows.json does not hold): Get panics, and the asking package's tests reach it.