X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6c5f315970b0e7a8473e9a1151229459781192a8..2cab8880ad61f9d134b56c5eed952c1a48f4ea8a:/doc/bugs/depends_simple_mixup.mdwn?ds=inline diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 2ebd53e85..a5910d02e 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -31,7 +31,7 @@ type DEPEND_LINKS. So, a tag page that inlines `tagged(foo)` gets a `depends_simple` built up that contains link dependencies for *every* page in the wiki. A very bloaty way to represent the dependency! -Per [[dependency_types]], `link(done)` only needs to list in +Per [[todo/dependency_types]], `link(done)` only needs to list in `depends_simple` the pages that currently match. If a page is modified to add the link, the regular dependency calculation code notices that a new page matches. If a page that had the link is modified to remove it, @@ -44,9 +44,11 @@ is modified to add the link, the regular dependency calculation code didn't notice, since the pagespec no longer matched. In this case, `depends_simple` needs to contain all pages -that do *not* match `link_done)`, but before my change, it contained +that do *not* match `link(done)`, but before my change, it contained all pages that *do* match. After my change, it contained all pages. +---- + So, seems what is needed is a way for influence info to be manipulated by the boolean operations that are applied. One way would be to have two sets of influences be returned, one for successful matches, and one for @@ -57,3 +59,30 @@ For failed `match_link`, the failed influence would be the page. Then, when NOTting a `*Reason`, swap the two sets of influences. When ANDing/ORing, combine the individual sets. Querying the object for influences should return only the successful influences. + +---- + +Would it be possible to avoid the complication of maintianing two sets of +influence info? + +Well, notice that the influence of `pagespec_match($page, "link(done)")` +is $page. Iff the match succeeds. + +Also, the influence of `pagespec_match($page, "!link(done)")` is +$page. Iff the (overall) match succeeds. + +Does that hold for all cases? If so, the code that populates +`depends_simple` could just test if the pagespec was successful, and +if not, avoid adding $page influences, while still adding any other, +non-$page influences. + +---- + +Hmm, commit f2b3d1341447cbf29189ab490daae418fbe5d02d seems +thuroughly wrong. So, what about influence info for other matches +like `!author(foo)` etc? Currently, none is returned, but it should +be a content influence. (Backlink influence data seems ok.) + +---- + +[[done]] again!