From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Michael Mauger via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#39960: 28.0.50; Incompatible change to sql-add-product in Emacs 27 Date: Mon, 23 Mar 2020 01:20:45 +0000 Message-ID: References: <837dzwboes.fsf@gnu.org> <83k13o8tsb.fsf@gnu.org> Reply-To: Michael Mauger , Michael Mauger Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="115305"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "39960@debbugs.gnu.org" <39960@debbugs.gnu.org>, "michael@mauger.com" , "p.stephani2@gmail.com" To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 23 02:21:31 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGBmU-000TvM-Nj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Mar 2020 02:21:30 +0100 Original-Received: from localhost ([::1]:56150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGBmT-00042a-PO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Mar 2020 21:21:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44105) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGBm6-00040X-P4 for bug-gnu-emacs@gnu.org; Sun, 22 Mar 2020 21:21:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGBm5-0000s7-Ju for bug-gnu-emacs@gnu.org; Sun, 22 Mar 2020 21:21:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45282) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGBm2-0000rR-7K for bug-gnu-emacs@gnu.org; Sun, 22 Mar 2020 21:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGBm2-0007CY-3y for bug-gnu-emacs@gnu.org; Sun, 22 Mar 2020 21:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Mauger Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Mar 2020 01:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39960 X-GNU-PR-Package: emacs Original-Received: via spool by 39960-submit@debbugs.gnu.org id=B39960.158492645527647 (code B ref 39960); Mon, 23 Mar 2020 01:21:02 +0000 Original-Received: (at 39960) by debbugs.gnu.org; 23 Mar 2020 01:20:55 +0000 Original-Received: from localhost ([127.0.0.1]:51255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGBlv-0007Br-3G for submit@debbugs.gnu.org; Sun, 22 Mar 2020 21:20:55 -0400 Original-Received: from mail1.protonmail.ch ([185.70.40.18]:17734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGBls-0007BY-Qm for 39960@debbugs.gnu.org; Sun, 22 Mar 2020 21:20:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1584926446; bh=ekTVyCCMnZvRvelLAhln4LNGDJM43dFKOwyQQBFSuGM=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=cvwZVQyshNfMpxaAZozEeM94nMfoiARvx7iS8Y3j82CxLsfRQDFqwCA42ShCv3W+H 9KHC0UrVaUdOLNAAT6cgoX1dIabG1hY4t1uiOx39MSltdDqF4NXsgkbqwQ6r5X9vcI d4uY3yR915fDWIMpTpMxA85pdZjJHRqXSBSH6DYo= In-Reply-To: <83k13o8tsb.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177638 Archived-At: =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Friday, March 13, 2020 5:53 AM, Eli Zaretskii wrote: > Ping! > > > Date: Sat, 07 Mar 2020 09:43:39 +0200 > > From: Eli Zaretskii eliz@gnu.org > > Cc: 39960@debbugs.gnu.org > > > > > From: Philipp p.stephani2@gmail.com > > > Date: Fri, 06 Mar 2020 23:39:16 +0100 > > > In Emacs 26, sql-add-product has the signature > > > (sql-add-product PRODUCT DISPLAY &rest PLIST) > > > However, in the Emacs 27 pretest the signature is now > > > (sql-add-product PRODUCT DISPLAY &optional PLIST) > > > Note the change from &rest to &optional. This is a breaking change th= at > > > breaks all users of sql-add-product. I've found quite a few uses of t= he > > > old signature in the wild, > > > > Thanks for reporting this. > > Michael, could you please look into this ASAP? TIA. > > Btw, this change of a public API is not in NEWS, AFAICT; if we decide > > eventually on keeping the change, we should announce it in NEWS. Sorry for the delay. The massive switch to WFH and illness concerns at home interfered. All are fine, and I actually do get work done occasionally. I've got the following patch to make. I assume it needs to be made to the emacs-27 branch and corresponding patches made to master as well. If I should only commit to master (same change is needed there) for cherry-picki= ng for emacs-27, let me know. $ git diff diff --git a/ChangeLog.3 b/ChangeLog.3 index fc41c1f7dc..e6cad9ed7c 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -1,3 +1,11 @@ +2020-03-22 Michael R. Mauger + +=09* lisp/progmodes/sql.el (sql-add-product): Re-correct argument +=09spec. Previous change was due to my own stupidity; I have +=09resolved prior behavior (Bug#39960). +=09* test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added +=09test to insure I don't make the same mistake again. + 2020-02-27 Nicolas Petton =09* admin/authors.el (authors-ignored-files): Fix entries. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 400e304ecf..a04c26d276 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2740,7 +2740,7 @@ sql-read-product nil 'require-match init 'sql-product-history init)))) -(defun sql-add-product (product display &optional plist) +(defun sql-add-product (product display &rest plist) "Add support for a database product in `sql-mode'. Add PRODUCT to `sql-product-alist' which enables `sql-mode' to diff --git a/test/lisp/progmodes/sql-tests.el b/test/lisp/progmodes/sql-tes= ts.el index d6f89341be..91805ab725 100644 --- a/test/lisp/progmodes/sql-tests.el +++ b/test/lisp/progmodes/sql-tests.el @@ -187,13 +187,19 @@ sql-test-add-product (sql-add-product 'xyz "XyzDb") (should (equal (pp-to-string (assoc 'xyz sql-product-alist)) - "(xyz :name \"XyzDb\")\n")))) + "(xyz :name \"XyzDb\")\n"))) + + (sql-test-product-feature-harness + (sql-add-product 'stu "StuDb" :X 1 :Y "2") + + (should (equal (pp-to-string (assoc 'stu sql-product-alist)) + "(stu :name \"StuDb\" :X 1 :Y \"2\")\n")))) (ert-deftest sql-test-add-existing-product () "Add a product that already exists." (sql-test-product-feature-harness - (should-error (sql-add-feature 'a "Aaa")) + (should-error (sql-add-product 'a "Aaa")) (should (equal (pp-to-string (assoc 'a sql-product-alist)) "(a :X 1 :Y 2 :Z sql-test-feature-value-a)\n")))) -- MICHAEL@MAUGER.COM // FSF and EFF member // GNU Emacs sql.el maintainer