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
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
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.
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.