From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.bugs Subject: bug#59882: Multiple versions of Org in load-path problem Date: Sun, 25 Dec 2022 18:46:37 +0700 Message-ID: <96ecff22-8604-3794-671f-75184dcb7d31__34075.9972155624$1671968863$gmane$org@gmail.com> References: <87tu27jq7h.fsf@localhost> <87k032nyok.fsf@localhost> <39a5810d-75bc-4ddb-8722-703f762ed4de@app.fastmail.com> <835yel11x8.fsf@gnu.org> <87edt2qpoa.fsf@localhost> <83359innsp.fsf@gnu.org> <87pmcmt8cc.fsf@localhost> <3bf2e057-4204-cdc8-0847-39a723db4fc8@gmail.com> <809ae318-fe95-1023-6bca-ba827fd01a29@gmail.com> <87fsdfs8vl.fsf@localhost> <4b053e69-87d3-8323-8949-0546b4bb6c1a@gmail.com> <87pmc7stiw.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28315"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: Eli Zaretskii , emacs-orgmode@gnu.org, Stefan Monnier , 59882@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 25 12:47:39 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1p9PTe-0007ER-IM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Dec 2022 12:47:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9PTV-0001rt-JX; Sun, 25 Dec 2022 06:47:29 -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 1p9PT6-0001gM-Tl for bug-gnu-emacs@gnu.org; Sun, 25 Dec 2022 06:47:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9PT4-0006wA-Ng for bug-gnu-emacs@gnu.org; Sun, 25 Dec 2022 06:47:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p9PT4-0001ZS-II for bug-gnu-emacs@gnu.org; Sun, 25 Dec 2022 06:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Max Nikulin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Dec 2022 11:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59882 X-GNU-PR-Package: emacs Original-Received: via spool by 59882-submit@debbugs.gnu.org id=B59882.16719688085985 (code B ref 59882); Sun, 25 Dec 2022 11:47:02 +0000 Original-Received: (at 59882) by debbugs.gnu.org; 25 Dec 2022 11:46:48 +0000 Original-Received: from localhost ([127.0.0.1]:47646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p9PSp-0001YT-L1 for submit@debbugs.gnu.org; Sun, 25 Dec 2022 06:46:48 -0500 Original-Received: from mail-lf1-f41.google.com ([209.85.167.41]:35328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p9PSn-0001YD-JG for 59882@debbugs.gnu.org; Sun, 25 Dec 2022 06:46:46 -0500 Original-Received: by mail-lf1-f41.google.com with SMTP id b3so12881676lfv.2 for <59882@debbugs.gnu.org>; Sun, 25 Dec 2022 03:46:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ihzS7x9v/v2m6dWuJbfAAWuDaNMlDQ5J3z5tmX9uIck=; b=F/jevi5v+jnOUTFhQfqPqOtYVoeUUCfiavsEkQpyECbFv1kmKeUTMUOMaUzGZHKd0a OTE4DyumqaZhGdvmUNtybN1IN/lDBH3lIaUX+QI3S3VZPL7ekgbc4aK943BnG6p3INfL CnSlAyuU3puQI4p17oMzASwFxGGVgH3/5JYiFWnknSZbcmoTVnmoNYlXGOy6pB+4YbZ4 3WijDWDexIZyQIviI0sTD975HCxOObx4WUo4lK8BlIN41As0QJuzH1uotms3c3H6KmPj OXdgHtOmT/z2PEzuwSIxsdLm1/MqEXLKQNU6V3ktpdUb3ZnWzqdwEtfORS9toCr6X4SP 3Fig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ihzS7x9v/v2m6dWuJbfAAWuDaNMlDQ5J3z5tmX9uIck=; b=jeec3loanFAN+H8+XXIj0Tl1eQ4X8QTV7V5DcienE+jx2ZFIEkfLEqNVcjxlQWPCqh akfXO7xt6P3e30/mHmIztmYVkWF64w8GjhXyz+SPlSv0R77EiEt7W+elwi6PsMfJnSQO plDRc2XxiQXqSXsq6pK05/R0XuGy8oRuNX5D8/5v+hPH0VldKZNWQNnGUqDUPd2E4Dvq E1w0Pw5EQbmkFnWp/o8USwW7mk8AipYjYN8DcBHj71fTn6t5BYdsXFrxTJrZ+fD3+QQV ratNAdURccBVu83PukuWH030DmeiqE/ukpJpKnV3ghgyE6LkCZwSJjQQ+BKueFnS1j7y vZrw== X-Gm-Message-State: AFqh2ko6GmcIhEtmRsNiKFZtSWYER/3NY8CWLFgTljTjcrT6Lm39y5WV k4ha/Qyoq162I1r+2UKsOwo= X-Google-Smtp-Source: AMrXdXv9y86GEFs2juVJxp1UajekPW8Dl7y0ZyRNF7aFHVW1JocbzZ/TpIM2fpWmBlb6rfTGliZ11w== X-Received: by 2002:a05:6512:3e10:b0:4a4:68b8:f4f0 with SMTP id i16-20020a0565123e1000b004a468b8f4f0mr4742378lfv.54.1671968799362; Sun, 25 Dec 2022 03:46:39 -0800 (PST) Original-Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id z29-20020a19505d000000b004ab52b0bcf9sm1342856lfj.207.2022.12.25.03.46.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Dec 2022 03:46:38 -0800 (PST) Content-Language: en-US In-Reply-To: <87pmc7stiw.fsf@localhost> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251848 Archived-At: On 18/12/2022 22:40, Stefan Monnier wrote: > Could Someone™ investigate why that code > doesn't do its job. > > The code in question is in `package--reload-previously-loaded` and > my understanding is that it should cause `org-macs` to be reloaded I do not see obvious flaws in `package--reload-previously-loaded' code. My guess is that we get reports from users who have installed released versions of emacs. Notice that my complain concerning failure `byte-recompile-directory', hidden from its caller, is still valid. On 25/12/2022 16:48, Ihor Radchenko wrote: > Max Nikulin writes: > >> I have tried the following in Emacs-27. For Emacs >= 29 add -L to Org <= >> 9.5. Stefan convinced me that I was too optimistic concerning Emacs-29. >> - "emacs -l org" to simulate a regular user session with some opened files. >> - Update to Org-9.6 from ELPA. >> - Close emacs and start it again "emacs -l org" >> >> Result: >> byte-code: Invalid function: org-assert-version > > I tried to follow these steps, but unfortunately I am unable to > reproduce. Everything works fine using Emacs 27 on my side. Strange. I tried it once more in a minimal LXC container with Ubuntu-22.04 LTS jammy. This time I even removed the elpa-org-9.5.2 system package, so built-in version of org is really used. So, emacs-27 - emacs -l org - M-x list-packages RET - / n org RET - move cursor to org, install it - i x y - compilation buffers pops up with warning and errors. Due to "-l org" some libraries like org, org-macs, ob are loaded. Files that `require' already loaded libraries generate warnings Compiling file /home/emcs/.emacs.d/elpa/org-9.6/ob-R.el at Sun Dec 18 04:30:49 2022 In end of data: ob-R.el:562:1:Warning: the function ‘org-assert-version’ is not known to be defined. because `org-assert-version' is defined in org-macs.el, but the old version without it is already loaded. Call to `org-assert-version' is just added to the .elc file. E.g. org-keys.el produce the same warning. Another case is 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 This file contains "(require 'ob-octave)". Attempt of load new version of ob-octave fails because during execution of it contents causes an error due to the `org-assert-version' call. In particular, compilation of org.el fails because the new version has new "(require 'org-fold)" and the latter also tries to call undefined `org-assert-version'. So at this point we have partially compiled broken install. Some files are not compiled, others have call to `org-assert-version' instead of its expansion. Let's try to start emacs again and load org. Since org.el is not compiled, "(org-assert-version)" inside it is unable to catch any problem due to mixed-version compilation. Now `org-release' returns new version. The failure happens during "(require 'org-keys)" that was compiled with the warning. Debugger entered--Lisp error: (invalid-function org-assert-version) org-assert-version() byte-code("\300\301!\210\302 \210\300\303!\210\300\304!\207" [require org-macs org-assert-version cl-lib oc] 2) require(org-keys) So we have an obscure load time error. I would say that compile *error* messages are obscure as well because it is unclear that errors happen in `require'. E.g. when compiling org-matlab.el the reported line number is for "(require 'ob-maxima)" while compiling of ob.maxima.el finished with a warning, not an error and it is really confusing. "ob-octave:34:" in addition to "ob-matlab:43:" during compiling of ob-matlab.el would be more informative.