João, I don't have Emacs git access so I'll write the equivalent comment and commit message here.

-----
         (project-files-relative-names nil) ; override global to ensure directory components are retained
         (dirs-to-watch
          (delete-dups (mapcar #'file-name-directory
                               (project-files
                                (eglot--project server))))))
-----

"project.el has a global, project-files-relative-names, which influences project-files to return results without parent directory prefixes and this causes file-name-directory to fail to detect directories at the root of the parent. We disable project-files-relative-names to ensure complete results."

On Thu, Aug 22, 2024 at 4:37 PM João Távora <joaotavora@gmail.com> wrote:
If I understand the problem and the fix it's that `project-files` has
its return value controlled by a global.

Not sure that's a great API design (maybe it should change the end
result some interactive commands instead).
But adding the dynamic binding sounds fine, feel free to push, just
add a good explanation in the commit message.

João

On Thu, Aug 22, 2024 at 6:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Cc: Dmitry Gutov <dmitry@gutov.dev>,
> >  João Távora <joaotavora@gmail.com>
> > From: Ship Mints <shipmints@gmail.com>
> > Date: Thu, 22 Aug 2024 13:04:23 -0400
> >
> > Greetings, just want to make sure this fix doesn't get lost...
>
> Fear not, patches don't get lost here.



--
João Távora