ddfreyne on fix-prune-not-printing-on-dry-run
ddfreyne on master
Make pruner print things on dry… Merge pull request #1476 from n… (compare)
git pushwill use the default remote (which would be
origin) so maybe there’s some remote funkiness
nanoc live --live-reloadoften ends in a situation where an edit causes a refresh, but the refresh happens before the new version of a page has been written to disk. Live-reload therefore gets shown a 404 page. Apart from just playing with the LiveReload delay option, do we have any smarter solutions?
tmpand rename from there. That'd fix early reloads. Better though probably to hook into LiveReload and trigger it once compilation is finished, but I don't know whether the LiveReload library permits that.
Mkay, I'll run
inotifywait next time I'm working on my site and confirm what Nanoc's doing. Perhaps a directory gets touched (by the kernel) first, triggers inotify and LiveReload catches that.
You're claiming Nanoc's renaming files over existing files, right? It's not a delete-then-move action?
Curiously, I'm seeing a delete happen ...
19:51:36 DELETE public/articles/foo/index.html 19:51:36 CREATE public/articles/foo/index.html 19:51:36 MODIFY public/articles/foo/index.html 19:51:36 CLOSE_WRITE,CLOSE public/articles/foo/index.html
inotifywait --recursive --monitor public --format "%T %e %w%f" --timefmt "%T" -e modify -e attrib -e close_write -e moved_to -e moved_from -e move -e move_self -e create -e delete -e delete_self
createand coming up with "File not found".
force: true. Force, as per Ruby's implementation, just unlinks it before creating a new link:
deleteinotify event before
createand explains the race condition.
temp_pathis set to not a true temporary path, but the actual filename from the content directory.
content/might be hardlinked to what is in
FileUtils.identical, but check if they're hard links. If I change the hard linked file in
content, it's guaranteed to already match in
/tmp. That's not around after the compile ends. Why not move it immediately?
output, that is.