unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Eli Zaretskii <eliz@gnu.org>,
	emacs-orgmode@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	59882@debbugs.gnu.org
Subject: bug#59882: Multiple versions of Org in load-path problem
Date: Sun, 25 Dec 2022 18:46:37 +0700	[thread overview]
Message-ID: <96ecff22-8604-3794-671f-75184dcb7d31__34075.9972155624$1671968863$gmane$org@gmail.com> (raw)
In-Reply-To: <87pmc7stiw.fsf@localhost>

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.





  parent reply	other threads:[~2022-12-25 11:46 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SJ0PR03MB54550C18409A8F2DF921A77DA21B9@SJ0PR03MB5455.namprd03.prod.outlook.com>
     [not found] ` <87tu27jq7h.fsf@localhost>
     [not found]   ` <SJ0PR03MB5455E1FA2C2887B0200CA8B6A21D9@SJ0PR03MB5455.namprd03.prod.outlook.com>
     [not found]     ` <SJ0PR03MB54559D5E6849C26AAF6CA044A21D9@SJ0PR03MB5455.namprd03.prod.outlook.com>
     [not found]       ` <87k032nyok.fsf@localhost>
     [not found]         ` <SJ0PR03MB54550C7727696BE317D0DD13A21D9@SJ0PR03MB5455.namprd03.prod.outlook.com>
     [not found]           ` <39a5810d-75bc-4ddb-8722-703f762ed4de@app.fastmail.com>
2022-12-08 21:56             ` bug#59882: Multiple versions of Org in load-path problem David Masterson
     [not found]             ` <SJ0PR03MB5455B76B26B72A11E965BFE2A21D9@SJ0PR03MB5455.namprd03.prod.outlook.com>
2022-12-09  7:17               ` Eli Zaretskii
2022-12-09  7:43                 ` David Masterson
     [not found]                 ` <SJ0PR03MB54551B455DAEB936213DE09CA21C9@SJ0PR03MB5455.namprd03.prod.outlook.com>
2022-12-09 11:57                   ` Eli Zaretskii
2022-12-09 19:40                   ` Cook, Malcolm
     [not found]                   ` <DS7PR20MB46714DA5A213137BCEF5A2D4BE1C9@DS7PR20MB4671.namprd20.prod.outlook.com>
2022-12-09 19:51                     ` David Masterson
     [not found]                     ` <SJ0PR03MB545522F5053017127964564BA21C9@SJ0PR03MB5455.namprd03.prod.outlook.com>
2022-12-09 20:27                       ` Eli Zaretskii
2022-12-10 14:01                 ` Ihor Radchenko
2022-12-14  9:51                 ` Ihor Radchenko
     [not found]                 ` <87edt2qpoa.fsf@localhost>
2022-12-14 12:59                   ` Eli Zaretskii
     [not found]                   ` <83359innsp.fsf@gnu.org>
2022-12-14 13:37                     ` Ihor Radchenko
2022-12-14 14:35                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                       ` <jwvfsdi6or0.fsf-monnier+emacs@gnu.org>
2022-12-14 16:02                         ` Max Nikulin
     [not found]                         ` <3bf2e057-4204-cdc8-0847-39a723db4fc8@gmail.com>
2022-12-15  4:17                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-15  4:56                             ` Ihor Radchenko
2022-12-16 12:36                             ` Max Nikulin
     [not found]                             ` <809ae318-fe95-1023-6bca-ba827fd01a29@gmail.com>
2022-12-16 14:47                               ` Ihor Radchenko
2022-12-18 15:24                                 ` Max Nikulin
2022-12-18 15:40                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-06 16:09                                     ` Max Nikulin
     [not found]                                     ` <7e64ae5e-6fd7-ea41-dae5-c8abd9a3fefa@gmail.com>
2023-04-06 21:25                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-19  4:20                                         ` Tom Gillespie
2022-12-25  9:48                                   ` Ihor Radchenko
     [not found]                                   ` <87pmc7stiw.fsf@localhost>
2022-12-25 11:46                                     ` Max Nikulin [this message]
     [not found]                                     ` <96ecff22-8604-3794-671f-75184dcb7d31@gmail.com>
2022-12-26  8:44                                       ` Ihor Radchenko
     [not found]                                       ` <87r0wmr1tk.fsf@localhost>
2022-12-26 11:01                                         ` Ihor Radchenko
     [not found]                                         ` <877cyeqvh4.fsf@localhost>
2022-12-26 12:25                                           ` Max Nikulin
     [not found]                                           ` <3f0ead96-4424-18a9-394f-680fc135d39c@gmail.com>
2022-12-27  9:47                                             ` Ihor Radchenko
2022-12-27  9:56                                               ` Max Nikulin
     [not found]                                               ` <11e5c88d-09d1-75a5-5c7c-f8ace552c2d3@gmail.com>
2023-02-03 11:02                                                 ` Ihor Radchenko
2023-02-03 12:15                                                   ` Eli Zaretskii
     [not found]                                                   ` <86zg9upl8h.fsf@gmail.com>
2023-02-14 22:53                                                     ` Gregor Zattler
     [not found]                                                     ` <87pmabyi2r.fsf@no.workgroup>
2023-02-16 12:14                                                       ` Max Nikulin
2023-02-21  5:22                                                         ` Richard Stallman
     [not found]                                                         ` <E1pUL6K-0006Bt-U3@fencepost.gnu.org>
2023-02-21 12:32                                                           ` Eli Zaretskii
2023-02-21 17:26                                                             ` Bhavin Gandhi
2023-02-22 10:48                                                               ` Ihor Radchenko
     [not found]                                                               ` <87mt56c6wu.fsf@localhost>
2023-02-22 16:58                                                                 ` Bhavin Gandhi
     [not found]                                                                 ` <CAOn=hbcZ5JyBGvsy8VS=KpyJ3quHCdb4c_xAfeUygXeqtzirRw@mail.gmail.com>
2023-02-23  9:35                                                                   ` Ihor Radchenko
2023-04-06 15:02                                                   ` Max Nikulin
2023-04-07 11:39                                                     ` Max Nikulin
2022-12-14 14:25                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-14 21:49                   ` Cook, Malcolm
2022-12-09 19:47               ` Cook, Malcolm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='96ecff22-8604-3794-671f-75184dcb7d31__34075.9972155624$1671968863$gmane$org@gmail.com' \
    --to=manikulin@gmail.com \
    --cc=59882@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).