From 51e6dc3388febf2c5cb01837e56647e9e48bc917 Mon Sep 17 00:00:00 2001 From: smcv Date: Fri, 11 Jul 2014 17:54:59 -0400 Subject: [PATCH] new todo, opinions welcome --- ..._can_result_in_excessive_dependencies.mdwn | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/todo/pagespec__95__match__95__list_can_result_in_excessive_dependencies.mdwn 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]] -- 2.39.5