Commit Graph
8 Commits
Author SHA1 Message Date
kolaente 3b9bc0e542 fix(plugins): exclude example plugin from module build
The example plugin is a Yaegi entrypoint evaluated at runtime through its
exported factory functions, so it has no func main. As a regular package main
it broke `go build ./...` with "function main is undeclared in the main
package".

Add //go:build ignore so the go tool skips it. Yaegi is unaffected: the loader
reads the file and calls interp.Eval on its source, which does not evaluate
build constraints.

Fixes #3478
2026-08-20 16:51:01 +02:00
kolaente 8dfb5d49ca fix: expose xorm and xormigrate to yaegi plugins
The plugin docs tell plugins to implement Migrations() returning
[]*xormigrate.Migration, but neither `xorm.io/xorm` nor
`src.techknowlogick.com/xormigrate` was in the yaegi symbol table, so an
interpreted plugin failed at the import before it could ever be loaded.

Add both packages to yaegiSymbolPackages and commit the generated symbol
tables, plus a loader test that runs an interpreted plugin migration
against a real engine.

Fixes #3501
2026-08-18 22:03:09 +02:00
kolaenteandkolaente 59abe1bd84 test(plugins): add yaegi plugin integration tests
- Smoke test: verify yaegi can load stdlib and vikunja symbols
- Loader test: load example plugin and verify Name/Version
- Routes test: verify plugin HTTP routes serve responses
- Events test: verify plugin event listener registration via Init()
2026-03-30 20:44:46 +00:00
kolaenteandkolaente cc39aa7f08 feat(plugins): add yaegi interpreter-based plugin loader
EvalPath-based loading of Go source directories with typed factory
functions for interface bridging (required by yaegi's wrapping model).

Supports all plugin capabilities: routes, events, and migrations.
Registers itself into the Manager via init() to avoid import cycles.
2026-03-30 20:44:46 +00:00
kolaenteandkolaente 1d354512e6 feat(plugins): add plugin system interfaces and manager
Add the core plugin system with four interfaces:
- Plugin: base lifecycle (Name, Version, Init, Shutdown)
- MigrationPlugin: database migrations
- AuthenticatedRouterPlugin: routes behind auth
- UnauthenticatedRouterPlugin: public routes

The Manager handles loading, initialization, shutdown, and route
registration. Includes native .so loader (marked deprecated) and
yaegi loader integration point.
2026-03-30 20:44:46 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>kolaente
9a61453e86 fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131)
Closes https://github.com/go-vikunja/vikunja/pull/2133

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: kolaente <k@knt.li>
2026-01-24 20:38:32 +01:00
kolaente e5c860afec feat(plugins): allow plugins to register routes 2025-08-01 17:06:02 +02:00
kolaente b08b43953b feat(plugins): add rudimentary plugin system 2025-08-01 17:06:02 +02:00