---
title: "MGS1039: magus is called without being imported"
description: Fires when a magusfile, spell or Buzz script calls magus\ without importing it. magus was bound implicitly until v0.5.0 made it an ordinary host module.
tags: [MGS1039, magusfile, spells, imports, upgrade, buzz]
---

# MGS1039: magus is called without being imported

A file calls `magus\` and has no `import "magus";`:

```text
[error] [MGS1039] [BZZ1001] buzz: line 1:1: undefined: magus: add `import "magus";`
to the file; magus is an imported module since v0.5.0
```

## Why

Before v0.5.0 magus bound `magus` into every magusfile, spell and script whether or not
the file imported it. It is now an ordinary host module, imported like `fs` or `http`, so
a program's own declarations are not shadowed by a name it never asked for. A file that
relied on the implicit binding fails to load, and the checker's own error
([BZZ1001](https://github.com/egladman/magus/blob/main/libs/gopherbuzz/docs/codes/BZZ1001.md),
an undefined name) reads like a typo rather than a migration.

## What to do

Add the import at the top of the file, beside the others:

```buzz
import "magus";
```

Nothing else changes: every `magus\` call keeps its name and signature.
