[pmwiki-users] Re: recipes on core elements
Joachim Durchholz
jo at durchholz.org
Fri Sep 2 09:57:37 CDT 2005
Radu wrote:
> I'll just go ahead and implement it, then put it up and let maintainers
> comment/improve on it if they feel like.
Do as you please :-)
I predict all kinds of trouble though. Either (1) you won't detect all
relevant changes, or (2) you'll detect changes that are irrelevant, or
(3) you'll be in for a whole lot of dependency tracing in PmWiki.
Examples for the cases:
1) You may overlook a function that your code is calling or overriding.
Might not be an issue if you're calling/overriding something very
simple, of course (but then checking whether a change induces breakage
isn't that difficult if you do it manually - IOW this case limits what
you can gain).
OTOH after fifteen revisions of a more advanced (read: complicated)
recipe, done by more than one recipe author, you'll have difficulties
tracking the list of called/overridden functions. In other words, you'll
get into a maintenance problem - in a year or two.
2) A function that you're calling/overriding is modified to fix a bug.
Or to extend its functionality (none of which is needed by your code).
3) Your recipe is calling/overriding foo(), which in turn calls bar().
Or foo() may call things through a table, which means you have to
monitor the table's contents (that latter case probably isn't very
common, but it's definitely a boundary where watching PmWiki's source
for changes doesn't help anymore).
The issue isn't that it isn't useful - you'll certainly get some
warnings that will help you along. To me, it's unclear that the effort
is worth the effect though. Well, maybe it's worth the effort if you're
checking just very few very simple functions that are unlikely to change.
My stance is also somewhat weak because I don't have a better
alternative. So if you feel it's necessary, go ahead :-)
One last advice: it's probably better to do that function change
checking during installation. Checking whenever pmwiki.php is called up
will just burden the system. (Consider others who start to use the same
kind of checking - imagine a dozen or more recipes, all scanning large
parts of the PmWiki sources to see whether there are changes. It's not
*too* bad - markup table construction and application probably takes
more time - but it's an unnecessary inefficiency.)
Regards,
Jo
More information about the pmwiki-users
mailing list