fix: support fuse-t on macOS - #20
Merged
Merged
Conversation
uhs-robert
force-pushed
the
fix/fuse-t-macos
branch
from
August 30, 2026 12:00
911f791 to
033e66b
Compare
uhs-robert
force-pushed
the
fix/fuse-t-macos
branch
from
August 30, 2026 12:42
d3cbcd3 to
d5dad75
Compare
Wrap the `sshfs --version` wait in a 2 second timeout so a hung binary cannot block Neovim indefinitely, and parse the version from combined stdout/stderr regardless of exit code, since some builds report the version on stderr or exit non-zero. Also apply stylua formatting.
The findmnt branch queried only fuse.sshfs and returned early on success, so any fuse-t mount was missed whenever findmnt was installed. Query fuse.sshfs and nfs together, request FSTYPE ahead of TARGET so the target stays the greedy trailing field, and classify each row: a fuse-t source yields a mount without remote metadata, fuse.sshfs keeps its remote spec, and unrelated NFS mounts are skipped.
Adds the regression suite issue #24 lists for this PR, on top of the shared harness. Covers fuse-t mount detection through both `mount` and `findmnt`, the absence of remote metadata (no invented remote path, display-only host fallback, no error on a missing remote spec), and the exclusion of unrelated NFS mounts. Covers the metadata-aware fallbacks: live find/grep and the on_mount auto_run presets drop to mounted-path operations, while SSH terminal actions refuse rather than dialing the mount directory name as a host. Covers SSHFS option translation for 2.x implementations, including untouched 3.x options, explicit 2.x values winning over translated ones, and the three version-probe failure modes. Covers synchronous unmounting with its clean, lazy, and force escalation order, and the move of the exit hook to VimLeavePre. The two baseline mount parsing fixtures are updated for the fields and findmnt columns this PR introduces. Refs #24
uhs-robert
added a commit
that referenced
this pull request
Aug 31, 2026
The assertion that SSHTest never runs sshfs was too broad. Once the fuse-t work in #20 lands, build_mount_command probes `sshfs --version` to decide whether to render 3.x or 2.x cache option names, so the preflight legitimately spawns sshfs without mounting anything. Narrow the assertion to what it was meant to catch: an actual mount.
# Conflicts: # lua/sshfs/lib/sshfs.lua
A failed sshfs --version probe was cached for the whole session, so one timeout silently disabled fuse-t option translation until restart. A "host:" remote spec also parsed to an empty path, which is truthy in Lua and so slipped past every `remote_path or "."` fallback.
The suite stubs OS calls, so this mainly guards the few probes that shell out for real and any future spec that forgets a stub. fuse-t itself still needs a real machine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #19 by adding compatibility for fuse-t's NFS-backed SSHFS mounts and its SSHFS 2.9 option names.
fuse-t:/... (nfs, ...)mounts in the system mount tableremote_metadata_available = falsewhen the original SSH host/path cannot be recoveredhooks.on_mount.auto_run = "live_find"/"live_grep"dir_cache→cachedcache_timeout→cache_timeoutdcache_max_size→cache_max_sizeVimLeavetoVimLeavePreArchitecture
System mount state remains authoritative for whether a mount exists. The existing lockfile remains responsible only for tracking Neovim process ownership/reference counting; this avoids conflating mount discovery with process coordination.
fuse-t's NFS mount table does not preserve the original SSH remote specification. Rather than inventing authoritative host/path data or introducing a persistent mount registry in this compatibility fix, active fuse-t mounts expose that limitation through
remote_metadata_available = false. Operations with a mounted-filesystem equivalent fall back to the mounted path; SSH-terminal actions refuse cleanly because they require a real remote host.Testing
Automated regression coverage is included, on top of the shared harness from #25. Run it with
make test.mountandfindmnt, alongside Linuxfuse.sshfsand macFUSE outputremote_metadata_available = false, keepremote_pathunset rather than inventing/, and do not error on a missing remote specon_mountauto_runpresets fall back to mounted-path operations without remote metadatadir_cache/dcache_timeout/dcache_max_size, with explicit 2.x values winningVimLeavePreregistration for the exit hookThis remains a draft pending validation on real hardware with
fuse-t+fuse-t-sshfs, which the unit suite deliberately does not simulate.Closes #19