[racket-dev] Error message proposal

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Jun 22 12:50:54 EDT 2012

An hour ago, Eli Barzilay wrote:
> > Meanwhile, we should look more carefully at the content of
> > specific error messages to see if we can improve either the
> > wording or the information provided in fields.

First encounter with a new(er) error message:

| link: module mismatch;
|   possibly, bytecode file needs re-compile because dependencies changed
|    importing module: "/home/eli/src/plt/collects/mzlib/runtime-path.rkt"
|    exporting module: "/home/eli/src/plt/collects/racket/private/string.rkt"
|    exporting phase level: 0
|    internal explanation: variable not provided (directly or indirectly and at the expected position)
|   in: regexp-split
|   context...:
|    /home/eli/src/plt/collects/mzlib/runtime-path.rkt: [running body]
|    standard-module-name-resolver
|    /home/eli/src/plt/collects/racket/unit.rkt: [traversing imports]
|    /home/eli/src/plt/collects/racket/main.rkt: [traversing imports]
|    /home/eli/src/plt/collects/racket/init.rkt: [traversing imports]
| /home/eli/.racketrc:3:0: #%top-interaction: unbound identifier;
|  also, no #%app syntax transformer is bound
|   at: #%top-interaction
|   in: (#%top-interaction require xrepl)

* the first batch of fields are indented by three spaces instead of
  two spaces in the following two fields.

* the second explanation line is indented by two spaces in the first
  error and by one space in the next.

* Sidenote: seeing two errors like that makes me prefer a two-space
  indentation for these things to make it more clear.

* Another sidenote: having the first line end with a ";" makes the
  semicolons on the next line be a better choice, should this be
  the common way to do these error messages?  Perhaps the existence of
  a ";" on the first line should say that the next line is the further
  explanation thing which would make it optional?  (Specifically
  making many existing uses of `error' compatible.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.