Numbering compiler error messages?
Andrea Fontana
nospam at example.com
Fri Mar 28 02:37:51 PDT 2014
On Friday, 28 March 2014 at 08:25:05 UTC, Johannes Pfau wrote:
> An idea stolen from C#:
>
> How about adding a small 'error-message ID' like DPL00042 to
> every
> compiler message? This makes it easier to search for
> information about
> the error. If tools want to handle certain compiler errors then
> they can grep for the message-ID instead of the complete
> message.
>
> I thought of adding a wiki page,
> wiki.dlang.org/Compiler_Messages to
> keep a list of all messages. It's then possible to add examples,
> detailed information how to resolve an error and links to
> further
> information (e.g. changelog entry for error/warning/deprecated
> message)
> to that page.
>
> I could file a pull request which does this for all existing
> error
> messages, but it requires contributors to follow a small
> protocol
> for future error messages as we need to make sure we do not
> assign one
> ID to different messages:
>
> If you want to introduce a new error message:
> Before even opening a pull request,
> * go to wiki.dlang.org/Compiler_Messages
> * pick next free ID
> * add it to the page with status pending
> * Once stuff is merged update the description/status on the
> wiki page
>
> As an example how this could work, search for CS1002.
> So do we want this?
There's another advantage. If you want to change error message
(or add localization like in visual c++) you still can found what
the error means.
It should be easier for IDE to parse and give suggestions or
redirect to an help page to solve the problem.
More information about the Digitalmars-d
mailing list