Numbering compiler error messages?

Johannes Pfau nospam at example.com
Fri Mar 28 01:23:26 PDT 2014


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?


More information about the Digitalmars-d mailing list