From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cGiKBsIQrGN7XAAAbAwnHQ (envelope-from ) for ; Wed, 28 Dec 2022 10:47:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oPjKBcIQrGM33AAAG6o9tA (envelope-from ) for ; Wed, 28 Dec 2022 10:47:46 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8E61CF1C2 for ; Wed, 28 Dec 2022 10:47:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAT1i-0007fq-25; Wed, 28 Dec 2022 04:47:10 -0500 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 1pAT1R-0007bb-Ai for emacs-orgmode@gnu.org; Wed, 28 Dec 2022 04:46:56 -0500 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 1pAT1P-0006Ms-8J for emacs-orgmode@gnu.org; Wed, 28 Dec 2022 04:46:53 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2051424015B for ; Wed, 28 Dec 2022 10:46:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672220806; bh=7lbj8oOeY7Fbv21wFpFUVXt2MNxQv+j+Fxt2vRESZ+Y=; h=From:To:Cc:Subject:Date:From; b=STPuNA57C7fi+vaXpRh2FqrbqYagFs/tFPrQhNZYH4+jHRK6PXuAzPW3kivtaCqLS R3L72WUk/WK/thSRGZRKWPrWR4uG42Otu4gjR92Pa70eDJ4Y6h6CSdu5kqLYMn3rTl gpRsfZZa0/lmvtbUI52hV/rZxT3ufQ3QflkV8U2e07Km8OgJrSLdnZYpLthYMrMJBq 5wgFwsFRt7//vagRrocDMmukagRXpMZGZCbyLL5vra9jIzBGEwIkLQzAZH4fWHX7qX VibopeYPkevHOYM6FSAym4nHZgNvdAEYQ6jD0w7ZjrkmzZ6FskjVGc6jjQz7wmE95p 3j7xAc6m9ZN5Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NhmrN3qPwz6tnL; Wed, 28 Dec 2022 10:46:44 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Bug? org-assert-version does not prevent mixed install In-Reply-To: References: <878rj47tj0.fsf@localhost> <87h6xs6b52.fsf@localhost> Date: Wed, 28 Dec 2022 09:46:35 +0000 Message-ID: <87a63797yc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672220865; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZtKCuet22vLVArMHUk9nHTNWVqf1Buwb4ysuLP3GcIo=; b=jHL2VAmXIUXDErMRbJqNSX0v9zk43cyAvYEv0JgARA4FXd20A2Uu8Ma82BX0Fll1bzN6E3 cQoGb2DF5Bj+k0vGzWkEHtajMPSxsZaaPfRycxL9IDJEhgejQBIR+gIyyhDxN8LEqbFnUd NhX9ivj6+xTYMOx0ogGCXLyHz6zvP2MowNihvmaZHKViycZ39y0oyRvNxuk6BUdwJPL3us IzQDe36Ax8BacwZ4gf8OzlmTQO/MjXOkTKBerwsFrI1B+XStfz8N7U3EN2V0viWqp2CHqv Agc6SbAG+ZlYFX86oY7fdJj112EkQKkSs4wcOs8U68dcBe0hsagcbC2waNMc5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=STPuNA57; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672220865; a=rsa-sha256; cv=none; b=QjYbHeK/clWbfJGA+6F35ER72uEXufL1yLq9+LHkofwH7KXKdTD7fWygBbuxai9GfAP1Cb cGuF8RR9UnrHF/XdwIKGHUNytVVNFhxLUI08EQTKWzn+ZTxgfF1l1amKqs/zWfHjh6i4YN R7YmxKDzs8QecL+u8U1pEQXWejAXZmmmpbpIK+45KdItKXc+dLBP3iFJgg/jwGCrG/cP5l 78EPKcFQE70Qq+3zqbsonjLZGks4RftiUe9ckReKrGRczb+8hvzTqmOgJQ4a3AgC7Q334G 1iwoQ8ZO1rCJZW8RVs4OR+caJ7sqzhJpPPuTAjQNgrLVp+1PO8b4hnsNkx/p4Q== X-Spam-Score: -4.47 X-Migadu-Queue-Id: 8E61CF1C2 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=STPuNA57; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.47 X-TUID: DV64seixJUZH Max Nikulin writes: >>>> We might do something like >>>> >>>> (eval-and-compile (org-assert-version)) >>> >>> This will give obscure error during compiling since `org-assert-version' >>> is not defined. >> >> Yes, but we will at least abort the compilation this way. > > You are right that it prevents creation of .elc files. Unfortunately > `byte-recompile-directory' converts failure into a message instead of > aborting package install completely. > When used consistently, it should cause load of Org completely > uncompiled during next Emacs session. It is better than having > incorrectly compiled files. > > Notice that `org-assert-version' works for compiled files only, so if a > user loads some third-party package (hyperbole?) that loads built-in Org > and later adds new Org to `load-path' then we get an obscure error again. I think that most reliable approach in this situation would be pulling `org-assert-version' into a dedicated new file, similar to what you suggested below. That way, we will not have feature cashes. However, I am concerned about what is going to happen if wrong org-version is defined during compilation. `org-assert-version' can then be compiled with wrong org-version value and later produce similar obscure error. Can you test such scenario using your Debian reproducer? > In addition I have noticed that e.g. org-matlab.el contains > > (require 'org-macs) > (org-assert-version) > > Shouldn't it be (eval-when-compile (require 'org-macs)) since no > functions are used from this file? Some files have duplicated (require > 'org-macs). org-macs is pulled in by Org feature dependencies anyway. So, it does not matter in practice. I also left the duplicates consciously to keep the same pattern with `org-assert-version' usage. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at