fix(kiosk): fetch a required plugin module whose replace directory is missing
A plugin developed inside an application replaces its required plugins with sibling directories (../user). Checked out on its own, that directory is missing and plugin.yaml lost the minimum (golem15.user: ""), so the manifest differed between the two layouts and TestPluginManifest could not pass in both. Such a module is now fetched at the version go.mod requires, as a consumer would see it. - listedModule.fallback marks a local replace whose directory is absent - fallback modules download separately, so one unfetchable version does not hold up the others - TestDeriveMissingReplace over a file:// proxy (offline)
This commit is contained in:
@@ -17,7 +17,7 @@ WinterCMS keeps this data in a plugin's `Plugin.php` `pluginDetails()` and in `c
|
||||
- One `plugin.yaml` per plugin package directory, so a repository with a nested plugin carries two files.
|
||||
- `kiosk.ReadIdentity` reads `ID()` and `Requires()` statically with `go/parser`: a string literal, a constant of the same package, of another package of the module, or of a package in a module `go.mod` requires. It never builds or runs plugin code, and `summer plugin:add` reads plugin IDs with it too.
|
||||
- A schema version (`kiosk.SchemaVersion`) and a fixed header line (`kiosk.Header`); a manifest with a newer schema is refused with a hint to update summer.
|
||||
- Go-style minimums: `framework` is the `go.mod` require of `kiosk.FrameworkModule`, and each required plugin gets the version its module is required at. A requirement at `v0.0.0` is an error (not a released version); a pseudo-version is accepted with a warning.
|
||||
- Go-style minimums: `framework` is the `go.mod` require of `kiosk.FrameworkModule`, and each required plugin gets the version its module is required at. A requirement at `v0.0.0` is an error (not a released version); a pseudo-version is accepted with a warning. A required module replaced by a local directory that is not there (a plugin developed inside an application, checked out on its own) is fetched at its required version, so the manifest is the same in both layouts.
|
||||
- Name and description overrides (`--name`, `--description`) stored in an `overrides:` block that regeneration keeps.
|
||||
- The registry API v1 contract in Go: `kiosk.RegistryAPIPath` and the wire types (`kiosk.ListResponse`, `kiosk.DetailResponse`, `kiosk.VersionsResponse`, `kiosk.ErrorResponse`, `kiosk.IngestRequest`, `kiosk.IngestResponse`). The registry server encodes with them and the summer tool and the admin decode with them, so the JSON shape exists once.
|
||||
- Strict version rules: `kiosk.ValidVersion` (only `vX.Y.Z`), `kiosk.CompareVersions`, `kiosk.BaseVersion` for `git describe` output, `kiosk.Satisfies` for Go-style minimums, `kiosk.NewestCompatible` to pick the release an application can install, and `kiosk.Newer` with `kiosk.Comparable` to tell whether a release is an upgrade for an installed version (a release, a `git describe` string or a pseudo-version), so an update never goes back.
|
||||
|
||||
Reference in New Issue
Block a user