add spec dependency
[ikiwiki] / doc / bugs / conflicts.mdwn
1 The `conflicts` testcase has 4 failing test cases. The underlaying problem 
2 is that there are multiple possible source files that can create the same
3 destination files.
4
5 1. `foo.mdwn` is in srcdir, rendered to destdir. Then
6    it is removed, and `foo` is added, which will be rendered
7    raw to destdir. Since the `foo/` directory still exists,
8    it fails.
9 1. `foo` is added to srcdir, rendered raw to destdir.
10    Then it is removed from srcdir, and `foo.mdwn` is added.
11    The `foo` file is still present in the destdir, and mkdir
12    of the directory `foo/` fails.
13 1. `foo.mdwn` renders to `foo/index.html`. Then `foo/index.html`
14    is added to the srcdir, using rawhtml. It renders to the same 
15    thing.
16 1. `foo/index.html` in srcdir is rendered to same thing in destdir
17    using rawhtml. Then `foo.mdwn` is added; renders same thing.
18
19 Note that another case, that of page `foo.mdwn` and page `foo.txt`, that
20 both render to `foo/index.html`, used to cause problems, but no longer
21 crashes ikiwiki. It now only complains in this situation, and which
22 file "wins" is undefined. The fix for this relied on both pages being
23 named `foo`; but in the above cases, the source files have different
24 pagenames.
25
26 One approach: Beef up checking in `will_render` to detect when the same
27 destination file is rendered by multiple pages. Or when one page renders
28 a file that is a parent directory of the rendered file of another page.
29 It could warn, rather than erroring. The last page rendered would "win";
30 generating the destdir file.
31
32 [[done]]