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

Already on GitHub? Sign in to your account

Prevent projectile-find-file from recursing into submodules #1174

Open
thblt opened this Issue Sep 7, 2017 · 3 comments

Comments

Projects
None yet
2 participants

thblt commented Sep 7, 2017 edited

Expected behavior

When using projectile-find-files, I would expect to have the option not to list files in submodules, and have submodules treated as separate projects.

Actual behavior

No such option seems to exist. In a project with around 100 submodules, the completion list takes several seconds to appear, which makes Projectile almost unusable.

The time issue is especially surprising, since in the same project, git ls-files --recurse-submodules completes in less than 0,25s.

Steps to reproduce the problem

Run projectile-find-file in a project with several submodules. Observe that files in submodules are listed.

Environment & Version information

Projectile version information

Include here the version string displayed by M-x projectile-version. Here's an example:

Cannot  determine version without packge pkg-info

Projectile is installed from Borg, as a git submodule, I guess this is the origin of this issue. git describe returns: v0.2-1452-gadf6ae2

Emacs version

25.2.1

Operating system

NixOS 17.03

Thanks!

Edited: Fixed Emacs version.

thblt commented Sep 7, 2017

Re Projectile version: Sorry, I was in fact missing pkg-info and epl. Now projectile-version reports 0.15.0snapshot.

Not really answering your issue (I don't know the answer), but a workaround may be to turn caching on (setq projectile-enable-caching t). I use caching with a project of more than 400K files, and while search is sluggish, the list pops up fairly quickly. There is a long wait while the cache is initially populated, and you will eventually have to invalidate it after significant project changes.

thblt commented Oct 16, 2017

Actually, I just found that (setq projectile-git-submodule-command "") globally prevents the recursion. I leave this open and will try to send a documentation PR when I find the time.

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