Hugo: Handle change in ignoreFiles on livereload

Created on 27 Mar 2016  路  4Comments  路  Source: gohugoio/hugo

Not sure if this is a new issue or another regression from @spf13 s partial re-read.

Bug Keep

Most helpful comment

I've created a fix for the issues @robertfirek mentioned in his comment as well as #2168, neither of which depend on ignoreFiles. Fix is in #2179.

Hugo doesn't check ignoreFiles when watching or rereading yet and definitely should. I think it's too big of a change to make right before a release, so tabling this fix until that release is out.

All 4 comments

So the ignoreFiles works, but modifying this setting while watching has unpredictable results. Not very critical.

@bep I think it is more critical then you expect.

For example IntelliJ IDEA by default auto-save files. This IDE creates temporary files with the suffix ___jb_tmp___ with the new content and when you stop modifying file it moves all changes from this file to the original file and removes the temporary files. This process is fast enough to corrupt hugo live reloading, because:

  1. hugo receives the system change event for the temporary files
  2. IDE removes the temporary file.
  3. hugo starts processing system events, but the temporary file doesn't exist.
  4. Below error hangs hugo (other changes doesn't trigger Hugo changes)
INFO: 2016/05/24 12:47:39 site.go:831: rereading from  /hugo_test/content/blog/post.md___jb_tmp___

By changing code I figured out that the error was no such file or directory.

This problem problem doesn't appear in v0.15

Version: Build from sources (commit: efae41c18659f29029f09f86876b4f9c28e7a181)
System: OS/X
Go Version: 1.6

I've created a fix for the issues @robertfirek mentioned in his comment as well as #2168, neither of which depend on ignoreFiles. Fix is in #2179.

Hugo doesn't check ignoreFiles when watching or rereading yet and definitely should. I think it's too big of a change to make right before a release, so tabling this fix until that release is out.

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

Was this page helpful?
0 / 5 - 0 ratings