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: Sun, 17 Jan 2021 14:57:37 -0500 Message-ID: <55bf727a-761c-ff52-7688-8946a3df1d86@gmail.com> References: <5cf47a13-e71f-6f3b-f763-335696989942@siege-engine.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------9DC9FFE536159BF80EFAC069" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14572"; 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 To: Stefan Monnier , Eric Ludlam Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 17 20:58:38 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 1l1EC6-0003f3-0g for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Jan 2021 20:58:38 +0100 Original-Received: from localhost ([::1]:50760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1EC5-00013V-3p for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Jan 2021 14:58:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1EBE-0000aU-2v for emacs-devel@gnu.org; Sun, 17 Jan 2021 14:57:45 -0500 Original-Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:41021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1EBA-0007Te-PR for emacs-devel@gnu.org; Sun, 17 Jan 2021 14:57:43 -0500 Original-Received: by mail-qv1-xf2d.google.com with SMTP id h16so6601603qvu.8 for ; Sun, 17 Jan 2021 11:57:40 -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-language; bh=oFr3RyoIEW33kBLoVO7uJfXIJ1YtyoiADe6f6iZYZVs=; b=KsiHt0DyA1sJ5+Ps1mjZlIF4WM2EMu7ksI2BKOG6tRxSHGyjqlua7tU3Y4Oz//X9Dt 7iipklLGrTtGW363JZ5RKjE3uy/czdycZd21nk7421+wxrQubnkoYCLbcKGODOMWHCky 4HwFWkJbp9aSDUeY8maKDl4dUPWDLhGtX2CI+1Slba4H0qI+RDz6kCS3CSpX7wJd1MeE q5uxPnluD+pLjbXYwR2al8mfV587tZG1pWeiESU55SoAXIQyLSmb4OkP131GcN1Ncd2E lb6MsQrGOqElWf9psKJ2Xi3HWgSjgrkQnwzhP5eGCLkRNoUdIToKbn7YogyxynBvhm9V iROw== 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-language; bh=oFr3RyoIEW33kBLoVO7uJfXIJ1YtyoiADe6f6iZYZVs=; b=Tdn01tHKxOZhjV20BZ8KliAoFC+8ZcY6ie6AhNk8Bau7KGe9MROHzl4MnSfLVknURy pB0lTxPlBXySn2NblLu2e9qwtiea10zOcGHx2MKOIwavVWsuS2aFFkrJFfdjjkth06QK GEBIJ3VIISlFMqJZmzjnC+hAV0gFVnx/2XYXNKLVJU0yVx3L8nmRAI6gBBKeNZRp6Ydm vMA1FZhgDMFwYMEjBpDRRmirieejlYPiAxpKNpFbz/jxvds1XT8xg01QXsxW3DJDz3OQ ChnzL22HqtbutzBYe6VQf5nxr/YHnCqaaZeRMkQWjv4v0SlY2nvrTWXSgQ4OLHhnA+RG 15bQ== X-Gm-Message-State: AOAM531uE+cDs5SA3/3jgV8xMroTNiJcysCBLlX9I77dXpYPPbDzTDjr un+vCPPiThLg3i1Tfq26H23SwzVp8uE= X-Google-Smtp-Source: ABdhPJz6y9EBWHYoKa3NDmwLXQLyb1NxAVxIzCdpsNAk7ZgHCcyNzYRgWDBtQhxnhmObwhSr/evLKw== X-Received: by 2002:a05:6214:370:: with SMTP id t16mr21516651qvu.22.1610913459304; Sun, 17 Jan 2021 11:57:39 -0800 (PST) Original-Received: from ?IPv6:2601:184:80:3a60:f9af:bf97:8ca4:ebde? ([2601:184:80:3a60:f9af:bf97:8ca4:ebde]) by smtp.googlemail.com with ESMTPSA id t17sm631942qtq.57.2021.01.17.11.57.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Jan 2021 11:57:38 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::f2d; envelope-from=ericludlam@gmail.com; helo=mail-qv1-xf2d.google.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 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.252, 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:263134 Archived-At: This is a multi-part message in MIME format. --------------9DC9FFE536159BF80EFAC069 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 1/11/21 4:21 PM, Stefan Monnier wrote: >> Attached are two proposed patches related to compatibility for EIEIO >> and EDE. > Thanks, pushed both to `master`, Attached is one more small patch I had missed in my previous set. This change is independent of the other two.  This is also needed to load Project.ede files that happen to include custom rules, where those rules are also objects.  The Project loader's error checking in eieio-base.el requires the :type to be precise when the value can be a list of objects. I used the same basic mechanism used in ede/base.el for ede-project's 'targets' slot. If you want to verify the changes, this project uses the feature: https://sourceforge.net/p/matlab-emacs/src/ci/master/tree/ Use global-ede-mode and visit this project. Thanks Eric --------------9DC9FFE536159BF80EFAC069 Content-Type: text/x-patch; charset=UTF-8; name="0003-lisp-cedet-ede-proj.el.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0003-lisp-cedet-ede-proj.el.patch" >From d07f0c4711fa8f82c4415a2a69d0338006088205 Mon Sep 17 00:00:00 2001 From: Eric Ludlam Date: Sun, 17 Jan 2021 14:41:51 -0500 Subject: [PATCH 3/3] lisp/cedet/ede/proj.el: (ede-makefile-rule-list): New type. (ede-proj-target-makefile): Set :type of :rules slot to ede-makefile-rule-list. This enables Project files to load. Author: Eric Ludlam --- lisp/cedet/ede/proj.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index 59628ebf4c..78b852378c 100644 --- a/lisp/cedet/ede/proj.el +++ b/lisp/cedet/ede/proj.el @@ -150,6 +150,9 @@ ede-proj-target ) "Abstract class for ede-proj targets.") +(unless (fboundp 'ede-makefile-rule-p) + (cl-deftype ede-makefile-rule-list () '(list-of ede-makefile-rule))) + (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 :custom (repeat (object :objecttype ede-makefile-rule)) :label "Additional Rules" :group (make) -- 2.25.1 --------------9DC9FFE536159BF80EFAC069--