unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16222: Installing ELPA packages complains about :keywords in define-package
@ 2013-12-23  1:42 Juanma Barranquero
  2013-12-23 15:02 ` Ted Zlatanov
  2014-01-14 18:16 ` bug#16222: latest js2-mode from elpa causes backtrace during emacs initialization Tom Willis
  0 siblings, 2 replies; 19+ messages in thread
From: Juanma Barranquero @ 2013-12-23  1:42 UTC (permalink / raw)
  To: 16222

On Tue, Dec 17, 2013 at 10:06 PM, Stephen Berman <stephen.berman@gmx.net> wrote:

> Leaving directory `/home/steve/.emacs.d/elpa/nlinum-1.1'
> Compiling file /home/steve/.emacs.d/elpa/nlinum-1.1/nlinum-pkg.el at Tue Dec
> 17 13:33:54 2013
> Entering directory `/home/steve/.emacs.d/elpa/nlinum-1.1/'
> nlinum-pkg.el:1:1:Warning: `"convenience"' is a malformed function
> Compiling file /home/steve/.emacs.d/elpa/nlinum-1.1/nlinum.el at Tue Dec 17
> 13:33:54 2013
> Compiling no file at Tue Dec 17 13:36:31 2013

The problem is not nlinum-specific. Installing anything from ELPA
complains about the :keywords in the define-package:

In toplevel form:
debbugs-pkg.el:1:1:Warning: `"comm"' is a malformed function

In toplevel form:
rainbow-mode-pkg.el:1:1:Warning: `"faces"' is a malformed function

etc.





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-23  1:42 bug#16222: Installing ELPA packages complains about :keywords in define-package Juanma Barranquero
@ 2013-12-23 15:02 ` Ted Zlatanov
  2013-12-23 15:13   ` Juanma Barranquero
  2014-01-14 18:16 ` bug#16222: latest js2-mode from elpa causes backtrace during emacs initialization Tom Willis
  1 sibling, 1 reply; 19+ messages in thread
From: Ted Zlatanov @ 2013-12-23 15:02 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 16222

On Mon, 23 Dec 2013 02:42:57 +0100 Juanma Barranquero <lekktu@gmail.com> wrote: 

JB> On Tue, Dec 17, 2013 at 10:06 PM, Stephen Berman <stephen.berman@gmx.net> wrote:
>> Leaving directory `/home/steve/.emacs.d/elpa/nlinum-1.1'
>> Compiling file /home/steve/.emacs.d/elpa/nlinum-1.1/nlinum-pkg.el at Tue Dec
>> 17 13:33:54 2013
>> Entering directory `/home/steve/.emacs.d/elpa/nlinum-1.1/'
>> nlinum-pkg.el:1:1:Warning: `"convenience"' is a malformed function
>> Compiling file /home/steve/.emacs.d/elpa/nlinum-1.1/nlinum.el at Tue Dec 17
>> 13:33:54 2013
>> Compiling no file at Tue Dec 17 13:36:31 2013

JB> The problem is not nlinum-specific. Installing anything from ELPA
JB> complains about the :keywords in the define-package:

JB> In toplevel form:
JB> debbugs-pkg.el:1:1:Warning: `"comm"' is a malformed function

JB> In toplevel form:
JB> rainbow-mode-pkg.el:1:1:Warning: `"faces"' is a malformed function

JB> etc.

Can you provide a full bug description, Emacs version, etc.?  I can't
find it here (I know there's an emacs-devel discussion but the bug
report is incomplete as is).

Thanks
Ted





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-23 15:02 ` Ted Zlatanov
@ 2013-12-23 15:13   ` Juanma Barranquero
  2013-12-23 22:57     ` Ted Zlatanov
  0 siblings, 1 reply; 19+ messages in thread
From: Juanma Barranquero @ 2013-12-23 15:13 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: 16222

On Mon, Dec 23, 2013 at 4:02 PM, Ted Zlatanov <tzz@lifelogs.com> wrote:

> Can you provide a full bug description, Emacs version, etc.?  I can't
> find it here (I know there's an emacs-devel discussion but the bug
> report is incomplete as is).

With an Emacs from trunk, of a few days ago, I just did M-x
list-packages, then U (packages to update where debbugs and
rainbow-mode), then x, and voilà.

Aren't you able to reproduce it?

   J





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-23 15:13   ` Juanma Barranquero
@ 2013-12-23 22:57     ` Ted Zlatanov
  2013-12-24  0:01       ` Juanma Barranquero
  2013-12-24  3:43       ` Stefan Monnier
  0 siblings, 2 replies; 19+ messages in thread
From: Ted Zlatanov @ 2013-12-23 22:57 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 16222

On Mon, 23 Dec 2013 16:13:32 +0100 Juanma Barranquero <lekktu@gmail.com> wrote: 

JB> On Mon, Dec 23, 2013 at 4:02 PM, Ted Zlatanov <tzz@lifelogs.com> wrote:
>> Can you provide a full bug description, Emacs version, etc.?  I can't
>> find it here (I know there's an emacs-devel discussion but the bug
>> report is incomplete as is).

JB> With an Emacs from trunk, of a few days ago, I just did M-x
JB> list-packages, then U (packages to update where debbugs and
JB> rainbow-mode), then x, and voilà.

JB> Aren't you able to reproduce it?

I can reproduce it but don't see why you couldn't make a proper bug
report with a version (for the record, mine is 24.3.50.1, compiled today).

Stefan: I think the problem is `package--alist-to-plist'.  The generated
PACKAGE-pkg.el has, for example:

(define-package "ack" "1.3" "Interface to ack-like source code search tools" 'nil :keywords ("tools" "processes" "convenience") :url "https://github.com/leoliu/ack-el")

(define-package "nlinum" "1.1" "Show line numbers in the margin" 'nil :url "http://elpa.gnu.org/packages/nlinum.html" :keywords ("convenience"))

If I quote the keywords, e.g.

  :keywords '("convenience")

then the function call works but I don't really understand the creative
mix of `defstruct' and the `define-package' funcall that errors out, so
I couldn't write the fix and test it.  I hope you or someone else has a
chance to do it... I may try it again tomorrow if no one else does.

Ted





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-23 22:57     ` Ted Zlatanov
@ 2013-12-24  0:01       ` Juanma Barranquero
  2013-12-24  3:43       ` Stefan Monnier
  1 sibling, 0 replies; 19+ messages in thread
From: Juanma Barranquero @ 2013-12-24  0:01 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: 16222

On Mon, Dec 23, 2013 at 11:57 PM, Ted Zlatanov <tzz@lifelogs.com> wrote:

> don't see why you couldn't make a proper bug
> report with a version

I dislike report-emacs-bug. Anyway, as I usually hang 'round
emacs-devel, bugs I report are for the trunk unless I say otherwise.
And I'm available to provide any further information requested.

> (for the record, mine is 24.3.50.1, compiled today).

So is mine.

    J





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-23 22:57     ` Ted Zlatanov
  2013-12-24  0:01       ` Juanma Barranquero
@ 2013-12-24  3:43       ` Stefan Monnier
  2013-12-24 13:37         ` Ted Zlatanov
  1 sibling, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2013-12-24  3:43 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 16222

> Stefan: I think the problem is `package--alist-to-plist'.  The generated
> PACKAGE-pkg.el has, for example:

No, the problem is that *-pkg.el should not be compiled (it's not
"load"ed either): it's a file using the Elisp `sexp' syntax, but it's
not a file written in Elisp.


        Stefan





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-24  3:43       ` Stefan Monnier
@ 2013-12-24 13:37         ` Ted Zlatanov
  2013-12-24 14:55           ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Ted Zlatanov @ 2013-12-24 13:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 16222

On Mon, 23 Dec 2013 22:43:17 -0500 Stefan Monnier <monnier@IRO.UMontreal.CA> wrote: 

>> Stefan: I think the problem is `package--alist-to-plist'.  The generated
>> PACKAGE-pkg.el has, for example:

SM> No, the problem is that *-pkg.el should not be compiled (it's not
SM> "load"ed either): it's a file using the Elisp `sexp' syntax, but it's
SM> not a file written in Elisp.

OK, is it fixable?

Ted





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-24 13:37         ` Ted Zlatanov
@ 2013-12-24 14:55           ` Stefan Monnier
  2013-12-24 15:23             ` Ted Zlatanov
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2013-12-24 14:55 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 16222

>>> Stefan: I think the problem is `package--alist-to-plist'.  The generated
>>> PACKAGE-pkg.el has, for example:
SM> No, the problem is that *-pkg.el should not be compiled (it's not
SM> "load"ed either): it's a file using the Elisp `sexp' syntax, but it's
SM> not a file written in Elisp.
> OK, is it fixable?

Of course: get the byte-compiler to skip those files.


        Stefan






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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-24 14:55           ` Stefan Monnier
@ 2013-12-24 15:23             ` Ted Zlatanov
  2013-12-24 16:23               ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Ted Zlatanov @ 2013-12-24 15:23 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 16222

On Tue, 24 Dec 2013 09:55:00 -0500 Stefan Monnier <monnier@IRO.UMontreal.CA> wrote: 

>>>> Stefan: I think the problem is `package--alist-to-plist'.  The generated
>>>> PACKAGE-pkg.el has, for example:
SM> No, the problem is that *-pkg.el should not be compiled (it's not
SM> "load"ed either): it's a file using the Elisp `sexp' syntax, but it's
SM> not a file written in Elisp.
>> OK, is it fixable?

SM> Of course: get the byte-compiler to skip those files.

1) Why is *-pkg.el written in this bizarro syntax and not something that
compiles cleanly?  IOW if it's going to be pure data, why pretend it's a
funcall?  I'd rather rename it to *-pkg.data or something and eliminate
any chance of this problem recurring.  The .el extension is wrong,
either way.

2) If you'd rather keep it as a confusingly-almost-ELisp file, can the
problem be solved by ";; no-byte-compile: t" in the local variables, or
does this function have to be changed?

#+begin_src lisp
(defun package--compile (pkg-desc)
  "Byte-compile installed package PKG-DESC."
  (package-activate-1 pkg-desc)
  (byte-recompile-directory (package-desc-dir pkg-desc) 0 t))
#+end_src

Thanks
Ted





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-24 15:23             ` Ted Zlatanov
@ 2013-12-24 16:23               ` Stefan Monnier
  2014-01-15  5:02                 ` Dmitry Gutov
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2013-12-24 16:23 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 16222

> 1) Why is *-pkg.el written in this bizarro syntax and not something that
> compiles cleanly?

Hysterical raisins!

> IOW if it's going to be pure data, why pretend it's a funcall?
> I'd rather rename it to *-pkg.data or something and eliminate any
> chance of this problem recurring.  The .el extension is wrong,
> either way.

If you ask me, the <foo>-autoloads.el and <foo>-pkg.el should be combined
into a single file whose name is constant (i.e. does not include <foo>).
But that's a change in the format of ELPA packages, so it's a bit
delicate to do: it will have to be done in steps (first add the new
combined file in the packages, add support for it in package.el, then
wait for everyone to start using the newer package.el, then start
getting rid of the old redundant files).

By the way, I didn't notice that the problem was introduced by the new
":keywords" argument, so we should change it so that its argument is
quoted (so it works like a function call again).

> (defun package--compile (pkg-desc)
>   "Byte-compile installed package PKG-DESC."
>   (package-activate-1 pkg-desc)
>   (byte-recompile-directory (package-desc-dir pkg-desc) 0 t))

Yes, this should skip the *-pkg.el files.


        Stefan





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

* bug#16222: latest js2-mode from elpa causes backtrace during emacs initialization
  2013-12-23  1:42 bug#16222: Installing ELPA packages complains about :keywords in define-package Juanma Barranquero
  2013-12-23 15:02 ` Ted Zlatanov
@ 2014-01-14 18:16 ` Tom Willis
  1 sibling, 0 replies; 19+ messages in thread
From: Tom Willis @ 2014-01-14 18:16 UTC (permalink / raw)
  To: 16222

Apparently it's not js2-mode authors fault. All the details are at
github along with how I fixed it(missing a quote). I have no idea who
maintains that file though.

https://github.com/mooz/js2-mode/issues/129#issuecomment-32290865

Tom Willis





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2013-12-24 16:23               ` Stefan Monnier
@ 2014-01-15  5:02                 ` Dmitry Gutov
  2014-01-15 15:29                   ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Gutov @ 2014-01-15  5:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 16222

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> By the way, I didn't notice that the problem was introduced by the new
> ":keywords" argument, so we should change it so that its argument is
> quoted (so it works like a function call again).

Done, with 2b96305 in elpa and 116030 in emacs.

Now we need a package rebuild to test it.

I don't really like the solution on the Emacs side (treating :keywords
value specially), but quoting and unquoting every element in extras (in
`package--alist-to-plist' and `package-desc-from-define' respectively)
wouldn't look particularly good to me either.





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2014-01-15  5:02                 ` Dmitry Gutov
@ 2014-01-15 15:29                   ` Stefan Monnier
  2014-01-16 12:58                     ` Dmitry Gutov
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2014-01-15 15:29 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Juanma Barranquero, 16222

> Done, with 2b96305 in elpa and 116030 in emacs.

Thanks.

> Now we need a package rebuild to test it.

Should happen tonight.


        Stefan





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2014-01-15 15:29                   ` Stefan Monnier
@ 2014-01-16 12:58                     ` Dmitry Gutov
  2014-01-16 16:18                       ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Gutov @ 2014-01-16 12:58 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 16222

On 15.01.2014 17:29, Stefan Monnier wrote:
>> Now we need a package rebuild to test it.
>
> Should happen tonight.

I'm not sure if you've triggered rebuild for all packages or just 
expected that to happen to the ones pushed after the fix (e.g. company), 
but it didn't work either way.

I've tested the change locally, and it did add a quote before the 
:keywords value, but that didn't happen in company-pkg.el in the 
newly-generated http://elpa.gnu.org/packages/company-0.6.13.tar.

Maybe someone needs to delete all affected -pkg.el files on the server 
first, and then rebuild the containing packages.





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2014-01-16 12:58                     ` Dmitry Gutov
@ 2014-01-16 16:18                       ` Stefan Monnier
  2014-01-16 17:04                         ` Dmitry Gutov
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2014-01-16 16:18 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Juanma Barranquero, 16222

>>> Now we need a package rebuild to test it.
>> Should happen tonight.
> I'm not sure if you've triggered rebuild for all packages or just expected
> that to happen to the ones pushed after the fix (e.g. company), but it
> didn't work either way.

No, I just failed to think.  This morning, when going to check the
result I realized that rebuild wouldn't help, since old packages are
left alone.
So I removed the 2 packages that suffered from this problem (the latest
js2-mode and company) and forced a manual rebuild of them.  At least on
the elpa.gnu.org side, this is fixed now, indeed.

> Maybe someone needs to delete all affected -pkg.el files on the server
> first, and then rebuild the containing packages.

Yup, that's what I had to do.  Sorry for forgetting to turn on my brain.


        Stefan





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2014-01-16 16:18                       ` Stefan Monnier
@ 2014-01-16 17:04                         ` Dmitry Gutov
  2014-01-20 16:16                           ` Ted Zlatanov
  0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Gutov @ 2014-01-16 17:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, 16222-done

On 16.01.2014 18:18, Stefan Monnier wrote:
> So I removed the 2 packages that suffered from this problem (the latest
> js2-mode and company) and forced a manual rebuild of them.  At least on
> the elpa.gnu.org side, this is fixed now, indeed.

Thank you, it looks fine now.

I've made `package-desc-keywords' private so that someone can implement 
a more general solution later, but the immediate issue seems to be fixed.





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2014-01-16 17:04                         ` Dmitry Gutov
@ 2014-01-20 16:16                           ` Ted Zlatanov
  2014-01-21  1:58                             ` Dmitry Gutov
  0 siblings, 1 reply; 19+ messages in thread
From: Ted Zlatanov @ 2014-01-20 16:16 UTC (permalink / raw)
  To: 16222; +Cc: lekktu, dgutov

On Thu, 16 Jan 2014 19:04:07 +0200 Dmitry Gutov <dgutov@yandex.ru> wrote: 

DG> On 16.01.2014 18:18, Stefan Monnier wrote:
>> So I removed the 2 packages that suffered from this problem (the latest
>> js2-mode and company) and forced a manual rebuild of them.  At least on
>> the elpa.gnu.org side, this is fixed now, indeed.

DG> Thank you, it looks fine now.

DG> I've made `package-desc-keywords' private so that someone can
DG> implement a more general solution later, but the immediate issue seems
DG> to be fixed.

Ideally, a new data format that doesn't look like a funcall, right?

Ted





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2014-01-20 16:16                           ` Ted Zlatanov
@ 2014-01-21  1:58                             ` Dmitry Gutov
  2014-01-21 13:48                               ` Stefan Monnier
  0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Gutov @ 2014-01-21  1:58 UTC (permalink / raw)
  To: Ted Zlatanov, 16222; +Cc: lekktu

On 20.01.2014 18:16, Ted Zlatanov wrote:
> Ideally, a new data format that doesn't look like a funcall, right?

I don't think it's that important. Having the package metadata in a file 
that Emacs wouldn't try to byte-compile would've been better, but we 
can't fix that without breaking compatibility with older Emacs versions.

If we are fine with breaking backward compatibility though, there's a 
much simpler fix for the byte compilation problem: let-bind 
`emacs-lisp-file-regexp' in `package--compile' (or even changing 
`byte-recompile-directory' to always skip `-pkg.el' files if the first 
option doesn't work; I haven't checked).

But as long as the package format stays the same, we might want to try 
to handle the quoting automatically. I.e. without having to quote any 
list value in "extra parameters" manually and then specifically unquote 
before using. But that change can wait until we actually have another 
"extra parameter" whose value is a list.





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

* bug#16222: Installing ELPA packages complains about :keywords in define-package
  2014-01-21  1:58                             ` Dmitry Gutov
@ 2014-01-21 13:48                               ` Stefan Monnier
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Monnier @ 2014-01-21 13:48 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: lekktu, Ted Zlatanov, 16222

> simpler fix for the byte compilation problem: let-bind
> emacs-lisp-file-regexp' in `package--compile' (or even changing
> byte-recompile-directory' to always skip `-pkg.el' files if the first option
> doesn't work; I haven't checked).

This fix is still needed, indeed: compiling the -pkg.el is a bug.


        Stefan





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

end of thread, other threads:[~2014-01-21 13:48 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23  1:42 bug#16222: Installing ELPA packages complains about :keywords in define-package Juanma Barranquero
2013-12-23 15:02 ` Ted Zlatanov
2013-12-23 15:13   ` Juanma Barranquero
2013-12-23 22:57     ` Ted Zlatanov
2013-12-24  0:01       ` Juanma Barranquero
2013-12-24  3:43       ` Stefan Monnier
2013-12-24 13:37         ` Ted Zlatanov
2013-12-24 14:55           ` Stefan Monnier
2013-12-24 15:23             ` Ted Zlatanov
2013-12-24 16:23               ` Stefan Monnier
2014-01-15  5:02                 ` Dmitry Gutov
2014-01-15 15:29                   ` Stefan Monnier
2014-01-16 12:58                     ` Dmitry Gutov
2014-01-16 16:18                       ` Stefan Monnier
2014-01-16 17:04                         ` Dmitry Gutov
2014-01-20 16:16                           ` Ted Zlatanov
2014-01-21  1:58                             ` Dmitry Gutov
2014-01-21 13:48                               ` Stefan Monnier
2014-01-14 18:16 ` bug#16222: latest js2-mode from elpa causes backtrace during emacs initialization Tom Willis

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).