fix(34): CR-02 install plugins of an installed module at its version
plugin:install pinned only modules chosen in the same plan, so a second plugin package in a module the application already required was installed at the newest release, moving the plugin already there, and with --source the repository was cloned a second time. PlanInstall now seeds every module of summer.yaml: a plugin in one installs at the installed version with no go get or clone (only its summer.yaml entry), and is refused with a plugin:update hint when that version has no release of it or is not a release. A git URL whose repository is already a submodule, or whose module the application has, is refused.
This commit is contained in:
@@ -110,6 +110,8 @@ The plugin is installed as a Go module: one `go get <module>@<version>` in the a
|
||||
|
||||
A plugin's `requires` (from its `plugin.yaml`, as the registry lists it for the chosen release) are installed with it. For each required plugin the application does not have yet, the command picks the newest release that the framework version meets and that is at least the required minimum, then resolves that plugin's own requirements the same way. Required plugins come first in the list and in `summer.yaml`, and all module installs go through a single `go get`, so Go's minimal version selection sees the whole set. Two plugins that ship in the same module are installed from the same release of it.
|
||||
|
||||
A plugin in a module the application already has, such as a second plugin package in the repository of one that is installed, is installed at the version the application has and moves nothing: no `go get`, no second clone, only its `summer.yaml` entry (the plan marks it `module already in the application`). This holds with `--source` too, in whatever form the module is installed. When the registry has no release of the plugin at that version, or the version is not a release (a pseudo-version, an untagged checkout), the command stops and names `summer plugin:update` for the installed plugin. A git URL whose repository is already a submodule of the application, or whose module the application already has, is refused.
|
||||
|
||||
A required plugin the application already has is not touched, but its version must be at least the minimum: the go.mod require for a module install, the tag `git describe` finds for a plugin checked out as a submodule. When it is older, the command stops and tells you to run `summer plugin:update <id>` first. A version it cannot read, such as that of a plugin kept in the application's own repository, is accepted with a warning. Requirements that form a cycle in the registry data are reported as an error.
|
||||
|
||||
### Confirmation
|
||||
|
||||
Reference in New Issue
Block a user