To whom should error messages be written?

Jordan K. Hubbard jkh at
Wed Jul 16 10:35:13 PDT 2008

On Jul 15, 2008, at 11:43 PM, Ryan Schmidt wrote:

> I think we should write error messages to the end user, not the
> portfile developer. I think we should also have a new page in the
> wiki called ErrorMessages, where we can list the error messages that
> MacPorts might print along with explanations of what the portfile
> author should do about them. We would describe mtree violations and
> ineffectual reinplaces and checksum failures (the checksum failure
> discussion would move to this new page from the FAQ).

I think you've highlighted an important point ("what audience are  
these messages for?") but I don't necessarily see this as an either/or  
scenario.  Both types of messages are important, depending on the  
context, we've just done a poor job of segregating them and allowing  
the user or developer to select which types they want.  I think  
there's enough goop being generated at this point that it would be a  
fine (and comparatively easy) project to add some classification  
attributes to each messages and then enhance the port command to allow  
messages to be emitted by classification (with, of course, some good  
defaults for naive users).  This is the ASL approach, and while it's  
taken awhile for ASL to gain traction in MacOSX, people are already  
using it to do some rather sophisticated log generation and  
scraping.   I understand that these are not log messages, but they're  
close enough in spirit and form that we should take a page from ASL's  
book when it comes to attributes and uniform structure of each  
message.  This would be particularly helpful for debugging messages,  
where we've currently dumped so much stuff into one big "debug bucket"  
that it becomes increasingly more difficult to read the output of port  

- Jordan

More information about the macports-dev mailing list