Uh oh!
There was an error while loading. Please reload this page.
doc: clarify fs.watch and inodes on linux, os x - #6099
Conversation
There was a problem hiding this comment.
@nodejs/documentation is it okay to use "you"?
There was a problem hiding this comment.
@thefourtheye It's consistent with the context, see the previous section on Availability a few lines up:
You can still use...
There was a problem hiding this comment.
@jorangreef Yes, I am not saying its not correct. I just wanted to know what the Docs WG think.
There was a problem hiding this comment.
We encourage to avoid it. Redacted myself often about this too.
I'd see this as a nit, but worthwhile.
https://github.com/nodejs/docs/blob/master/STYLE-GUIDE.md
There was a problem hiding this comment.
In general I'd like to see us move away from the informal use of "you" as a best practice. It will take a while to eliminate past usage but I'd prefer not to introduce new instances of it :-)
stevemao
commented
Apr 7, 2016
I would link |
jorangreef
commented
Apr 7, 2016
Thanks @stevemao, it's linked to "Linux and OS X systems" in the markdown. Do you mean that everything is fine as is? Or would you like any changes? |
Knighton910
commented
Apr 7, 2016
LGTM when added |
eljefedelrodeodeljefe
commented
Apr 7, 2016
LGTM with nits: you, brackets. Sorry if this was in the discussion, but does the same thing apply for BSDs too? Can be added after landing, since the writing is not exclusive about this. |
jasnell
commented
Apr 7, 2016
Generally LGTM but would prefer some of the nits addressed. |
There was a problem hiding this comment.
@jorangreef
I meant maybe we could link inode to http://www.linux.org/threads/intro-to-inodes.4130/ here
There was a problem hiding this comment.
The link is just an example. If there is better one use that. :)
jorangreef
commented
Apr 8, 2016
Sure, will make the suggested changes. |
jorangreef
commented
Apr 8, 2016
@eljefedelrodeodeljefe I did not test on BSD so I am not sure if it applies (it probably does). Linux and OS X were used as examples because these notes are aimed at users coming from Windows who might not expect |
jorangreef
commented
Apr 8, 2016
Done, with suggestions applied. |
eljefedelrodeodeljefe
commented
Apr 8, 2016
@jorangreef fair enough, thx. LGTM then. |
Knighton910
commented
Apr 8, 2016
+1 |
There was a problem hiding this comment.
Nit... Perhaps: When a watched path is deleted and then recreated, it is assigned a new [inode][]. A notification for the deletion event will be emitted but the watch will continue on the *original* inode. Events for the new inode will not be emitted. This is expected behavior.
jasnell
commented
Apr 8, 2016
LGTM with a nit. |
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039
jorangreef
commented
Apr 9, 2016
Thanks @jasnell, updated the wording. |
jorangreef
commented
Apr 18, 2016
This should be ready to merge now? |
eljefedelrodeodeljefe
commented
Apr 18, 2016
Yeah. I think he was just incredible busy since then with a conference and related stuff. Guess there will be around when this lands soon. Still LGTM and a friendly ping to @jasnell. |
jasnell
commented
Apr 18, 2016
Yep, sorry! LGTM! :-) |
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell
commented
Apr 18, 2016
Landed in 88c35e7 |
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: nodejs#5039 PR-URL: nodejs#6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an inode. This clarifies that `fs.watch()` watches the inode and not the path. If the inode of the path subsequently changes, `fs.watch()` will continue watching the original inode and events for the path will no longer be emitted. This is expected behavior. Fixes: #5039 PR-URL: #6099 Reviewed-By: James M Snell <jasnell@gmail.com>
fatonsopa
commented
Oct 30, 2017
Hi guys, this is still happening: npm -v 3.10.10 The file.watch is triggering the change only once per file. In windows is working perfectly. Researched a lot but couldn't find a working solution. Any idea? Thanks, |
thefourtheye
commented
Nov 2, 2017
@fatonsopa That is the expected behavior. This PR just documented it properly. |
fatonsopa
commented
Nov 2, 2017
@thefourtheye Thanks. I didn't get the PR! |
Checklist
Affected core subsystem(s)
doc
Description of change
On Linux and OS X systems,
fs.watchresolves the watched path to aninode. This clarifies that
fs.watchwatches the inode and not thepath. If the inode of the path subsequently changes,
fs.watchwillcontinue watching the original inode and events for the path will no
longer be emitted. This is expected behavior.
Fixes: #5039