From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Permanently fix org versioning breakage during builds? Date: Mon, 25 Dec 2023 13:58:38 +0000 Message-ID: <87edfao035.fsf@localhost> References: <25989.50971.995591.385250@google.com> <87a5q0dc9m.fsf@localhost> <87edfbbyzm.fsf@localhost> <875y0n4px0.fsf@localhost> <87r0jb34hi.fsf@localhost> <878r5j31v0.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "T.V Raman" , emacs-devel To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 25 14:56:18 2023 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 1rHlRK-0004eR-7a for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Dec 2023 14:56:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHlQb-0004IL-Vc; Mon, 25 Dec 2023 08:55:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rHlQZ-0004I0-NB for emacs-devel@gnu.org; Mon, 25 Dec 2023 08:55:31 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rHlQX-0000cd-Cv for emacs-devel@gnu.org; Mon, 25 Dec 2023 08:55:31 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5C25D240028 for ; Mon, 25 Dec 2023 14:55:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1703512526; bh=H3e9vhKIKmWrVsTkr6YLuARCLxLWSIWYWqSy2GkPgyg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=VReZYpwSNe1ywMpZQhcccwOqR/YjitOuqMq+7sY2mFC6++Nl/sUTvrwH1uV/K6sd+ ouqZTLmht9t6Z1eUe3CI6FLUsClwIimhrwVSniqoYXIfhHHx6OWSGxii1eDOjDyGEp IHBxiOq6jpTtUFQaUGU/lMoPov5MsSS9LJZzChyt5U08xLMABv4b7oTEUt1SH9T6hM HxD4z0VzLIodvdmZenlpVTbml1+eYX+VaBryUURzq5joLy09VFbwDaKLLu4NdXtZCY /SgKuK1HiwzOeVmLopBAlgycmIjMbR5OnNajXDerf/fN0oSH5ef9X0ZiphxHBYtqyi B1DtY2QIPNW1A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SzKDF52PXz6tyJ; Mon, 25 Dec 2023 14:55:25 +0100 (CET) In-Reply-To: Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314206 Archived-At: Jo=C3=A3o T=C3=A1vora writes: >> Any use of (funcall 'symbol ...) means that compiler is not able to know >> the function slot of 'symbol at compile time, because it may change. >> Hence, any optimization that relies upon knowing both the context of the >> funcall and the internals of 'symbol will become impossible. > > It's not even a symbol that is in question. And whatever this > function-calling, it is more than probably dwarved by the cost of the > remaining macro expansion. If you were making, say, a sequence processing > library it would have to be measured. But here I'm 99.9% sure there's no > efficiency downside. Just in allocation costs alone, your macro creates > buffers, copies things, etc and then there's the expanded body. Just fixi= ng > the bug I've found will more than pay for it likely. I doubt that you are right about 99.9%, because I know that we have some macros (like `org-with-wide-buffer') that are utilized in performance-critical code - org-element-cache. And it is not the only concern why I do not feel that your suggestion is a good idea: - The problem with stale macros is not just Org mode's problem - it is the problem with Elisp compiler machinery. A very hard one that is non-trivial to solve. - The rest of Emacs just leaves the problem with macros as is and the only reason why Org mode touched it is that it was simply a side effect of how org-assert-version is implemented - it is first and foremost aiming at handling the issue with multiple Org mode versions being loaded at the same time, while the side effect of detecting stale macros was a bonus. - Even if I solve the problem with macros using the technique you proposed, the problem with mixed versions still has to be handled. - Further, fixing the stale macro problem means rewriting all the existing, and, more importantly, future Org mode macros - an extra maintenance burden which I am very hesitant to take. - And that maintenance burden also comes with an additional downside of potential performance degradation. So, all-in-all, I do not see the idea with wrapped macros as something practical for Org mode. For now, I will go ahead and disable org-assert-version checks when compiling Org mode within Emacs tree, leaving it enabled when Org is installed by other means. This will have a downside of missing detecting mixed versions when ELPA version of Org mode is loaded first, followed (somehow) by built-in Org version. But I think that such scenario is uncommon enough - one would have to delete newer Org mode from load-path, which would be a call for trouble anyway. I also hope to find a more robust approach for org-assert-version that will not annoy users with warnings/errors. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at