Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to get project root for remote projects … sometimes #1829

Open
sellout opened this issue Mar 8, 2023 · 0 comments
Open

Failing to get project root for remote projects … sometimes #1829

sellout opened this issue Mar 8, 2023 · 0 comments

Comments

@sellout
Copy link
Contributor

sellout commented Mar 8, 2023

Expected behavior

(projectile-compile-project) executes successfully

Actual behavior

I get an error

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-remote-p(nil)
  (not (file-remote-p dir))
  (let ((meh (message "Remote-p dir: %S" dir)) (is-local (not (file-remote-p dir))) (is-connected (file-remote-p dir nil t))) (if (or is-local is-connected) nil 'none))
  (or (let* […]))
  projectile-project-root(nil)
  projectile-acquire-root()
  projectile-read-command("Compile command: " "make")
  projectile-maybe-read-command(nil "make" "Compile command: ")
  projectile--run-project-cmd("make" #<hash-table equal 1/65 0xb0afac7f> :show-prompt nil :prompt-prefix "Compile command: " :save-buffers t :use-comint-mode nil)
  projectile-compile-project(nil)

I added some debugging output to projectile-project-root to print my default-directory, so when I call it from the project I get

Initial dir: nil
Updated dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"
Remote-p dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"

where “Updated” is after default-directory has been assigned to the dir. That matches what I expect (although (projectile-project-root) still returns nil here, and I don’t know why yet.

When I call projectile-compile-project, however, I get the following output:

Initial dir: nil
Updated dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"
Remote-p dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"
Initial dir: nil
Updated dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"
Remote-p dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"
Initial dir: nil
Updated dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"
Remote-p dir: "/ssh:esarhaddon:/home/greg/Projects/ECC/zcash/tx-builder-take-3/"
Initial dir: nil
Updated dir: nil
Remote-p dir: nil

So, projectile-project-root called four times (presumably the value should be cached after the first time – but the failure cache entry isn’t there, since it’s still printing the third output which should be after the cache lookup). The last time it’s called, default-directory is nil, and that call to (file-remote-p nil) is what ultimately errors.

Steps to reproduce the problem

I’m not sure yet. It works for days, then this happens. I’m trying to deduce what’s going wrong, but wanted to open this so that I have a place to put updates (and maybe it sounds familiar in some way).

Environment & Version information

Projectile version information

Projectile 20221118.1035

Emacs version

GNU Emacs 28.2 (build 1, aarch64-apple-darwin22.3.0, NS appkit-2299.40 Version 13.2 (Build 22D49))

Operating system

MacOS Ventura 13.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant