nanobox icon indicating copy to clipboard operation
nanobox copied to clipboard

Add a filter option for file watching

Open glinton opened this issue 7 years ago • 3 comments

From slack (braxton and johnrazmus): It appears some editors (phpstorm/jetbrains) do funky things when files get modified. We should add an option to ignore watching changes to these filtered files.

Proposed config name: fs_watcher_filter

glinton avatar Aug 25 '17 15:08 glinton

This would be greatly appreciated - local dev does infinite file change feedback loops all day, every day - on one of the most popular IDEs.

Sanity slowly fading...

johnrazmus avatar Aug 25 '17 16:08 johnrazmus

Hi ya'll. I was trying to tackle this one because I'm having similar trouble to @johnrazmus. @glinton I was wondering if you had a recommendation on dealing with the following for now:

:::::::::::::::::::::::::::::::::::::::::::::::::::::::: INVALID BOXFILE.YML !!!

    Oops, it looks like a few issues need to be resolved in your boxfile.yml
    before we can continue. Please correct the following issues and try again:

    ---
    run.config:
      fs_watcher_filter: "Invalid node"


    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

I'm not sure I can find where the validation is happening anywhere in the code or other related packages. Perhaps its happening externally?

I think I can temporarily hack around this to move forward in any case.

ryanjafari avatar Mar 13 '18 18:03 ryanjafari

Hey again - so it looks like this is happening in /opt/nanobox/hooks/boxfile and I don't think I can find this source in any of the repositories. I'm going to stash my work on the fs_watcher_filter option for now since I just need a small tweak (line 122 in notify.go strings.HasPrefix(name, "_") || is my problem). Plus I see ya'll are working hard on the other CLI nbx and nbx.yml. If help is still needed on this front with the new CLI I'm happy to start on this again. Excited for the new tools!

ryanjafari avatar Mar 15 '18 14:03 ryanjafari