dsheets / codoc

OCaml documentation generator
34 stars 5 forks source link

Support incremental linking and indexing #78

Open lpw25 opened 9 years ago

lpw25 commented 9 years ago

Assuming that I am reading the code correctly, it seems that the only way to get any meaningful resolution is to run codoc link on an index file (or directory containing such a file), which then performs linking on all files in the index, against all other files in the index.

Ideally, I would like to separate out the list of files for which linked xml is to be produced, from the list of files against which links can be resovled (which should be a superset of the first list).

Something like:

codoc link -I bar/index.xml foo/index.xml -o linked/foo/index.xml

which would read each file in the foo/index.xml index and resolve all the references to files that are either in foo/index.xml or bar/index.xml, and output the resulting linked files in linked/foo/index.xml.

This would allow linking to be done incrementally.

dsheets commented 9 years ago

Yes, this isn't supported right now but should be.

dsheets commented 9 years ago

I believe this is actually currently possible using -o and --package and linking a file path. There is currently no way to link against trees that are not subtrees of a common root, however. Also, the phasing of index generation needs to be worked on.