GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make fs.watch recursive on Windows · Issue #375 · nodejs/node

Make fs.watch recursive on Windows #375

New issue
Copy link
New issue
Copy link
Closed
Closed
Make fs.watch recursive on Windows#375
Copy link
Labels
feature requestIssues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.libuvIssues and PRs related to the libuv dependency or the uv binding.windowsIssues and PRs related to the Windows platform.

Description

@jorangreef
jorangreef
opened on Jan 14, 2015
Issue body actions

I spotted the recursive watch support for OS X in the io.js changelog.

There's a pull request for libuv at joyent/libuv#1473 to add recursive watch support for Windows but it has been sitting for a few months.

Is there anyone here who could help to get that through?

If we had recursive watch support for OS X and Windows, then Linux could be handled using a series of inotify watchers (we can't do this on Windows because it would lock every watch directory or parent thereof), and we could get a decent cross-platform watch implementation working on top of io.js.

Activity

  1. KyleAMathews commented on Jan 14, 2015

    @KyleAMathews
    KyleAMathews
    on Jan 14, 2015
    More actions

    Most people writing cross-os tools don't rely on core fs.watch but various fs.watch replacements/supplements such as https://github.com/paulmillr/chokidar

  2. bnoordhuis commented on Jan 14, 2015

    @bnoordhuis
    bnoordhuis
    on Jan 14, 2015
    Member
    More actions

    If we had recursive watch support for OS X and Windows, then Linux could be handled using a series of inotify watchers

    That won't really work - or at least, work well - due to the relatively low per-user inotify limit. It's something you can tweak through a sysctl but most people leave it at the default (for good reasons, having too many watchers seriously impacts performance.)

  3. jorangreef commented on Jan 15, 2015

    @jorangreef
    jorangreef
    on Jan 15, 2015
    Author
    More actions

    It would help to have the recursive support for Windows at least. For Linux there is no choice but to make the most of inotify as far as possible (only watching directories, not files) and then fall back to polling when inotify limits are reached. That's better than just polling to begin with. But for Windows, there's no way to use fs.watch at all at present (unless it has recursive support) because of how it locks every watched directory.

  4. Fishrock123
    added
    windowsIssues and PRs related to the Windows platform.
    on Jan 22, 2015
  5. Fishrock123
    added
    fsIssues and PRs related to file-system APIs and the fs module.
    on Feb 6, 2015
  6. bpasero commented on Feb 6, 2015

    @bpasero
    bpasero
    on Feb 6, 2015
    Contributor
    More actions

    +1 to expose the recursive option on windows. I really want to benefit from the native support of recursing and not rely on some custom solution that has to a) lock every child folder and b) consume lots of CPU/Memory while doing so.

    Please please please add this flag for windows.

  7. bnoordhuis commented on Feb 6, 2015

    @bnoordhuis
    bnoordhuis
    on Feb 6, 2015
    Member
    More actions

    @bpasero io.js accepts pull requests, you know. :-)

    Jest aside, I personally don't object to a recursive flag. The pitfalls need to be called out in the documentation, though.

  8. bpasero commented on Feb 6, 2015

    @bpasero
    bpasero
    on Feb 6, 2015
    Contributor
    More actions

    @bnoordhuis whats wrong with joyent/libuv#1473 ?

  9. bnoordhuis commented on Feb 6, 2015

    @bnoordhuis
    bnoordhuis
    on Feb 6, 2015
    Member
    More actions

    @saghul already called it out, it breaks the ABI. It's also possibly stale by now. Someone needs to pick it up and do the work of getting the necessary changes landed in libuv and io.js.

    My careful use of the word 'someone' is a hint that it won't be me. :-)

  10. Qard commented on Feb 6, 2015

    @Qard
    Qard
    on Feb 6, 2015
    Member
    More actions

    I'm also interested in this for https://github.com/qard/onchange. I don't really do Windows dev though, so I'm not sure I'd be able to put together a decent PR for this. I'm hoping someone better at Windows figures this out before I can take the time to look into it.

  11. bpasero commented on Feb 11, 2015

    @bpasero
    bpasero
    on Feb 11, 2015
    Contributor
    More actions

    @bnoordhuis I created libuv/libuv#198. I think this report can be closed as it seems to be a libuv only thing?

  12. Fishrock123
    added
    libuvIssues and PRs related to the libuv dependency or the uv binding.
    on May 26, 2015
  13. brendanashworth
    added
    feature requestIssues requesting new Node.js features.
    on Jun 5, 2015
  14. Qard commented on Aug 14, 2015

    @Qard
    Qard
    on Aug 14, 2015
    Member
    More actions

    This is in libuv as of 1.7.0, so it should get in when #2310 is merged.

  15. thefourtheye
    added a commit that references this issue on Sep 4, 2015

    doc,test: enable recursive file watching in Windows

    a338eb3
  16. silverwind commented on Sep 4, 2015

    @silverwind
    silverwind
    on Sep 4, 2015
    Contributor
    More actions

    Fixed by a338eb3

  17. silverwind
    closed this as completedon Sep 4, 2015
  18. thefourtheye
    added 7 commits that reference this issue on Sep 5, 2015

    doc,test: enable recursive file watching in Windows

    cf7e5fc

    doc,test: enable recursive file watching in Windows

    e4dfdc0

    doc,test: enable recursive file watching in Windows

    8372ea2

    doc,test: enable recursive file watching in Windows

    7038388

    doc,test: enable recursive file watching in Windows

    402bf37

    doc,test: enable recursive file watching in Windows

    f0a75ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.libuvIssues and PRs related to the libuv dependency or the uv binding.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.