Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for manually refreshing projects when inotify/fsevents unavailable (e.g. on nfs file shares) #20044

Open
1 task done
kscott-1 opened this issue Oct 31, 2024 · 8 comments
Labels
bug [core label] linux reproducible Verified steps to reproduce included

Comments

@kscott-1
Copy link

kscott-1 commented Oct 31, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Within a pre-existing git repository locally cloned on remote machine, running git pull will not populate the dock with any new folders created from the pull.

Environment

Local-
Zed: v0.159.6 (Zed)
OS: macOS 15.1.0
Memory: 36 GiB
Architecture: aarch64

Remote-
OS: Rocky 8.8 / Linux 4.18.0-477.10.1
Architecture: x86-64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response

@kscott-1 kscott-1 added admin read bug [core label] labels Oct 31, 2024
@notpeter

This comment was marked as resolved.

@kscott-1

This comment was marked as resolved.

@notpeter
Copy link
Member

notpeter commented Oct 31, 2024

When this happens is there anything notable in your local logs (cmd-shift-p, 'zed: logs') or in your remote logs (server-workspace-*.log under ~/.local/share/zed/logs)?

Also:

grep -H ''  /proc/sys/fs/inotify/max_user_watches
cat /proc/self/limits | grep 'Max open files'

@notpeter notpeter added linux remote dev Feedback for remote development servers and removed triage labels Oct 31, 2024
@kscott-1
Copy link
Author

When this happens is there anything notable in your local logs (cmd-shift-p, 'zed: logs') or in your remote logs (server-workspace-*.log under ~/.local/share/zed/logs)?

Nothing appeared in the logs when I looked through. I can try to reproduce the bug when I have a chance.

grep -H ''  /proc/sys/fs/inotify/max_user_watches
cat /proc/self/limits | grep 'Max open files'

max_user_watches:975744
soft:1024 hard:262144

@notpeter notpeter changed the title Remote Development: git pull new directory does not appear in dock Remote Development: git pull new directory does not appear in project panel Oct 31, 2024
@mati865
Copy link

mati865 commented Nov 1, 2024

Is your project on a remote machine stored on a local file system or a networked one, like NFS?

@kscott-1
Copy link
Author

kscott-1 commented Nov 1, 2024

Is your project on a remote machine stored on a local file system or a networked one, like NFS?

NFS file system

@mati865
Copy link

mati865 commented Nov 1, 2024

This is the culprit, as I suppose you are mounting it and hosting it on a different machine.
Inotify is a kernel mechanism, so it works correctly only on the host of the filesystem.

I mean if you open the project in any IDE (Zed, JetBrains, Atom, VS Code, etc.) that is located on NFS from within the host of the file system, it will work correctly. However, if you mount the same file system on another machine (let's call it a client), Inotify won't work. This is because the client kernel doesn't perform write operations, and instead the requests are sent via network to the host of the filesystem.

@notpeter
Copy link
Member

notpeter commented Nov 4, 2024

Without support for inotify (Linux) or FSEvents (Mac) there is currently no way for Zed to be notified of changes. Thus Zed would need to periodically poll the entire project tree to identify if anything has changed (as well as maintain a cache of file inodes to make it possible to detect those changes).

@notpeter notpeter changed the title Remote Development: git pull new directory does not appear in project panel Support for manually refreshing projects when inotify/fsevents unavailable (e.g. on nfs file shares) Nov 4, 2024
@ConradIrwin ConradIrwin removed the remote dev Feedback for remote development servers label Nov 12, 2024
@notpeter notpeter added the reproducible Verified steps to reproduce included label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] linux reproducible Verified steps to reproduce included
Projects
None yet
Development

No branches or pull requests

5 participants