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,gmane.emacs.orgmode Subject: bug#59882: Multiple versions of Org in load-path problem Date: Sun, 18 Dec 2022 22:24:24 +0700 Message-ID: <4b053e69-87d3-8323-8949-0546b4bb6c1a@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> 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="16693"; 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 18 16:25:14 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 1p6vXO-0004AC-Ax for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Dec 2022 16:25:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6vXE-0007e0-Ob; Sun, 18 Dec 2022 10:25:04 -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 1p6vXD-0007cQ-3J for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 10:25:03 -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 1p6vXC-0001SJ-Qb for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 10:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6vXC-0006n6-4i for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 10:25: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, 18 Dec 2022 15:25: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.167137707626088 (code B ref 59882); Sun, 18 Dec 2022 15:25:02 +0000 Original-Received: (at 59882) by debbugs.gnu.org; 18 Dec 2022 15:24:36 +0000 Original-Received: from localhost ([127.0.0.1]:34456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6vWm-0006mi-C2 for submit@debbugs.gnu.org; Sun, 18 Dec 2022 10:24:36 -0500 Original-Received: from mail-lj1-f180.google.com ([209.85.208.180]:36394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6vWj-0006mX-IP for 59882@debbugs.gnu.org; Sun, 18 Dec 2022 10:24:34 -0500 Original-Received: by mail-lj1-f180.google.com with SMTP id n1so6848774ljg.3 for <59882@debbugs.gnu.org>; Sun, 18 Dec 2022 07:24:33 -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=I0w9solaxEGBNfzBBFBWgWofPUUNqUjsrCM9Z4sP+5Q=; b=e7IsJUbg4XSC2tu8eJjuAAm1MMvzSpkiKUbDsCMtR9rtZwdrY8wKT8o04o2MqJ2At7 dtId5UYOP1XjEpk/3T89JtmwldlfBx63gEKpSx2HChR8qr5/bEKth1yROKXBYJ76W2wJ ElaGZ5q41SdK7LMQecdel1szpCkTCpfrZio2JUB/+prhGn8nR+AWSlzk0X8xM29Gw73T PLGiIRcEKXJIXNcl3pKC5N/yAAq/fPXxFuvc/tsSmd1BiR3p/BtV3sgqVNQTtUgttaVl bWjdwyXKjferN+g+bxgXsutHXfFjEzFsOIhPi2N94kqFlQTVbl1It3Z3EJ+snar1g6RX kP5g== 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=I0w9solaxEGBNfzBBFBWgWofPUUNqUjsrCM9Z4sP+5Q=; b=O/NtcmnkKlZ5cQ4lsKgpynkVotJYwYFzSLZTCCUfThsC3MI3iv9Fouu/L2IyPCQlGL Dt/d3ZZrbn1slAWzFGun9TsyZykBMBIz38czT+HGTon+szCxW/WDxkF6p2OtJoh33e2C GDDi18WSimDJUmh1tgB60/Sw3El3WO4O/7eEx7WwIMTUZIL7QVRAV1iLYxCZp8+ccwNz Ce4SgarW8vK4PkkdZgeJRKtv5iymn/CTshLX5uqAyiU9Bk5Erb/e3tNTS7Qc0xUSC1VX 9wGpTeQRJOzyXU5J+OVW1SQhTK5szYoxqAdHMp2/Txt9+bmctY1vAMs7qH19RUydDHor QCgA== X-Gm-Message-State: AFqh2kpHwiOa5p37+oM2DIpTUJxhNpmnEfMOUgnIDnhgPuSo9cShrfGP QmhbzxdxDaRTv6l4F894xbY= X-Google-Smtp-Source: AMrXdXvke/AgbA9krlHIeWz5/dAC/9urz1tYQzRhNVM2EDmLkTSMfHhj0fCzDZPOH/KfWzPOvegwcw== X-Received: by 2002:a2e:9c06:0:b0:27e:521c:92ca with SMTP id s6-20020a2e9c06000000b0027e521c92camr4143080lji.19.1671377067372; Sun, 18 Dec 2022 07:24:27 -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 h18-20020a19ca52000000b004b55075f813sm845765lfj.227.2022.12.18.07.24.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Dec 2022 07:24:26 -0800 (PST) Content-Language: en-US In-Reply-To: <87fsdfs8vl.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:251369 gmane.emacs.orgmode:151526 Archived-At: On 16/12/2022 21:47, Ihor Radchenko wrote: >> Can it happen that already loaded version affects compilation of a new >> version by package-install. > > Yes. It is what appears to be happening: > > https://irreal.org/blog/?p=10996 > https://irreal.org/blog/?p=10999 I would not call it steps to reproduce. From my point of view, there is a number of issues with updating of packages from emacs session. 1. If compilation of a package failed then it is not withdrawn from the load path. 2. There is no reliable way to determine if package compilation failed. (byte-recompile-directory DIR 0 t) returns human readable string, not signalling an error or returning a value convenient to check in the code. It is the cause of the previous issue. 3. Emacs package system is not ready for complex multifile packages containing macro definitions. It does not push user to update packages just after emacs restart in a clean state. As a result, files may be compiled with old or missed macro definitions. 4. Because of the item 2 a package has no chance to implement reliable internal sanity check that prevents updating to a broken state. I have tried the following in Emacs-27. For Emacs >= 29 add -L to Org <= 9.5. - "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 Notice attempt to load Org-9.6 despite warnings and even error during update: > 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. ... > 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 So emacs can not handle update of a package with changed macro definitions when they reside in another package file.