]> Lady’s Gitweb - Shushe/commit
Fix/improve recursive dependency detection 0.12.1
authorLady <redacted>
Wed, 3 Jul 2024 01:42:56 +0000 (21:42 -0400)
committerLady <redacted>
Sat, 3 Aug 2024 16:51:10 +0000 (12:51 -0400)
commitc84c2b38caf34807fd1c52a8f19fcf0af7e9807e
treeee3912d5cdc3879ee8faba8156aa664a91edf9d7
parent155d175a24d3bccf25677cc7e33314dc963da766
Fix/improve recursive dependency detection

The old method of detecting recursive dependencies was overcomplicated
and only worked in the simple case of A → B → C → A and not
A → B → C → B. This new method works as follows:

- Given a dependency path…

  - Get all of the links in the last document in the path.

  - If there are no links, return the path.

  - If there are links which point to a file in the path, it is a
    recursive dependency. Return the path ending at the point of
    recursion.

  - Otherwise (there are nonrecursive links), process each path which
    results from appending each link to the end of the current path and
    return all of them.

The algorithm ends with a set of paths to leaf nodes in the dependency
tree, and each nonroot node in this tree (leaf or branch) is a
dependency. This is what the behaviour should have been from the
beginning. (The old method attempted to process the tree in layers,
rather than as a set of paths.)
lib/expandmetadata.xslt
This page took 0.054251 seconds and 4 git commands to generate.