MGS1104: this program does not link the Buzz engine
A Go program asked the magus library to evaluate a magusfile, and the program was built without the Buzz engine that evaluates one. The load stops there.
[MGS1104] cannot evaluate /repo/magusfile.buzz: this program does not link the
Buzz engine; add the blank import _ "github.com/egladman/magus/buzzengine" to
its main package
The magus command links the engine, so this only reaches a program that
imports github.com/egladman/magus as a library.
Why
The library does not link the engine on its own, so a program that never evaluates a magusfile does not carry the Buzz VM.
The alternative to failing is silence. A workspace loaded without its
magusfiles has no custom targets, no magus.project() settings and no
per-target policy, and it renders exactly like a workspace that declares none.
Only one of those is true, and nothing in the result says which.
So the load returns *types.EngineNotLinkedError instead of a partial
workspace. A workspace with no magusfile still opens without the engine.
Fix
Link the engine from the program's main package:
import _ "github.com/egladman/magus/buzzengine"
Match the error from Go with errors.As:
var notLinked *types.EngineNotLinkedError
if errors.As(err, ¬Linked) {
// the program was built without buzzengine
}