Bug 150250 - Use unique message identifiers
Summary: Use unique message identifiers
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-11 09:49 EDT by Matthew Webster CLA
Modified: 2013-06-24 11:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Webster CLA 2006-07-11 09:49:21 EDT
You can tell I have an IBM product background. An example would be something like: “AJCL0001I AspectJ Weaver Version 1.5.0 built on Tuesday Dec 20, 2005 at 12:05:54 GMT” .Unique alphanumeric IDs have a number of benefits:
1.	They act as a key when moving messages to a separate text file. We already have such a file for the weaver but use a short name instead for the key. The ID could be combined with the key
2.	The combination of an ID and separate file facilitate message translation. This has already been done for AJDT (Bug 112320 “Translations for AJDT”). We may also be required to do this for AspectJ if we become an Eclipse Tools project especially as many of our messages are now issued at runtime and will be seen by a wider range of users.
3.	Even if messages are not issued in a particular national language an ID can be easier to find amongst a host of other messages produced by a complex system be it a build or runtime situation. Messages are often split if multiple threads are involved.
4.	Unique IDs aid testing and would allow AspectJ to be tested with non-English message files. Today if the text of a message changes tests that look for the message may also need to change. With a message ID the test can specify which one it is looking for an optionally any inserts.
5.	By using the right convention it should be easier to quickly identify which component (compiler, weaver, loadtime, runtime, …) issued the message.

I have hinted at a possible format for AspectJ message IDs in my example but I am open to suggestions. The only requirements are the it should be unique, compact and identify the origin of the message. Above we have “AJC”=AspectJ, “L”=loadtime, “0001” and “I”=info. You could the have “C”=compiler, “A”=ajde and “W”=weaver. Also “E”=error, “W”=warning and “V”=weaveInfo.
Comment 1 Andrew Clement CLA 2013-06-24 11:05:26 EDT
unsetting the target field which is currently set for something already released