From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: eieio-base patch to support EDE project loading Date: Sun, 6 Oct 2019 08:18:08 -0400 Message-ID: <13d0ce18-013c-94b7-ea2e-bef5a6687bb4@siege-engine.com> References: <8d7cb453-41c9-f3eb-8395-01cb46079663@siege-engine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="255756"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cc: Emacs Development To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 06 14:18:24 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iH5UW-0014O4-Dh for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 14:18:24 +0200 Original-Received: from localhost ([::1]:33418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iH5UU-0001Gl-KB for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 08:18:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54859) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iH5UL-0001Ge-Jf for emacs-devel@gnu.org; Sun, 06 Oct 2019 08:18:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iH5UK-0006ET-Iy for emacs-devel@gnu.org; Sun, 06 Oct 2019 08:18:13 -0400 Original-Received: from mail-qk1-f181.google.com ([209.85.222.181]:43032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iH5UK-0006EE-FX for emacs-devel@gnu.org; Sun, 06 Oct 2019 08:18:12 -0400 Original-Received: by mail-qk1-f181.google.com with SMTP id h126so10091137qke.10 for ; Sun, 06 Oct 2019 05:18:12 -0700 (PDT) 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 :content-transfer-encoding; bh=qZra1fyfAiGTab6DWz6ZG2WKGnNgsjRuriQ7HC5d3d0=; b=BHj6GLz7IgKoNq6wOuFrHknWFBHuPClHoaW5yIq6GFXF4szNfi22wZqwwhfjHey9+R ZwabhSxr0kd5AQneR+YIkQhvTMDIxmcZsav88nRLXa9sKV/P9zmaaZZnbjygmHJ56TWH p9O9XY8ldoxgYKYxFMUC1qGKV6JBTDDOiqAwxeenvwdEYKoxXNnKTVYKIls9eCPRR1oz xXkjPPNlSoSTGxCzKznlTjbAb/h4flC5BtsfFIsbtfPKX6aAh7YZTcDjunDfNLs7P1Hm 9SDywf82RqncSL0FXzEU9iVtaJ9YhK8WebIFAJ/MCemqDA+XehvCirMwOwWuD+PANBes jq+A== X-Gm-Message-State: APjAAAWr5QqOy3m7SgvF4t8ePbWxMpOKLYVqJo0Fnd3DQlW22f3I0LVT ZVHPT2fKiCXDDxdh4RlYcjD7Qky84Vc= X-Google-Smtp-Source: APXvYqyzsyYXhX2LRLhL22HnKYbWh3wmATgQVfStWj2H50ocJAUIschzjVTHB/s8faEweZqH3DsMLQ== X-Received: by 2002:a37:5f47:: with SMTP id t68mr19658595qkb.497.1570364290713; Sun, 06 Oct 2019 05:18:10 -0700 (PDT) Original-Received: from [192.168.1.202] (pool-108-20-30-136.bstnma.fios.verizon.net. [108.20.30.136]) by smtp.googlemail.com with ESMTPSA id n4sm5725260qkc.61.2019.10.06.05.18.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Oct 2019 05:18:09 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.222.181 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240641 Archived-At: On 10/4/19 4:45 PM, Stefan Monnier wrote: >> Without that list of superclasses, `child-of-class-p' fails. Since having >> the superclass list in autoloads is a non-starter, this patch will >> un-autoload classes found in the file being read before the call to >> `child-of-class-p'. > > Looks good, but I felt like those un-autoloads scattered around felt > a bit haphazard (with tests slightly different each time), so I suggest > the patch below instead, WDYT (which also moves the un-autoload to > child-of-class-p so it applies not just to > eieio-persistent-validate/fix-slot-value but to all users of > child-of-class-p). Patch looks like a good idea to me. I was worried about overhead of always checking and un-autoloading, but this patch seems to deal with that nicely. The original problem arose when trying to identify the class parents. Perhaps using eieio--full-class-object in eieio-class-parents would cast a slightly wider net? > >> It would be better to store the superclasses in the autoload declaration so >> that extensible class hierarchies can be more dynamically loaded without >> internal checks with un-autoload, but I don't know enough about how the new >> version of eieio works to provide that patch. > > It would allow child-of-class-p to be computed without loading the > class, hence a bit more laziness, but I'm wondering how often it would > make a real difference: how likely are you to use child-of-class-p > without either already having an instance of that class or being right > about to build such an instance? I agree. The patch solves the problem in a more pragmatic way. > Can you test the patch below before I push it? It works great. Thanks for looking into it! Eric