The generated symbol tables carried 25 hand-added nil guards across three
packages, re-applied by hand after every regeneration because `yaegi extract`
does not emit them. Regeneration silently dropped them, and three package docs
instructed the next agent to put them back.
The guards also answered the wrong way. A nil WResolve returned ("", nil), so a
malformed secret engine served an empty secret and reported success; a nil
WStop reported a clean shutdown for a module that never ran one.
Reject the wrapper where it enters the daemon instead. Yaegi type-checks
"var X Iface = impl{}" and refuses an incomplete impl on its own, but the
wrapper type is exported into the symbol table, so interpreted code can build
one directly and struct-literal semantics leave the omitted method nil.
Resolve now names the missing method and skips the plugin.
Generated tables are used verbatim again. Also names the wanted type on a
failed assertion, which formatted as "want <nil>" for every interface target.
16 lines
706 B
Go
16 lines
706 B
Go
// Package logextract holds the Yaegi symbol table for
|
|
// internal/domain/eda/module/log, generated by `go generate`. Kept separate
|
|
// from the log package itself so the generated file can import it without a
|
|
// self-import cycle.
|
|
//
|
|
// The generated file is used verbatim. A wrapper whose method fields are not
|
|
// all populated is refused in yaegiutil.Resolve, so it needs no hand-added
|
|
// nil-guards -- an earlier convention that every regeneration silently undid.
|
|
package logextract
|
|
|
|
import "reflect"
|
|
|
|
//go:generate go run github.com/traefik/yaegi/cmd/yaegi extract -name logextract github.com/samcharles93/archie-core/internal/domain/eda/module/log
|
|
|
|
var Symbols = map[string]map[string]reflect.Value{}
|