Skip to content

zed disregards file_scan_exclusions at startup and deep-scans directories that were excluded #21040

@eric-seppanen

Description

@eric-seppanen

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I have been developing a fuse filesystem, and during development testing, I often mount to a path mnt right in my development tree. I added mnt to my file_scan_exclusions setting (and verified it disappears from the left pane as a result).

However, when I (re)start Zed (manually or because of an update), I can see in my fuse filesystem logs that Zed is deep-scanning the entire tree inside my fuse filesystem. Because this is a virtual filesystem that is arbitrarily large, this manifests as a blank editor window with an empty left pane and little functionality (e.g. I can't browse my project's files).

If I close the malfunctioning Zed window, the filesystem scanning continues: there is a zed-editor process in the background that keeps running until I unmount the fuse filesystem.

I can see (from my fuse filesystem logs) that it is traversing every directory and repeatedly trying to access .git and .gitignore in every possible path.

If I start the fuse filesystem after Zed is running, everything works normally.

I'm not sure how to share steps to reproduce this because running a fuse filesystem in the development tree is a bit exotic. My guess is that even without fuse, something like strace would be able to confirm that Zed is ignoring file_scan_exclusions and scanning excluded paths during some phase of startup? I'm open to ideas for gathering data that would help.

Environment

Zed: v0.162.5 (Zed)
OS: Linux Wayland ubuntu 24.04
Memory: 31.1 GiB
Architecture: x86_64
GPU: Intel(R) Graphics (RPL-P) || Intel open-source Mesa driver || Mesa 24.0.9-0ubuntu0.2

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

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

Unfortunately, when this scan/hang occurs nothing is printed to Zed.log.

Metadata

Metadata

Assignees

Labels

awaiting infoIssue that needs more information from the userlarge projectsFor anything relating to large volumes of files or multiple subprojects in one main project.performanceFeedback for performance issues, speed, memory usage, etcreproducibleVerified steps to reproduce included

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions