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: Sun, 24 Dec 2023 12:50:45 +0000 Message-ID: <87plyv7oii.fsf@localhost> References: <25989.50971.995591.385250@google.com> <87a5q0dc9m.fsf@localhost> <87y1djc1c9.fsf@localhost> <87zfxzdbna.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19288"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "T.V Raman" , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , emacs-devel To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 24 13:48:43 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 1rHNuK-0004m2-JP for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Dec 2023 13:48:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHNtO-00005y-Tm; Sun, 24 Dec 2023 07:47:42 -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 1rHNtM-00005Z-0P for emacs-devel@gnu.org; Sun, 24 Dec 2023 07:47:40 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rHNtJ-0008Dc-FL for emacs-devel@gnu.org; Sun, 24 Dec 2023 07:47:39 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A1B8E240103 for ; Sun, 24 Dec 2023 13:47:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1703422053; bh=081XyvlyPOrplq9oSRAb2Bni/sQo5ezpJp4F1REgiso=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=mJhT7nMNCTdtPRCbVoKrg8FGvHiaC6L3XIVWVNWWG0vljIa415xpQcumcXGa5jEVv XvLT2IOtteGfKZ54GP6pEw3L1RS8SGLUl6z7beKiFNG7B6FmL2VKvrGf395X6VVzMW dlM398p6Al/2DjuiwhPSh7QtOZZWxeXJhPxYnAnN4RtuIBVrOudkMX+pwQowjZvt4R 2LPUjjbozTaFC3Nel5++FamNUJMJBXGQCJVcZGkBsu5fbxknnkhpMKN8adATlLg7Cn PJe7YuEmvJ/teZskvOXEaebCBkLsdereWubxJgYJjgRGSoOGXSkt3RDh+Mrvns0chR MgowIxigT1SZg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SygmN5tcTz6tsB; Sun, 24 Dec 2023 13:47:32 +0100 (CET) In-Reply-To: <87zfxzdbna.fsf@yahoo.com> Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.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=-1, RCVD_IN_MSPIKE_WL=-0.01, 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:314120 Archived-At: --=-=-= Content-Type: text/plain Po Lu writes: > Ihor Radchenko writes: > >> I now converted that error into warning, so that it is no longer >> blocking. > > Thanks, but ideally Emacs should not display warnings loading built-in > files, however they were built, unless a definite problem exists that > requires they be compiled afresh. Org cannot change so dramatically > from one moment to the next, as the frequency of these warnings would > suggest, that each warning or error it signals is justified. Yes, Org cannot change so dramatically. However, when Org does change its macros in breaking ways (for example, to fix a bug), it is very hard to figure out what goes wrong in the case when we get a mix of old and new .elc files. That's why `org-assert-version' was written in the first place. > What do you say to disabling the mechanism for version checks in Org as > distributed with Emacs? Nothing will be lost, since AFAIU the check > exists for the sake of conflicting Org installations set in place by > package managers rather than Emacs itself. Considering the existing stance that it is ok to break things occasionally due to stale macros when running make on Emacs git repository, I see no problem disabling these checks for built-in Org mode. Tentatively, it may even be done without affecting version check for out-of-tree builds. See the attached patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-assert-version-Disable-version-check-in-.elc-fil.patch >From eadeaa85336e01a5c3d5ac3d5088a83d627d1fc7 Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Sun, 24 Dec 2023 13:47:04 +0100 Subject: [PATCH] org-assert-version: Disable version check in .elc files for built-in Org mode * lisp/org-macs.el (org-assert-version): Record `org--inhibit-version-check' during compile time inside `org-assert-version'. This way, .elc files generated when compiling built-in Org mode in Emacs git tree never trigger version mismatch warning. Link: https://yhetil.org/emacs-devel/87zfxzdbna.fsf@yahoo.com --- lisp/org-macs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 10ef9d06b..fd083ca62 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -56,7 +56,7 @@ (defmacro org-assert-version () ;; `org-assert-version' calls would fail using strict ;; `org-git-version' check because the generated Org version strings ;; will not match. - `(unless (or org--inhibit-version-check (equal (org-release) ,(org-release))) + `(unless (or ,org--inhibit-version-check (equal (org-release) ,(org-release))) (warn "Org version mismatch. This warning usually appears when a built-in Org version is loaded prior to the more recent Org version. -- 2.42.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--