Subject: bug#55396: 29.0.50; project-find-file don't work on a project with many submodules

From: Eason Huang <[email-masked]>
Date: Sun, 15 May 2022 12:09:36 +0800

Dmitry Gutov <[email-masked]> writes:

> On 13.05.2022 15:56, Eason Huang wrote:
>> I try to use `M-x project-find-file` in my `.emacs.d` config project. It
>> takes a long time(about 1 minutes), and finally get a error as bellow:
>> ```
>> process-file: Variable binding depth exceeds max-specpdl-size
>> ```
>> The .emacs.d project include 95 submudules of Git, is this too huge
>> for
>> project.el?
>
> Hi! That's a lot, but the above error indicates excess recursion. Do
> the submodules in your repo in turn have checked out submodules
> inside, and so on?

I try another project with 42 submodules, when I use `Borg` to install
 `Corfu` extensions, I need to set two load-path on `.gitmodules`. And this
 setting will trigger the same issue.

```
[submodule "corfu"]
	load-path = .
	load-path = extensions
	path = lib/corfu
	url = [email-masked]:minad/corfu.git
```
if I remove the load-path, just leave it as below, project.el wokrs
well.
```
[submodule "corfu"]
	path = lib/corfu
	url = [email-masked]:minad/corfu.git
```

May be the above infomation can help you.

> As a workaround, you can set project-vc-merge-submodules to nil (at
> least temporarily, until we get a better fix).
>

Thanks, I try to set project-vc-merge-submodules to nil, and It works.

By the way, I also tried `projectile` on the huge .emacs.d, It works but
can feel the latency.

-- 
Eason Huang