WoW 2.0 introduced many 'hit' and other type messages which have no source, only skill, e.g:
"Firewall hits Someone for 100 fire damage."
In Parser-1.1, the 'source' in hit was documented as non-optional, I'm afraid if I simply add the new patterns to Parser-1.1, which have a info.source == nil or false, it might break those mods which do not check info.source existence before using it.
So should I make it Parser-1.2 simply for the new patterns, or just add the new patterns and let the authors update their mods in case they got errors when receiving hit with info.source == nil?
The combat log patterns keep changing every patch, I don't think it's a good idea to increment the major version whenever there are new incompatible patterns. So I'm going to directly change info.source to be an optional field for the related types, I'll wait for a week or two before uploading the new patterns, if anyone has different opinions please let me know.
Maybe make a new ParserLib constant, like ParserLib_UNKNOWN or ParserLib_NONE, and just set it to that. Then 1.1 mods would not break but just see strange values and know to update their code.
It works, but also makes the API inconsistent (some are nil/false and some are ParserLib_NONE), I'm not sure if this is a good idea?
How about combining both: Make it ParserLib_NONE and leave it for a while for the authors to notice and update. They should add a check: "if info.source and info.source ~= ParserLib_NONE then ... "
After sometime I'll remove the ParserLib_NONE and make it nil/false, the author updated code still works, but they can remove the "and info.source ~= ParserLib_NONE" after they notice the second update.