From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 SDEIOFyjnmMsMAEAbAwnHQ (envelope-from ) for ; Sun, 18 Dec 2022 06:21:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qHQPOFyjnmN8AwAA9RJhRA (envelope-from ) for ; Sun, 18 Dec 2022 06:21:32 +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 50B35353EF for ; Sun, 18 Dec 2022 06:21:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6m6H-0007IF-8l; Sun, 18 Dec 2022 00:20:37 -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 1p6m69-0007G6-I3 for emacs-orgmode@gnu.org; Sun, 18 Dec 2022 00:20:29 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6m67-0000St-W9 for emacs-orgmode@gnu.org; Sun, 18 Dec 2022 00:20:29 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1p6m65-0002uB-OC for emacs-orgmode@gnu.org; Sun, 18 Dec 2022 06:20:25 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Bug? org-assert-version does not prevent mixed install Date: Sun, 18 Dec 2022 12:20:17 +0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671340892; a=rsa-sha256; cv=none; b=UlRnQMOFHS6IN40Kx/Zv+m9c+h2JHuwdbZnm7ZQ0Ta3qSxLk84NWPPmcdCQLhtNILhypik j0v0AHA9eALXNQApQHvqAHgrgExBO3xwznOD1CoUm8AUxGWfdYZScxaEXFQlYPQNFvzNma 33GaVuSRNxAygbeYV/sKO0koD0WvgdVldL9HI4bRpMVhdEnH45IX4Lc8DymPv/p6PzLbuW uuV7NahUpQMQsHKJRyrwXXCELah8p9gj/gfArkCfN6iFxfuWgTxn3WsxH1J51KkWg0n493 Hb7qsvGWfL40KqjKDCSWlkm/2phLmGkfOhhis8Vp281uSmFv3dLuW69gFlX3rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671340892; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=mvyo3td1FU353x2+FhLpMazpLoi2WeisoiwiWutMqiQ=; b=EMYMZoZ1ZcZxutadyMdFUe2Eqt02U1p8vXmWhAkxyJsxpHtqlqFNqXqvGZolFrWtqkVU/+ R+ET0vOoOgafRq/+3b8xZONvH5uVgo6HjiM5LZ6hldOxW6sDsEvBVk3GLh+gFlxez1gcNV /FtwliEBfhg+IhqKuanf4G/8hJPRegQItqYhbrM5RgojQa+MrUu4WmrsG74/9m8W3T7K1r ewKl9BUDx2E+RIwOT6JzAlApyxYIlnaWL9/SIDEIMfYsYOZiXozUBLV1T2hm+RQ7YDmHLd U4CVjpPRTNGpIB3DuekK06Gbahi1m9/hIk2ywIbc94IxZ/iQ0iK5sKtDdJSqXA== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.68 X-Spam-Score: -0.68 X-Migadu-Queue-Id: 50B35353EF X-TUID: bEevmK2Def6m Hi, It seems `org-assert-version' guard is not enough to protect against mixed install. Some code is required to generate a *fatal* error during compilation and a more descriptive error during loading. I decided to look closer at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882 "30.0.50; Compilation of ELPA packages during version upgrade (Org 9.6 ELPA upgrade from older ELPA version)" since the bug lacks explicit and clear steps to reproduce. Let's leave that bug for emacs' stuff and concentrate on Org code here. I have tried the following: - Emacs-27.1 from Ubuntu-22.04 LTS jammy (elpa-org-9.5.2 is not important). I suppose emacs version should be less than 29.0 to avoid built-in Org version having `org-assert-version'. - Since emacs does not allow to specify just `user-emacs-directory' from command line I had to create a new user, so default configuration maybe slightly modified by debian-specific stuff. - "emacs -l org" to ensure that Org is loaded. "-q" or "-Q" are intentionally avoided to allow initialization and saving of modification as for normal emacs session. - M-x list-packages, click org, click install - I get some warnings > Compiling file /home/emcs/.emacs.d/elpa/org-9.6/ob-C.el at Sun Dec 18 04:30:49 2022 > Entering directory ‘/home/emcs/.emacs.d/elpa/org-9.6/’ > > In end of data: > ob-C.el:509:1:Warning: the function ‘org-assert-version’ is not known to be > defined. and even errors. I have not idea why severity is different > Compiling file /home/emcs/.emacs.d/elpa/org-9.6/ob-matlab.el at Sun Dec 18 04:30:50 2022 > ob-matlab.el:43:1:Error: Symbol’s function definition is void: org-assert-version - org.elc is not created as well. - Despite of warnings and errors the following added to ~/.emacs > (custom-set-variables > '(package-selected-packages '(org htmlize))) - next attempt to run "emacs -l org" causes the famous message > byte-code: Invalid function: org-assert-version Is it possible to signal a fatal error during installing using emacs machinery to prevent broken user configuration? My expectation that result of failed compilation is ignored by emacs. It is possible to convert the error to a better one by checking if `org-assert-version' is bound in org.el. I think, the following topics are more suitable for emacs bug tracker or devel mail list: - how to compile packages to avoid issues with already loaded older packages, - what changes are required in package management to roll back failed attempt of installing.