fix(34): WR-11 accept an inline plugins list in plugin:add again
The comment-keeping summer.yaml edit refused a flow-style plugins list
(plugins: [{id: a, module: b}]) that plugin:add used to handle with a
full rewrite. The edit now replaces an inline list, over one or several
lines, with a block list of its items plus the new ones and keeps every
other line. A list it cannot edit in place (a tagged one, say) falls
back to the full SaveManifest rewrite with a note that the comments were
not kept. plugin:install gets the same behaviour.
This commit is contained in:
@@ -86,7 +86,7 @@ summer make:plugin acme.blog
|
||||
summer plugin:add plugins/acme/blog
|
||||
```
|
||||
|
||||
`summer plugin:add` then registers the local module: it adds the plugin to `summer.yaml`, adds a `require` and a local `replace` to the application's `go.mod`, and adds the directory to `go.work`. The next `summer build` compiles the plugin in.
|
||||
`summer plugin:add` then registers the local module: it adds the plugin to `summer.yaml`, adds a `require` and a local `replace` to the application's `go.mod`, and adds the directory to `go.work`. The next `summer build` compiles the plugin in. The `summer.yaml` edit appends to the `plugins:` list and keeps the file's comments and blank lines; an inline list (`plugins: [{id: ..., module: ...}]`) is turned into a block list with the new entry. A list in a form it cannot edit in place is written out again with every plugin, and a note says the comments were not kept.
|
||||
|
||||
### Upgrading: plugins without a vendor directory
|
||||
|
||||
|
||||
Reference in New Issue
Block a user