From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#36568: with-suppress-warnings not working in seq-tests.el Date: Wed, 07 Oct 2020 06:57:03 +0200 Message-ID: <87mu0y4ork.fsf@gnus.org> References: <87v9halqdq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5372"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 36568@debbugs.gnu.org, Stefan Monnier To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 07 07:06:17 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 1kQ1ea-0001JI-Ox for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 07:06:16 +0200 Original-Received: from localhost ([::1]:47562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQ1eZ-0000tj-Qw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 01:06:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ1Wc-0004t1-TP for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 00:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQ1Wc-0006UB-JJ for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 00:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kQ1Wc-0000bY-A7 for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 00:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Oct 2020 04:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36568 X-GNU-PR-Package: emacs Original-Received: via spool by 36568-submit@debbugs.gnu.org id=B36568.16020466402264 (code B ref 36568); Wed, 07 Oct 2020 04:58:02 +0000 Original-Received: (at 36568) by debbugs.gnu.org; 7 Oct 2020 04:57:20 +0000 Original-Received: from localhost ([127.0.0.1]:54814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ1Vw-0000aS-2H for submit@debbugs.gnu.org; Wed, 07 Oct 2020 00:57:20 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:40322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ1Vt-0000aE-Ic for 36568@debbugs.gnu.org; Wed, 07 Oct 2020 00:57:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vUNl/zOdCjK2TCIkHOfXYZans1/p2BZnMtb+MKheT74=; b=PwNmRl3cGh7yCnd73hcoeUlaL/ lrE53cfcOTJQLrfslU63SyDKC9pMRXEiYJOLdS3qETv/MC5qeePGkTnQEMuzUUM/swcES5pTLTWvX zFbQYyuFc1Mgd4VVtvsEgTiwy3kNXwGvVo139GYCQuVUfXnwD1PkpF9Od48cgw6FJrtQ=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQ1Vh-0001Ly-3A; Wed, 07 Oct 2020 06:57:09 +0200 X-Now-Playing: David Grubbs's _Rickets & Scurvy_: "A Dream To Help Me Sleep" In-Reply-To: <87v9halqdq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 22 Aug 2020 16:14:09 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:189978 Archived-At: Lars Ingebrigtsen writes: > Odd. To reproduce, I tried to just do: > > (require 'seq) > > (defun foo () > (with-suppressed-warnings ((obsolete seq-contains)) > (seq-contains '(3 4 5 6) 3))) > > But the warning is suppressed correctly then. So there's ... something > in the way the test files are compile that breaks > with-suppressed-warnings? Something in the ert macros? Anybody got any > ideas? I poked around a bit more, and wondered whether the suppression would survive if I pushed it as close to the function as possible: (ert-deftest test-seq-contains-should-return-the-elt () (should (= 5 (with-suppressed-warnings ((obsolete seq-contains)) (seq-contains '(1 2 3 4 5) 5))))) But this leads to: Debugger entered--Lisp error: (void-function internal--with-suppressed-warnings) signal(void-function (internal--with-suppressed-warnings)) apply(signal (void-function (internal--with-suppressed-warnings))) (setq value-2846 (apply fn-2844 args-2845)) (unwind-protect (setq value-2846 (apply fn-2844 args-2845)) (setq form-description-2848 (nconc (list '(should (= 5 (with-suppressed-warnings ... ...)))) (list :form (cons fn-2844 args-2845)) (if (eql value-2846 'ert-form-evaluation-aborted-2847) nil (list :value value-2846)) (let ((-explainer- (and (symbolp ...) (get ... ...)))) (if -explainer- (progn (list :explanation (apply -explainer- args-2845))))))) (ert--signal-should-execution form-description-2848)) (if (unwind-protect (setq value-2846 (apply fn-2844 args-2845)) (setq form-description-2848 (nconc (list '(should (= 5 ...))) (list :form (cons fn-2844 args-2845)) (if (eql value-2846 'ert-form-evaluation-aborted-2847) nil (list :value value-2846)) (let ((-explainer- (and ... ...))) (if -explainer- (progn (list :explanation ...)))))) (ert--signal-should-execution form-description-2848)) nil (ert-fail form-description-2848)) (let (form-description-2848) (if (unwind-protect (setq value-2846 (apply fn-2844 args-2845)) (setq form-description-2848 (nconc (list '(should ...)) (list :form (cons fn-2844 args-2845)) (if (eql value-2846 'ert-form-evaluation-aborted-2847) nil (list :value value-2846)) (let ((-explainer- ...)) (if -explainer- (progn ...))))) (ert--signal-should-execution form-description-2848)) nil (ert-fail form-description-2848))) (let ((value-2846 'ert-form-evaluation-aborted-2847)) (let (form-description-2848) (if (unwind-protect (setq value-2846 (apply fn-2844 args-2845)) (setq form-description-2848 (nconc (list '...) (list :form (cons fn-2844 args-2845)) (if (eql value-2846 ...) nil (list :value value-2846)) (let (...) (if -explainer- ...)))) (ert--signal-should-execution form-description-2848)) nil (ert-fail form-description-2848))) value-2846) (let* ((fn-2844 #'=) (args-2845 (condition-case err (let ((signal-hook-function #'ert--should-signal-hook)) (list 5 (internal--with-suppressed-warnings '... (progn ...)))) (error (progn (setq fn-2844 #'signal) (list (car err) (cdr err))))))) (let ((value-2846 'ert-form-evaluation-aborted-2847)) (let (form-description-2848) (if (unwind-protect (setq value-2846 (apply fn-2844 args-2845)) (setq form-description-2848 (nconc (list ...) (list :form ...) (if ... nil ...) (let ... ...))) (ert--signal-should-execution form-description-2848)) nil (ert-fail form-description-2848))) value-2846)) (progn (let* ((fn-2844 #'=) (args-2845 (condition-case err (let ((signal-hook-function ...)) (list 5 (internal--with-suppressed-warnings ... ...))) (error (progn (setq fn-2844 ...) (list ... ...)))))) (let ((value-2846 'ert-form-evaluation-aborted-2847)) (let (form-description-2848) (if (unwind-protect (setq value-2846 (apply fn-2844 args-2845)) (setq form-description-2848 (nconc ... ... ... ...)) (ert--signal-should-execution form-description-2848)) nil (ert-fail form-description-2848))) value-2846))) eval((progn (let* ((fn-2844 #'=) (args-2845 (condition-case err (let (...) (list 5 ...)) (error (progn ... ...))))) (let ((value-2846 'ert-form-evaluation-aborted-2847)) (let (form-description-2848) (if (unwind-protect (setq value-2846 ...) (setq form-description-2848 ...) (ert--signal-should-execution form-description-2848)) nil (ert-fail form-description-2848))) value-2846))) t) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no