From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MFwhATw4qGOYMwAAbAwnHQ (envelope-from ) for ; Sun, 25 Dec 2022 12:47:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ULhqADw4qGPBYgEA9RJhRA (envelope-from ) for ; Sun, 25 Dec 2022 12:47:08 +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 5D0EC16FA3 for ; Sun, 25 Dec 2022 12:47:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9PSo-0001eg-Dd; Sun, 25 Dec 2022 06:46:46 -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 1p9PSl-0001eW-OS for emacs-orgmode@gnu.org; Sun, 25 Dec 2022 06:46:43 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9PSj-0006mG-Sb; Sun, 25 Dec 2022 06:46:43 -0500 Received: by mail-lf1-x136.google.com with SMTP id 1so12870832lfz.4; Sun, 25 Dec 2022 03:46:40 -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=qZL/rTMvbyAcZkobsLA87zs1Ak/mq/c6bxNI1ht/03OAssm0wmgLU1KCA8yfVE/HBo dohosd8kjKJvPCviOY4zVQlBFjZLDSaT2xCzaiuU9LvQ7IO6+Be0OZzV8E37qlrKTVGA jEwogr3elJRtX960XK+xDKNpnoWYBov/Q/SlaTSkxefpoj/hGLIp/8gnHQpTraGrd5O6 zeEB9ygXoC8dAPBvQDRQTHd+78CuL1SA0mWznUT9h32QcQK/rQ2CBYiECQE6QNssbLi5 OlHvlUgyc0SlTyHae1YipkkpCsIk5mri3z56uHmxfGH/MyFrTmHSIOXdSsKrhqOytrAk 0FEQ== X-Gm-Message-State: AFqh2koOI0jHXpYQ3QwkX2jOZ9YwOROGt5W+brYpr+0gaLYzjS8ZlWw9 RzYZkNA527spa2i7/m0wS19gubnF+V8= 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) 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) Message-ID: <96ecff22-8604-3794-671f-75184dcb7d31@gmail.com> Date: Sun, 25 Dec 2022 18:46:37 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: bug#59882: Multiple versions of Org in load-path problem Content-Language: en-US To: Ihor Radchenko Cc: Stefan Monnier , emacs-orgmode@gnu.org, Eli Zaretskii , 59882@debbugs.gnu.org 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> From: Max Nikulin In-Reply-To: <87pmc7stiw.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=manikulin@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-1.147, RCVD_IN_DNSWL_NONE=-0.0001, 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-Seal: i=1; s=key1; d=yhetil.org; t=1671968827; a=rsa-sha256; cv=none; b=MoaqkUY62nhFzB+ZDU1kOBO1OU+zusqpVHpFIheu4QDwXTIbd03FXnRVCEyr0IoLle8Fxr pKQh3LmzOQGhVvri2wVIw4dt7fmrD/weO/QV6OTeeN3pIEtyVCzJAIBbF+/dzqA7h9PiGH d7/A7X7ny25nSUpZT47/IkTadruoEg2yNtGa++aTx0ItvoUTK2o/RDtZ7BTBzbTbcPeS5W CPHCeGVf3xY6ezrDLshLMcf63Ij0melzzHQFpWxnIcBapJNqoNXtkY6nAQ5HnwdWONJP+O AdUf29G0j/h+f3OxhhDZBblkkq2QRfuJv5oDQwMySBzYHCfqL1TFeTAyIxp38g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="F/jevi5v"; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671968827; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ihzS7x9v/v2m6dWuJbfAAWuDaNMlDQ5J3z5tmX9uIck=; b=ZWdPxBbUa2glW82dT5wHsE95qqWZGMhQSC0OZnhLaIAyqm7iBn8KGAXvYUIjMHi3k7UknS QXyO2Vi1GasVzJtegogQjTcn9l1LyiSOYGBvS8fbZpgpV0uYr0X+5OFnRAYSC3Eiqha5jx gFckEd+g879o6e9G7V4yqd9M8b1D/G+I1u+i03TKp/hDzbKusDkikRA/JSJTABlLOqQ90V V8jFB2pI6s5p5Lm3xN1XuJWmuKAcD43G7uqoG7UABxajGCZSsCrxSlU0+8M6MrkO8CRe7N bAe8qNGIm17olTEsLshjLtm6U4H8Ms+LOgtrt9KjL53yBsAoKQfcjMIyxfjCbQ== X-Spam-Score: -2.02 X-Migadu-Queue-Id: 5D0EC16FA3 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="F/jevi5v"; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -2.02 X-TUID: gMiAbHDB6Gby 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.