Allow ignoring files based on an xattr value #9411
Labels
enhancement
New features or improvements of some kind, as opposed to a problem (bug)
needs-triage
New issues needed to be validated
This feature request is partially inspired by this PR on rye, a new Python project manager. It introduces a feature where it can automatically mark a directory excluded from sync for Dropbox and iCloud clients by setting a special extended attribute on the directory (
com.dropbox.ignored
orcom.apple.fileprovider.ignore#P
). It would be useful if Syncthing supported a similar mechanism.I sync my workspaces which generally includes quite a few Python projects, most of which come with large virtualenvs. tl;dr: You don't want to sync virtualenvs. Virtualenvs contain installed Python libraries and helper scripts - they can differ a lot between OSes, so you can't cleanly reuse the same virtualenv if syncing files between Windows, Linux or macOS. They also contain thousands of almost exclusively automatically-managed files with unpleasant side effects in case of automatic sync conflict resolutions picking the wrong files, or mixing and matching files synced between different OSes. The project manager should take care of all this automatically on demand.
In general I think it would be useful for people syncing their code between multiple computers. The alternative is to put a special .stignore into project/workspace directories, but that requires either loose files per project, or having a top-level
.stignore
with/*/.venv
and!/exception-project/.venv
rules that is then managed separately on each device.On the negative side, this feature can be very "opaque" - if a directory is ignored via xattrs, there's no clear feedback on why Syncthing just ignores a specific directory (nothing in .stignore, nothing wrong in logs) and can confuse users if enabled unconditionally.
The text was updated successfully, but these errors were encountered: