bug#34147: 27.0.50; M-x describe-package groovy-mode breaks

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#34147: 27.0.50; M-x describe-package groovy-mode breaks

Xu Chunyang
I've setup Melpa, C-h P groovy-mode breaks, here is the backtrace

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  #f(compiled-function (pkg) #<bytecode 0x45e6b941>)(groovy-mode)
  apply(#f(compiled-function (pkg) #<bytecode 0x45e6b941>) groovy-mode)
  describe-package-1(groovy-mode)
  describe-package(groovy-mode)
  funcall-interactively(describe-package groovy-mode)
  call-interactively(describe-package nil nil)
  command-execute(describe-package)

By evaluating describe-package-1 to get detailed Backtrace (I didn't
paste it since it is very long), it seems the error is caused by the
"last" expression of describe-package-1:

(insert readme-string)

when readme-string is nil.

I notice Melpa fails to provide the readme file, this URL is 404

https://melpa.org/packages/groovy-mode-readme.txt

--
In GNU Emacs 27.0.50
Repository revision: 436c225f1b8ca48fa7c7e769fe6b7055f37af95d
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.2



Reply | Threaded
Open this post in threaded view
|

bug#34147: 27.0.50; M-x describe-package groovy-mode breaks

Federico Tedin
> By evaluating describe-package-1 to get detailed Backtrace (I didn't
> paste it since it is very long), it seems the error is caused by the
> "last" expression of describe-package-1:
>
> (insert readme-string)
>
> when readme-string is nil.
>
> I notice Melpa fails to provide the readme file, this URL is 404
>
> https://melpa.org/packages/groovy-mode-readme.txt

It looks like when a package doesn't provide a 'Commentary' field, the
xyz-readme.txt file isn't generated by MELPA (see
https://github.com/melpa/package-build/blob/master/package-build.el#L382).

Other packages without 'Commentary' (in no particular order):
- instapaper
- javap-mode
- tdd-status-mode-line
- jknav
- runtests

Using C-h P on these packages will trigger the same error. I guess we
could replace:

(insert readme-string)

with:

(when readme-string
  (insert readme-string))

or:

(if readme-string
    (insert readme-string)
  (insert "This package does not provide a description."))

to cover cases where the xyz-readme.txt file for the package doesn't
exist.