chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1467: Bare hashes cause confusing error message


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1467: Bare hashes cause confusing error message in scripts (was: Hash-prefixed numbers cause confusing error message in scripts)
Date: Wed, 30 May 2018 19:41:55 -0000

#1467: Bare hashes cause confusing error message in scripts
-------------------------------------+-------------------------------------
            Reporter:  sjamaan       |      Owner:  sjamaan
                Type:  enhancement   |     Status:  new
            Priority:  minor         |  Milestone:  5.1
           Component:  core          |    Version:  5.0
  libraries                          |   Keywords:  read syntax, history
          Resolution:                |  references, scripts, errors
Estimated difficulty:  easy          |
-------------------------------------+-------------------------------------
Changes (by sjamaan):

 * priority:  major => minor


Old description:

> As pointed out by erkin on IRC, when you run a script with `-ss` which
> contains something like `#0`, the error message you get is confusing if
> you don't know about csi's history references (especially given that this
> is a script, not manual input).
>
> The error is:
>
> {{{
> Error: history entry index out of range: 0
> }}}
>
> If this is the result of running a long script that somewhere contains
> `#0`, this doesn't point to the location of the issue either.
>
> Proposed possible improvements:
>
> - Add the `#` to the error message so it's clear that this syntax is
> causing it, even if you don't know what a "history index" is.
> - Include the line number (part of a larger issue in evaluated script
> code, and the hardest to implement)
> - Disable history syntax when running with `-s` or `-ss`.

New description:

 As pointed out by erkin on IRC, when you run a script with `-ss` which
 contains something like `#`, the error message you get is confusing,
 especially if you don't know about csi's history references (especially
 given that this is a script, not manual input).

 The error is:

 {{{
 Error: history entry index out of range: 0
 }}}

 If this is the result of running a long script that somewhere contains `#`
 (or just `#0`), this doesn't point to the location of the issue either.

 Proposed possible improvements:

 - Add the `#` to the error message so it's clear that this syntax is
 causing it, even if you don't know what a "history index" is. But note
 that just adding it is not going to be enough, since just `#` also
 triggers this error.
 - Give a better/different error when reading a bare `#`
 - Include the line number (part of a larger issue in evaluated script
 code, and the hardest to implement)
 - Disable history syntax when running with `-s` or `-ss`.

--

--
Ticket URL: <https://bugs.call-cc.org/ticket/1467#comment:1>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]