docs: capture todo - make:plugin drops the vendor namespace

This commit is contained in:
Jakub Zych
2026-10-28 18:24:53 +01:00
parent d788d12785
commit 2bef465ecd

View File

@@ -0,0 +1,33 @@
---
title: make:plugin drops the vendor and scaffolds plugins/<name> instead of plugins/<vendor>/<name>
date: 2026-10-28
created: 2026-10-28T17:24:01.309Z
area: summercms.go internal/build
severity: major
g15office: keu1ecio
files:
- internal/build/scaffold.go:70-90
- internal/build/scaffold.go:195
- internal/build/artifact.go:454
- internal/build/leaf.go:26
- internal/build/new.go:456-462
- cmd/summer/main.go:95-130
- docs/console/scaffolding.md:82
- docs/architecture/go-modules-and-workspaces.md:93
---
## Problem
`summer make:plugin pixelpixel.servers`, run in another application on 2026-10-28, created `plugins/servers` with module `<app>/plugins/servers`. The expected location was `plugins/pixelpixel/servers`. `makePlugin` in `internal/build/scaffold.go` joins `appDir/plugins/pluginName(id)`, which keeps only the part after the dot. As a result, two vendors' plugins with the same name (`acme.blog`, `pixelpixel.blog`) cannot live in one application.
The help text (`cmd/summer/main.go`, "Create plugins/blog with the ID acme.blog") and the docs (`docs/console/scaffolding.md`, `docs/architecture/go-modules-and-workspaces.md`) describe this layout as intended. Elsewhere, plugin paths include the vendor:
- Shared plugins are mounted as submodules at `plugins/<vendor>/<name>` (`.planning/notes/core-plugins-own-repos.md`).
- WinterCMS-style YAML paths have the form `~/plugins/<vendor>/<plugin>/...` (`docs/backend/relation-manager.md`).
## Solution
- Scaffold at `plugins/<vendor>/<name>` with module path `<app>/plugins/<vendor>/<name>`. Update the existing-directory hint (`plugin:add plugins/<vendor>/<name>`) and the help examples.
- `summer new`'s `addStarterPlugin` (`internal/build/new.go`) uses the same code; decide whether the starter moves to `plugins/golem15/<name>`.
- The other `make:*` commands find a plugin through the manifest's module first and then fall back to `plugins/<name>` (`internal/build/artifact.go:454`, and `leaf.go:26` for the models-leaf check). Add a `plugins/<vendor>/<name>` fallback and keep the old one, so existing applications keep working (no breaking change).
- Update the docs pages and the tests that pin `plugins/<name>`. Add an upgrading note for applications that already have `plugins/<name>`: moving one is optional, but needs `plugin:add` or a `go.mod`/`go.work` path update.