From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Neil Okamoto Newsgroups: gmane.emacs.bugs Subject: bug#39911: 27.0.90; error in wisent-total-conflicts if no source filename Date: Wed, 4 Mar 2020 09:23:36 -0800 Message-ID: <74BAFD7B-02A3-4C7F-9FF3-A8401D322175@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_D098F13A-E186-4A69-A27E-FB8D0DA65E30" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="53638"; mail-complaints-to="usenet@ciao.gmane.io" To: 39911@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 04 18:24:14 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 1j9Xkj-000DnA-Av for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Mar 2020 18:24:13 +0100 Original-Received: from localhost ([::1]:37364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9Xki-0007rN-9D for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Mar 2020 12:24:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42977) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9Xka-0007qv-3N for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 12:24:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9XkY-0004mR-Nk for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 12:24:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35814) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9XkY-0004mK-L6 for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 12:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j9XkY-0000pc-HH for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 12:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Neil Okamoto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Mar 2020 17:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39911 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15833426243165 (code B ref -1); Wed, 04 Mar 2020 17:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Mar 2020 17:23:44 +0000 Original-Received: from localhost ([127.0.0.1]:41787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9XkG-0000oz-AT for submit@debbugs.gnu.org; Wed, 04 Mar 2020 12:23:44 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9XkF-0000or-10 for submit@debbugs.gnu.org; Wed, 04 Mar 2020 12:23:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42926) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9XkD-0007px-FJ for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 12:23:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9XkC-0004Vv-08 for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 12:23:41 -0500 Original-Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:34617) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9XkB-0004T3-PR for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 12:23:39 -0500 Original-Received: by mail-pl1-x629.google.com with SMTP id j7so1307920plt.1 for ; Wed, 04 Mar 2020 09:23:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=npXK5CUDsKNJnI6adcMGbhabR9zaG3kOKSlieVGsZ1k=; b=Vm5p+/dlKIVKW6MjCzUUIV6Wsp6Ekxqotqdr7MDho3yhSLWfI5sICj4peEQtmGBaAE iYdX/dMi3XkF/NW34Q6DXUdGSimX5jvLwXeyT+EqpU+WW/29U7TJi9UnWMkP9JIRbJ68 XZSRHgJS6e/WOSuUetNTVH5tnQXIspqONyruSDoVa9A+SXPP+hVs4Ma6G2rb1xdo8Zz1 gveRckqlXSCyVmnLaBulOXb0SiJRCInqMdt3XyaY6ihzM4BJKKU/5mcWTec7ZlSmyzqY MV4eyjSLBDla6YKOdo24dl3prXRvCQWaMCodGdnfOTAZZXHQC6m2CQTrnYzr3uujzKWT lm6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=npXK5CUDsKNJnI6adcMGbhabR9zaG3kOKSlieVGsZ1k=; b=U1+SN2DAOfSlX+XU5AK2OHwXn4ZFMLEbkp84eMURDl5BFj8e/XG9mCDqkq2fbRxlSg 8vW/rBR7jM0FNqgY1Ph3/rD0BQeR/7RMtDoIxw9quGL1JGqVVzwPMq+5SrFQGxegUlKY c8e+GChe3vc+V7hor/yxRsOCwiyFfaPwWzoEPlkmYuIdgcgLZ2sygWeiymFOy95nNYYW gCcNRP4rn54wxR1VrJsJppTYS816ovv876r4eSEQ863ZPkZW7wsgj5uOF6JFdbZQK8bu o93ktHOeNEfmQ1hN4YfN0ndnOvVZ3O6C3qPo8vhmPfgaPJTaQ0u/mBJS0C6kabtB7MJn n+Dg== X-Gm-Message-State: ANhLgQ3ZkwAvqf/u/jNr05Xb4bgZCoIiSnbXfUO9LqyLMIr/hjvIixxX 3uwsC32LFFY8krpvCjjIMhu9aeclqFo= X-Google-Smtp-Source: ADFU+vudZJShzwMX12TwW1fgAQQqCFk1MWeshoAO1B7Nu3GyG81EnoKAKvbxP0oFfSk0ss9N/oxlDQ== X-Received: by 2002:a17:902:9890:: with SMTP id s16mr3829877plp.71.1583342618052; Wed, 04 Mar 2020 09:23:38 -0800 (PST) Original-Received: from ?IPv6:2601:646:4200:1180:b8f5:2e40:e67a:4e13? ([2601:646:4200:1180:b8f5:2e40:e67a:4e13]) by smtp.gmail.com with ESMTPSA id o2sm23095561pfh.26.2020.03.04.09.23.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2020 09:23:37 -0800 (PST) X-Mailer: Apple Mail (2.3608.60.0.2.5) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:176853 Archived-At: --Apple-Mail=_D098F13A-E186-4A69-A27E-FB8D0DA65E30 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 This bug was detected while running docker.el and other packages that = depend on tablist [1]. Tablist is an extension of tabulated-list-mode = that provides the ability to filter the tabulated list via an expression = language. I am not the author of tablist however the author is aware of = this issue. In 27.0.90, tablist is now giving an error when entering its expression = editor. In the debugger I traced the error to wisent-total-conflicts in = lisp/cedet/semantic/wisent/comp.el line 2273, in commit = 390b4bc1e25fe691548d7ec982eb2f7027fe26a3 [2]. That commit introduced a = mechanism to ignore =E2=80=9Cexpected conflicts=E2=80=9D via a symbol = whose name is constructed on the fly like this: (format "wisent-%s--expected-conflicts" (replace-regexp-in-string "\\.el$" = "" src) However, this code doesn=E2=80=99t handle the case where the filename = =E2=80=9Csrc=E2=80=9D is nil. To reproduce the issue, compile a grammar like this: (require 'semantic/wisent/comp) (require 'semantic/wisent/wisent) (defvar tablist-filter-wisent-grammar '( ;; terminals ;; Use lowercase for better looking error messages. (operand unary-operator binary-operator or and not) ;; terminal associativity & precedence ((left binary-operator) (left unary-operator) (left or) (left and) (left not)) ;; rules (filter-or-empty ((nil)) ((?\( ?\)) nil) ((filter) $1)) (filter ((operand) $1) ;;Named filter ((operand binary-operator operand) `(,(intern $2) ,$1 ,$3)) ((unary-operator operand) `(,(intern $1) ,$2)) ((not filter) `(not ,$2)) ((filter and filter) `(and ,$1 ,$3)) ((filter or filter) `(or ,$1 ,$3)) ((?\( filter ?\)) $2)))) (wisent-compile-grammar tablist-filter-wisent-grammar) ;; error =3D> =E2=80=9Creplace-regexp-in-string: Wrong type = argument: arrayp, nil=E2=80=9D Thank you, Neil [1] https://github.com/politza/tablist = [2] = http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=3Demacs-27&id=3D390b4= bc1e25fe691548d7ec982eb2f7027fe26a3 = --Apple-Mail=_D098F13A-E186-4A69-A27E-FB8D0DA65E30 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

This bug was detected = while running docker.el and other packages that depend on tablist [1]. =  Tablist is an extension of tabulated-list-mode that provides the = ability to filter the tabulated list via an expression language. I am = not the author of tablist however the author is aware of this = issue.

In = 27.0.90, tablist is now giving an error when entering its expression = editor.  In the debugger I traced the error to = wisent-total-conflicts in lisp/cedet/semantic/wisent/comp.el line = 2273, in commit 390b4bc1e25fe691548d7ec982eb2f7027fe26a3 [2].  That = commit introduced a mechanism to ignore =E2=80=9Cexpected conflicts=E2=80=9D= via a symbol whose name is constructed on the fly like this:

  =   (format "wisent-%s--expected-conflicts"
 =                     =               =  (replace-regexp-in-string "\\.el$" "" src)

However, this = code doesn=E2=80=99t handle the case where the filename =E2=80=9Csrc=E2= =80=9D is nil.

To reproduce the issue, compile a = grammar like this:

    (require = 'semantic/wisent/comp)
    (require = 'semantic/wisent/wisent)

    (defvar tablist-filter-wisent-grammar
      '(
    =     ;; terminals
      =   ;; Use lowercase for better looking error messages.
        (operand unary-operator = binary-operator or and not)

        ;; terminal associativity & = precedence
        ((left = binary-operator)
        =  (left unary-operator)
      =    (left or)
        =  (left and)
        =  (left not))

        ;; rules
        (filter-or-empty
         ((nil))
         ((?\( ?\)) nil)
         ((filter) $1))
        (filter
 =        ((operand) $1) ;;Named filter
         ((operand binary-operator = operand) `(,(intern $2) ,$1 ,$3))
    =      ((unary-operator operand) `(,(intern $1) = ,$2))
         ((not = filter) `(not ,$2))
        =  ((filter and filter) `(and ,$1 ,$3))
  =        ((filter or filter) `(or ,$1 ,$3))
         ((?\( filter ?\)) = $2))))

  =   (wisent-compile-grammar tablist-filter-wisent-grammar)

    ;; error =3D> = =E2=80=9C
replace-regexp-in-string: Wrong type argument: arrayp, = nil=E2=80=9D


Thank you,
Neil



= --Apple-Mail=_D098F13A-E186-4A69-A27E-FB8D0DA65E30--