go-delve/delve · info
%s:%d: %v
Error message
%s:%d: %v
What it means
The fallback branch of decorateError: when the starlark call frame position has no column information, the error is prefixed as `file:line: err`. It exists so all builtin errors are located, even when position metadata lacks a column.
Source
Thrown at pkg/terminal/starbind/starlark.go:391
if ctx, ok := thread.Local(dlvContextName).(context.Context); ok {
select {
case <-ctx.Done():
return ctx.Err()
default:
}
}
return nil
}
func decorateError(thread *starlark.Thread, err error) error {
if err == nil {
return nil
}
pos := thread.CallFrame(1).Pos
if pos.Col > 0 {
return fmt.Errorf("%s:%d:%d: %v", pos.Filename(), pos.Line, pos.Col, err)
}
return fmt.Errorf("%s:%d: %v", pos.Filename(), pos.Line, err)
}
type EchoWriter interface {
io.Writer
Echo(string)
Flush()
}
// execFileOptions is a wrapper around starlark.ExecFileOptions.
// If no options are provided, it uses default options.
func execFileOptions(opts *syntax.FileOptions, thread *starlark.Thread, path string, source any, env starlark.StringDict) (starlark.StringDict, error) {
if opts == nil {
opts = defaultSyntaxFileOpts
}
return starlark.ExecFileOptions(opts, thread, path, source, env)
}
// evalOptions is a wrapper around starlark.EvalOptions.View on GitHub (pinned to a23773e6c3)
Solutions
- Locate the indicated line in the script and check the builtin call there.
- Fix the underlying error message after the line number.
- If column info is consistently missing and hampers debugging, report it upstream with the script.
Defensive patterns
Strategy: try-catch
Try / catch
err := env.Execute(...)
if err != nil {
// message shape: "<file>:<line>: <cause>"
parts := strings.SplitN(err.Error(), ": ", 3)
log.Printf("script error at %s line %s: %s", parts[0], parts[1], parts[2])
} Prevention
- Treat the line number as approximate when no column is present
- Inspect the entire statement on the reported line
When it happens
Trigger: Builtin errors raised from contexts where thread.CallFrame(1).Pos.Col == 0, e.g. errors produced during execution of code loaded without column info or from predeclared helpers.
Common situations: Scripts run via Execute where errors surface with only line numbers; users must inspect the whole line rather than an exact column.
Related errors
- %s:%d:%d: %v
- panic executing starlark script: %v
- %s is not a function
- wrong number of arguments for %s
- unknown argument %q
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/aa9f050ebce1bdb2.
Report an issue: GitHub.