doclog icon indicating copy to clipboard operation
doclog copied to clipboard

[Feature Request] Regenerate only changed files

Open razetime opened this issue 1 year ago • 1 comments

As of now doclog seems to require a make clean to remove any output files before generating docs.

The generation process itself is quite slow. I think having it store timestamps and regenerate only changed documentation would be very helpful. Any other method that avoids unnecessarily regenerating files would also be nice.

razetime avatar May 25 '24 04:05 razetime

I think it's a worthy request. Probably a system that calculates the hashes of the source files and stores them in a meta-file in the output directory could be more robust.

If someone wants to implement it by themselves, please comment it here. Otherwise, I'll keep it in my backlog.

aarroyoc avatar May 25 '24 19:05 aarroyoc

I was thinking of the same request. Include the hashes of Scryer executable and doclog commit as well, so if the software changes everything is rebuilt.

dougransom avatar Jul 25 '25 16:07 dougransom

Could this be done with something like cmake? I

dougransom avatar Oct 07 '25 14:10 dougransom

No, that would be an overkill. I was thinking on how to implement this. One option I can think of is to read the last modified date of all files in the output folder and taking the newest one. If a source file has a newer modification date than the output date, then we should generate that file. Maybe there are some edge cases, but it could work reasonably well for fast edits.

EDIT: The problem would be deletions. The output folder won't delete previous files that no longer exist, but it might be just a minor inconvenience.

aarroyoc avatar Oct 07 '25 20:10 aarroyoc

Please, test the new version that supports incremental builds for file contents (it doesn't support sidebars and footer updates), but should help while developing docs for a specific library.

aarroyoc avatar Oct 11 '25 13:10 aarroyoc