yaegi icon indicating copy to clipboard operation
yaegi copied to clipboard

Automatically keeping `yaegi extract` generated files up-to-date with `go generate`

Open karelorigin opened this issue 1 year ago • 0 comments

Proposal

Currently, there's no way to automatically synchronize extracted symbols with their respective dependencies. A go:generate directive, added to the output of Yaegi generated Go files, could help with automating the process. Implementing this feature could make synchronization as simple as calling go generate to regenerate the symbols. Removal will still need to be done manually, however.

Background

I found myself in need of this feature after having written multiple precompiled libraries that need a manual yaegi extract after each API change. This is especially cumbersome for third party dependencies.

Workarounds

The alternative is to write a script that loops over a list of dependencies and calls yaegi extract.

karelorigin avatar Dec 10 '22 23:12 karelorigin