From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 610dad1: Revert "Prevent name clashes between CL structures and builtin types" Date: Sun, 07 Jan 2018 10:46:30 -0500 Message-ID: References: <20180107131517.9297.20852@vcs0.savannah.gnu.org> <20180107131518.3583A20487@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515339941 22184 195.159.176.226 (7 Jan 2018 15:45:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2018 15:45:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Philipp Stephani To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 07 16:45:37 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYD8h-0005H8-00 for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2018 16:45:35 +0100 Original-Received: from localhost ([::1]:56939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYDAg-0004ZO-AI for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2018 10:47:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYD9x-0004Yq-8S for emacs-devel@gnu.org; Sun, 07 Jan 2018 10:46:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYD9u-0007AR-4r for emacs-devel@gnu.org; Sun, 07 Jan 2018 10:46:53 -0500 Original-Received: from pmta11.teksavvy.com ([76.10.157.34]:4028) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYD9t-00079e-Ug for emacs-devel@gnu.org; Sun, 07 Jan 2018 10:46:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2GtZQCSQFJa/yyKSC1cHQEBBQELAYM/g?= =?us-ascii?q?VqOQ45xggJ9mEKFRQKEMkMUAQEBAQEBAQEBA2gohSUBBAF5BQsLDScHCxQYim0?= =?us-ascii?q?ItAQhAooNAQEBBwIBJYY1gz+CeDaFaoUwBYpMh1mBFF6PR6FMKIdTmFM2I4FQM?= =?us-ascii?q?hoIMIJogwiBbCOKTgEBAQ?= X-IPAS-Result: =?us-ascii?q?A2GtZQCSQFJa/yyKSC1cHQEBBQELAYM/gVqOQ45xggJ9mEK?= =?us-ascii?q?FRQKEMkMUAQEBAQEBAQEBA2gohSUBBAF5BQsLDScHCxQYim0ItAQhAooNAQEBB?= =?us-ascii?q?wIBJYY1gz+CeDaFaoUwBYpMh1mBFF6PR6FMKIdTmFM2I4FQMhoIMIJogwiBbCO?= =?us-ascii?q?KTgEBAQ?= X-IronPort-AV: E=Sophos;i="5.46,326,1511845200"; d="scan'208";a="17570107" Original-Received: from unknown (HELO pastel.home) ([45.72.138.44]) by smtp.teksavvy.com with ESMTP; 07 Jan 2018 10:46:30 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 644AD6049F; Sun, 7 Jan 2018 10:46:30 -0500 (EST) In-Reply-To: <20180107131518.3583A20487@vcs0.savannah.gnu.org> (Philipp Stephani's message of "Sun, 7 Jan 2018 08:15:17 -0500 (EST)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.10.157.34 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:221669 Archived-At: > This reverts commit 151496a4b96430924bc148f85b9c8471d1e132b1. > That commit breaks bootstrap builds due to a cyclic dependency. Oh, yes, this part of the bootstrap is a bit tricky! I suggest you only add the check to the `cl-defstruct` macro. After all, this is the main entry-point (`cl-define-struct` should not be used directly anyway) and it's the one that gives the earliest warning/error. Stefan > --- a/lisp/emacs-lisp/cl-preloaded.el > +++ b/lisp/emacs-lisp/cl-preloaded.el > @@ -36,7 +36,6 @@ > > ;;; Code: > > -(eval-when-compile (require 'cl-generic)) This definitely needs to go, yes. > (eval-when-compile (require 'cl-lib)) > (eval-when-compile (require 'cl-macs)) ;For cl--struct-class. > > @@ -51,12 +50,6 @@ > (apply #'error string (append sargs args)) > (signal 'cl-assertion-failed `(,form ,@sargs))))) > > -(defun cl--struct-name-p (name) > - "Return t if NAME is a valid structure name for `cl-defstruct'." > - (and name (symbolp name) (not (keywordp name)) > - (not (memq name (eval-when-compile cl--generic-all-builtin-types))) > - t)) But this could stay. Just test (boundp 'cl--generic-all-builtin-types) before using it. I'd add "valid/acceptable/available/can-be" to its name, tho, otherwise it makes it sound like it will indicate if the symbol *is* a struct-name. Stefan