From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: nadvice compatibility in package list Date: Sat, 06 Jul 2019 15:35:02 +0100 Message-ID: <864l3z2pux.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="200356"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 06 16:36:28 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjlnf-000puw-CL for ged-emacs-devel@m.gmane.org; Sat, 06 Jul 2019 16:36:27 +0200 Original-Received: from localhost ([::1]:59898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjlne-00014Y-1K for ged-emacs-devel@m.gmane.org; Sat, 06 Jul 2019 10:36:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45318) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjlmj-00011m-Ls for emacs-devel@gnu.org; Sat, 06 Jul 2019 10:35:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjlmi-0004jX-II for emacs-devel@gnu.org; Sat, 06 Jul 2019 10:35:29 -0400 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:56414 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hjlmg-0004fr-S3 for emacs-devel@gnu.org; Sat, 06 Jul 2019 10:35:28 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hjlmV-000oQ2-A5 for emacs-devel@gnu.org; Sat, 06 Jul 2019 16:35:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:OTboWht9+QbG96Yp1cQkCjWzMQU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238379 Archived-At: On Fri 05 Jul 2019, Stefan Monnier wrote: >> (assoc 'nadvice package--builtin-versions) >> => (nadvice 1 0) > > This is right. > >> (assoc 'nadvice package--builtins) >> => nil > > This is wrong. > > Thomas Fitzsimmons writes: >> diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el >> index 2278e389ce..ffecb24b1a 100644 >> --- a/lisp/emacs-lisp/nadvice.el >> +++ b/lisp/emacs-lisp/nadvice.el >> @@ -3,8 +3,11 @@ >> ;; Copyright (C) 2012-2019 Free Software Foundation, Inc. >> >> ;; Author: Stefan Monnier >> +;; Note: Always keep this built-in nadvice version greater than any >> +;; nadvice version that has been or ever will be in GNU ELPA. >> +;; Version: 10.0.0 >> ;; Keywords: extensions, lisp, tools >> -;; Package: emacs >> +;; Package: nadvice >> >> ;; This program is free software; you can redistribute it and/or modify >> ;; it under the terms of the GNU General Public License as published by > > We already have defined its version as 1.0, so it would be better to > keep it that way. I think the only thing that really matters is to > remove the `Package: emacs` line (which is a line that explicitly > *prevents* the file from being considered as a package in its own > right). The patch above works: (assoc 'nadvice package--builtin-versions) => (nadvice 1 0) (assoc 'nadvice package--builtins) => (nadvice . [(10 0 0) nil "Light-weight advice primitives for Elisp functions"]) The `list-packages' output shows two nadvice packages: nadvice 0.3 available gnu Forward compatibility for Emacs-24.4's nadvice nadvice 10.0.0 built-in Light-weight advice primitives for Elisp functions > So I think the patch below will do the trick as well. > Can you confirm? Stefan, your patch gives the right assoc lookups, but does not show the builtin nadvice package in the output from `list-packages'. In general, omitting the "Package:" directive is a little too subtle, and future maintainers may add it back, assuming it was an unintended omission rather than a deliberate change. To test each patch I deleted lisp/finder-inf.el before rebuilding. Let me know if this is insufficient for a correct rebuild. AndyM