aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmcv <smcv@web>2014-07-11 17:54:59 -0400
committeradmin <admin@branchable.com>2014-07-11 17:54:59 -0400
commit51e6dc3388febf2c5cb01837e56647e9e48bc917 (patch)
tree9111a37bc088ca26501601474aed69b386921d94
parent2ffd1c16800218fd2c20385dca6f67afb10273a7 (diff)
downloadikiwiki-51e6dc3388febf2c5cb01837e56647e9e48bc917.tar
ikiwiki-51e6dc3388febf2c5cb01837e56647e9e48bc917.tar.gz
new todo, opinions welcome
-rw-r--r--doc/todo/pagespec__95__match__95__list_can_result_in_excessive_dependencies.mdwn41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/todo/pagespec__95__match__95__list_can_result_in_excessive_dependencies.mdwn b/doc/todo/pagespec__95__match__95__list_can_result_in_excessive_dependencies.mdwn
new file mode 100644
index 000000000..9781f7573
--- /dev/null
+++ b/doc/todo/pagespec__95__match__95__list_can_result_in_excessive_dependencies.mdwn
@@ -0,0 +1,41 @@
+If you say
+
+ pagespec_match_list($page, $spec, list => \@pages)
+
+with a small list `@pages` and a vague pagespec `$spec`, `$page` ends
+up depending on (every page that matches) `$spec`. For instance, if you
+already have a list of subpages of the sandbox, and you want to filter it
+to only the discussion pages, you can do that like
+
+ pagespec_match_list("sandbox", "*/discussion",
+ list => ["sandbox/discussion", "sandbox/things", "sandbox/stuff"])
+
+but then a change to *any* discussion page will refresh the sandbox.
+
+The [[bugs/trails depend on everything]] bug was a particularly bad
+case of this, with the widest possible pagespec `internal(*)`
+matched against a small list (the trail).
+
+In principle it would be nice if `pagespec_match_list` could detect
+this situation and make sandbox depend on only those subpages instead.
+
+Perhaps if the `list` parameter is given, `p_m_l` should add a
+by-name (simple) dependency on each page in that list, instead
+of a dependency on the pagespec? Or perhaps it should be documented
+that plugins can pass `deptype => 0` to take responsibility for
+their own dependency handling, and then do whatever they need?
+
+Uses of `pagespec_match_list` with a non-trivial list, in-tree,
+after [[bugs/trails depend on everything]] is fixed:
+
+* brokenlinks: really does need to depend on the whole pagespec,
+ but that could be done separately
+
+* inline: the inliner already depends on the inlined pages
+ so no extra dependency is needed
+
+* pagestats: same as brokenlinks
+
+My album plugin is in the same situation as inline.
+
+--[[smcv]]