From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: Compatibility patches for EDE / EIEIO Date: Mon, 18 Jan 2021 11:52:32 -0500 Message-ID: <40993b3e-ad3f-9514-6fb3-8c0a220305db@gmail.com> References: <5cf47a13-e71f-6f3b-f763-335696989942@siege-engine.com> <55bf727a-761c-ff52-7688-8946a3df1d86@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37058"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: emacs-devel@gnu.org, Eric Ludlam To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 18 17:59:08 2021 Return-path: Envelope-to: ged-emacs-devel@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 1l1Xrw-0009Xq-Be for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Jan 2021 17:59:08 +0100 Original-Received: from localhost ([::1]:33374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1Xrv-0001Rp-BB for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Jan 2021 11:59:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Xle-0003E3-T0 for emacs-devel@gnu.org; Mon, 18 Jan 2021 11:52:54 -0500 Original-Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:32962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1Xlb-0005qf-AU for emacs-devel@gnu.org; Mon, 18 Jan 2021 11:52:38 -0500 Original-Received: by mail-qv1-xf36.google.com with SMTP id a13so7792418qvv.0 for ; Mon, 18 Jan 2021 08:52:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=5W+AndKfrIfZFRTNE0zVu8CMv5JbSZnY9l2406Tl+fQ=; b=Ac61Up+7jiFrbU7K7sM9TIcfJZe2EgHIV6ayhDAie/NpXmGwlfZQ29SSCz2Fx4MBp3 X+uWf/jiYjqIqffoafo7C64KCvfECLZYwJjAq8TYqXJ8JZhy4o6Gu16VYd2y0+c/nfZK RBCllnvBUYh/DAAkZQlmyUhRg2qqGK+7seQ0GEQJGf7WM150uhpD2zC3xQTUGhaxAJ7Z G3DM887sOK75EptFooINfbR5wlHWHOZVbjHCu/2h9zHFoNJmVV+s5stb4AW+rfhoFqqG /GTQPZgS8VSeiJC9zigiQIDLt4MawRiVAsL73gUmq5vo6SJSxmOkSgt9mNOezzn66s0Y ze/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=5W+AndKfrIfZFRTNE0zVu8CMv5JbSZnY9l2406Tl+fQ=; b=Kk6P1N7/Li9xuVx7RfiOrAiMwBnqU7yyshP7fhfnCATK4JEnd1vrT53av6KYl7/7PI Xt8xSePk9y/fnVtuGQOQMcrLKmihwLtIJP59Fjb0PmD7s5icBptivleJ/YBSGdXxsVI7 9VLdqgGD8emW077zN/rFg5rIkJKjnGRQeiSis5TPGUQsxjmSYtC1R3ZVrS8xTS/WnFtZ LLYEfPZN9GcSTlIoFiKXYe7fGs7E5pm9jaN+iGTyU2F/bk4fu9ND7wUYF0J23r9isSRC ejsjHJjYAKslEMSBn61Hg6ZDTAEZ6AVHrdNkc5cabqixKZf+UgUFJ7r0IsDoWr+SKR27 MsFQ== X-Gm-Message-State: AOAM532md27iNo+73fphpBvsn66TYraB+UIG1Sow3JkUpb6j+JMosUgb TM+MQTwLm98H1C3SlwnaOPLaY9qWCLc= X-Google-Smtp-Source: ABdhPJyLD4S3ALwgYX2obmaTDBfSgA1Rir0hfRtiS6+8wGCPLi5wInKyY73+gd7fU2bYJlEJgXJDWw== X-Received: by 2002:a0c:bd9f:: with SMTP id n31mr298424qvg.42.1610988753972; Mon, 18 Jan 2021 08:52:33 -0800 (PST) Original-Received: from [192.168.1.161] (pool-108-20-30-136.bstnma.fios.verizon.net. [108.20.30.136]) by smtp.googlemail.com with ESMTPSA id i18sm11112146qkg.66.2021.01.18.08.52.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Jan 2021 08:52:33 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=ericludlam@gmail.com; helo=mail-qv1-xf36.google.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.194, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263151 Archived-At: Thanks for looking at my patch, The short answer to your questions is that I'm not very familiar with how the typing system works with the latest eieio changes.  I'm fine with the proposed use of (list-of ...) as it seems much simpler and more obvious. I would expect you would want to make the same change in ede/base.el around line 172, which is the code I used as a template to make :rules work.   Maybe something like the below patch? I suspect the fboundp part was transitional when the old auto-generated predicates were deprecated. Maybe useful in an external bit of elisp that needs to support multiple versions, but not here.  Thanks for pointing this out. Eric diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index 7799746e0c..b26984712a 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el @@ -160,8 +160,6 @@ ede-project-placeholder  ;; Projects can also affect how EDE works, by changing what appears in  ;; the EDE menu, or how some keys are bound.  ;; -(unless (fboundp 'ede-target-list-p) -  (cl-deftype ede-target-list () '(list-of ede-target)))  (defclass ede-project (ede-project-placeholder)    ((subproj :initform nil @@ -169,7 +167,7 @@ ede-project          :documentation "Sub projects controlled by this project.  For Automake based projects, each directory is treated as a project.")     (targets :initarg :targets -        :type ede-target-list +        :type (list-of ede-target)          :custom (repeat (object :objectcreatefcn ede-new-target-custom))          :label "Local Targets"          :group (targets) On 1/17/21 5:16 PM, Stefan Monnier wrote: > Hi Eric, > >> +(unless (fboundp 'ede-makefile-rule-p) >> + (cl-deftype ede-makefile-rule-list () '(list-of ede-makefile-rule))) > I don't understand the (fboundp 'ede-makefile-rule-p) test, maybe it > deserves a comment? > >> (defclass ede-proj-target-makefile (ede-proj-target) >> ((makefile :initarg :makefile >> :initform "Makefile" >> @@ -184,7 +187,7 @@ ede-proj-target-makefile >> commands where the variable would usually appear.") >> (rules :initarg :rules >> :initform nil >> - :type list >> + :type ede-makefile-rule-list > How 'bout using > > :type (list-of ede-makefile-rule) > > ? > > > Stefan >