zed-industries/zed · warning · AppNotDeployedError

app ' ' not deployed (or function ' ' missing) — run…

Error message

app '{args.app_name}' not deployed (or function '{function_name}' missing) — run 'zed-eval deploy' first

What it means

The mark exists as Mark::Local but its anchor vector is empty, so there is no position to resolve and the command fails. This is an internal invariant violation of the marks data structure — a stored mark is expected to carry at least one anchor — rather than a user mistake.

Solutions

  1. Re-set the mark with ma (or the relevant mark key) and retry the command
  2. If it reproduces reliably, capture the key sequence and report it upstream — an empty anchor list should not normally be stored

Example fix

" before
:`a   " mark a exists but holds no anchors

" after
ma    " re-set the mark, which stores a fresh anchor
:`a
Defensive patterns

Strategy: type-guard

Type guard

// Treat only marks with at least one anchor as usable:
fn mark_has_position(mark: Option<Mark>) -> Option<&Anchor> {
    match mark {
        Some(Mark::Local(anchors)) if !anchors.is_empty() => anchors.last(),
        _ => None,
    }
}

Try / catch

if let Err(err) = run_mark_command(name, vim, editor, window, cx) {
    if err.to_string().contains("empty anchors") {
        // Repair by re-setting the mark rather than failing the whole command.
        re_set_mark(name, editor, vim, window, cx);
    } else {
        set_status(&err.to_string());
    }
}

Prevention

When it happens

Trigger: vim.get_mark returns Some(Mark::Local(vec![])) and anchors.last() is None: a mark that was inserted empty or whose anchors were all invalidated (buffer rollback/undo to before the mark, branch switch, or detached anchors).

Common situations: Rare; most plausible after heavy undo/git operations that invalidate every anchor behind a mark. If it reproduces with a plain key sequence, it indicates a bug worth reporting.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/de313a47a13c8a52. Report an issue: GitHub.

Appendix: source

Thrown at crates/eval_cli/zed_eval/common.py:142


def deployed_function(args: argparse.Namespace, function_name: str):
    """Look up an already-deployed Modal function. Never deploys.

    `modal.Function.from_name` resolves a published function without deploying,
    which is exactly what we want: deploying would cancel in-flight runs. We
    hydrate eagerly so a missing app/function fails here with an actionable
    message instead of deep inside a later `.spawn()`/`.remote()` call.
    """
    import modal
    from modal.exception import NotFoundError

    configure_modal_environment(args)
    function = modal.Function.from_name(args.app_name, function_name)
    try:
        function.hydrate()
    except NotFoundError as error:
        raise AppNotDeployedError(
            f"app '{args.app_name}' not deployed (or function "
            f"'{function_name}' missing) — run 'zed-eval deploy' first"
        ) from error
    return function


def modal_call_id(call: Any) -> str:
    for attribute in ("object_id", "id", "function_call_id"):
        value = getattr(call, attribute, None)
        if value:
            return str(value)
    return str(call)


def print_table(rows: list[dict[str, Any]], columns: list[tuple[str, str]]) -> None:
    if not rows:
        print("No rows")
        return

View on GitHub (pinned to f4178619ac)