Skip to content

add positional context to compiler error messages #86

@kkoreilly

Description

@kkoreilly

It would make debugging the compiler a lot easier if the error messages indicated the file and line number where they took place.

For example, instead of this error message:

failed to compile package encoding/json: failed to write declarations: failed to write function body: failed to write block statement: failed to write statement in block: failed to write assignment statement: failed to write argument: unhandled string conversion: string

It would be good to get something like this:

/Users/me/path/to/stdlib/encoding/json/marshal.go:45: failed to compile package encoding/json: failed to write declarations: failed to write function body: failed to write block statement: failed to write statement in block: failed to write assignment statement: failed to write argument: unhandled string conversion: string

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions