trail: Converted all dependencies to presence dependencies.
[ikiwiki] / doc / bugs / trail_excess_dependencies.mdwn
1 I've just modified the trail plugin to use only presence, and not
2 content dependencies. Using content dependencies, particularly to the page
3 that defines the trail, meant that every time that page changed, *every*
4 page in the trail gets rebuilt. This leads to users setting up sites that
5 have horrible performance, if the trail is defined in, for example, the top
6 page of a blog.
7
8 Unfortunatly, this change to presence dependencies has
9 introduced a bug. Now when an existing trail is removed, the pages in the
10 trail don't get rebuilt to remove the trail (both html display and state).
11
12 I think that to fix this bug, the plugin should use a hook to 
13 force rebuilding of all the pages that were in the trail, when
14 the trail is removed (or changed).
15
16 There's a difficulty in doing that: The needsbuild hook runs before the scan
17 hook, so before it has a chance to see if the trail directive is still there.
18 It'd need some changes to ikiwiki's hooks.
19
20 (An improvement in this area would probably simplify other plugins, which
21 currently abuse the needsbuild hook to unset state, to handle the case
22 where the directive that resulted in that state is removed.)
23
24 I apologise for introducing a known bug, but the dependency mess was too
25 bad to leave as-is. And I have very little time (and regrettably, even less
26 power) to deal with it right now. :( --[[Joey]]