unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached
@ 2020-05-17  1:51 John SJ Anderson
  2020-05-17 12:18 ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: John SJ Anderson @ 2020-05-17  1:51 UTC (permalink / raw)
  To: 41341

[-- Attachment #1: Type: text/plain, Size: 3176 bytes --]

I upgraded packages on 16 May 2020, which resulted in project.el upgrading to v0.1.2. 

I restarted Emacs and got the following stack trace:

Debugger entered--Lisp error: (file-missing "Opening input file" "No such file or directory" "/Users/genehack/proj/apollo/models/.git")
insert-file-contents("/Users/genehack/proj/apollo/models/.git")
project-try-vc("/Users/genehack/proj/apollo/models/")
run-hook-with-args-until-success(project-try-vc "/Users/genehack/proj/apollo/models/")
project--find-in-directory("/Users/genehack/proj/apollo/models/")
project-current()
eglot--maybe-activate-editing-mode()
run-hooks(change-major-mode-after-body-hook after-change-major-mode-hook)
normal-mode(t)
after-find-file(nil nil)
find-file-noselect-1(#<buffer index.js> "~/proj/apollo/models/index.js" :nowarn nil "~/proj/apollo/models/index.js" (8667578097 16777222))
  find-file-noselect("/Users/genehack/proj/apollo/models/index.js" :nowarn)
  desktop-restore-file-buffer("/Users/genehack/proj/apollo/models/index.js" "index.js" nil)
  desktop-create-buffer(208 "/Users/genehack/proj/apollo/models/index.js" "index.js" js2-mode (eldoc-mode override-global-mode gcmh-mode global-auto-revert-mode company-mode flymake-mode projectile-mode aggressive-indent-mode flycheck-mode smartparens-mode prettier-js-mode) 1 (nil nil) nil nil ((buffer-display-time 24256 19314 922097 0) (buffer-file-coding-system . undecided-unix)) ((mark-ring nil)))
  eval-buffer(#<buffer  *load*> nil "/Users/genehack/.emacs.d/.emacs.desktop" nil t)  ; Reading at buffer position 9385
  load-with-code-conversion("/Users/genehack/.emacs.d/.emacs.desktop" "/Users/genehack/.emacs.d/.emacs.desktop" t t)
  load("/Users/genehack/.emacs.d/.emacs.desktop" t t t)
  desktop-read()
  #f(compiled-function () #<bytecode 0x1fe27544cc95>)()
  run-hooks(after-init-hook delayed-warnings-hook)
  command-line()
  normal-top-level()

I verified that falling back to project-0.1.el fixed the issue. Looking at the diff between 0.1 and 0.1.2, I was able to concoct the following patch, which seems to resolve the issue:

--- ./upstream-project-0.1.2.el 2020-05-16 13:51:19.000000000 -0700
+++ elpa/project-0.1.2/project.el       2020-05-16 13:50:15.000000000 -0700
@@ -275,7 +275,7 @@
              ;; Don't stop at submodule boundary.
              (or (vc-file-getprop dir 'project-git-root)
                  (let* ((default-directory dir)
-                        (root (vc-root-dir))
+                        (root (vc-find-root dir ".git/"))
                         (gitfile (expand-file-name ".git" root)))
                    (vc-file-setprop
                     dir 'project-git-root

Information generated by `report-emacs-bug` is below: 


In GNU Emacs 27.0.91 (build 1, x86_64-apple-darwin19.3.0, NS appkit-1894.30 Version 10.15.3 (Build 19D76))
 of 2020-04-25 built on phineas.home.genehack.org
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.4

Configured using:
 'configure --with-gnutls=yes --without-makeinfo --with-ns CPPFLAGS=-I/usr/local/opt/libxml2/include/libxml2 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig'


[-- Attachment #2: Type: text/html, Size: 8227 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached
  2020-05-17  1:51 bug#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached John SJ Anderson
@ 2020-05-17 12:18 ` Dmitry Gutov
  2020-05-17 12:19   ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2020-05-17 12:18 UTC (permalink / raw)
  To: John SJ Anderson, 41341

Hi!

Thank you for the report.

On 17.05.2020 04:51, John SJ Anderson wrote:
> I upgraded packages on 16 May 2020, which resulted in project.el 
> upgrading to v0.1.2.
> 
> I restarted Emacs and got the following stack trace:

Version 0.1.3 is now out with a proper fix.

Sorry, it's been fixed on master already, I just wasn't aware we got 
real users yet. :-)

(project.el has only been a stand-alone package for a few days).

But I suppose that's how package.el works with built-in packages.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached
  2020-05-17 12:18 ` Dmitry Gutov
@ 2020-05-17 12:19   ` Dmitry Gutov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Gutov @ 2020-05-17 12:19 UTC (permalink / raw)
  To: 41341-done

So: closing.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-17 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-17  1:51 bug#41341: 27.0.91; project.el 0.1.2 project-try-vc() fails in Git subdirectories; patch attached John SJ Anderson
2020-05-17 12:18 ` Dmitry Gutov
2020-05-17 12:19   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).