all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-assert-version considered harmful
Date: Tue, 13 Sep 2022 11:18:48 +0800	[thread overview]
Message-ID: <87h71ct10n.fsf@localhost> (raw)
In-Reply-To: <jwvy1uo5772.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Does it help if you run make autoloads after git fetch?
>
> Not that I can tell, no.  But note that I'm not using Org's makefile to
> compile the files, I'm using the elpa.git scripts instead, which don't
> take into account dependencies between files.
>
> So the situation is simply something like:
>
> - git pull  =>  switches to 9.5.5, but several .el files are left unchanged.
> - make autoloads  =>  this refreshes the autoloads, but the .elc files
>   of those .el files which didn't change still won't be recompiled.

Isn't it a bug in the elpa scripts then?
If a macro definition is changed and the .elc file using that macro is
not changed, it still needs to be re-compiled. Otherwise, all kinds of
unexpected side effects may appear.

> I'm not really reporting a bug; I'm not sure how to solve the problem
> without throwing away the benefits of `org-assert-version`.  But I just
> wanted to mention that it has unintended side effects :-)

I understand. As Timothy proposed, we can make less strict checks for Org
version consistency. But the question is whether we really need to make
a more lax assertion or maybe it is better to keep the assertion as is
and use it to catch potential issues e.g. in Elpa.

> PS: BTW, I notice that when Org is installed as a normal `package.el`
>     package, in Emacs≥28 it will be activated before the `.emacs` file
>     is loaded, which should prevent occurrence of the problems that
>     `org-assert-version` aims to catch (unless you use, say, an
>     org-babel file for the `early-init.el` :-)

Indeed. Version mismatch issue has been fixed in package.el years back.
But it is starting to pop up again as alternative package managers are
getting traction. There is a constant influx of bug reports caused by
mixed installation. Especially by users of Doom Emacs and straight.el.

Unfortunately, the problem cannot be easily solved, say, on straight.el
side --- straight.el basic design is causing the issue to appear.

> PPS: Maybe instead of calling `org-assert-version` everywhere, the
>      `org-autoloads.el` (i.e. the file that sets up the `load-path` and
>      the autoloads) could look for traces of Org files in the
>      `load-history` and signal an error if such files are found coming
>      from a different directory.

No, unfortunately.

org-autoloads, when loaded from built-in Emacs version will not help
to catch newer Org libraries being loaded after built-in Org version is
loaded.

Moreover, I consider loading personal forks of built-in Org libraries a
valid use-case. Demanding all the org libraries to be loaded from the
same directory will limit this possibility.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


  reply	other threads:[~2022-09-13  3:19 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 18:27 org-assert-version considered harmful Stefan Monnier
2022-09-13  1:52 ` Ihor Radchenko
2022-09-13  2:16   ` Timothy
2022-09-13  2:53   ` Stefan Monnier
2022-09-13  3:18     ` Ihor Radchenko [this message]
2022-09-13 13:26       ` Stefan Monnier
2022-09-13 14:42         ` Ihor Radchenko
2022-09-13 16:13           ` Stefan Monnier
2022-09-14  2:46             ` Ihor Radchenko
2022-09-14 14:08               ` Stefan Monnier
2022-09-14 19:13                 ` Tim Cross
2022-09-25  2:39               ` Bastien
2022-09-25  3:15                 ` Ihor Radchenko
2022-09-25  4:27                   ` Timothy
2022-09-25  9:37                   ` Bastien
2022-09-25  9:55                     ` Ihor Radchenko
2022-09-25 10:24                       ` Bastien
2022-09-25 11:10                         ` Ihor Radchenko
2022-09-25 11:26                           ` Bastien
2022-09-25 12:16                             ` Ihor Radchenko
2022-09-25 13:18                               ` Bastien
2022-09-26 11:15                                 ` Ihor Radchenko
2022-09-25 12:20                             ` Ihor Radchenko
2022-09-25 13:16                               ` Bastien
2022-09-26 11:29                 ` Ihor Radchenko
2022-09-27 21:35                   ` Bastien
2022-10-31 14:11                     ` Cook, Malcolm
2022-10-31 20:16                       ` [External] : " Daniel Ortmann
2022-10-31 20:40                         ` Cook, Malcolm
2022-10-31 23:16                       ` Tim Cross
2022-11-01  6:09                       ` Ihor Radchenko
2022-11-02 20:42                         ` Cook, Malcolm
2022-11-03  7:51                           ` Ihor Radchenko
2022-11-03 17:30                             ` Cook, Malcolm
2022-12-02  8:16                               ` Tom Gillespie
2022-12-02  6:45                                 ` Ihor Radchenko
2022-12-04  4:22                                   ` Tom Gillespie
2022-12-04  4:33                                     ` Stefan Monnier
2022-12-04 11:12                                       ` Ihor Radchenko
2023-08-16 11:08                                         ` Ihor Radchenko
2023-08-16 12:30                                           ` Stefan Monnier
2023-08-16 12:41                                             ` Ihor Radchenko
2023-08-16 13:41                                               ` Stefan Monnier
2023-08-18  9:37                                                 ` Ihor Radchenko
2023-08-18 13:19                                                   ` Stefan Monnier
2023-08-18 13:33                                                     ` Ihor Radchenko
2023-08-18 13:45                                                       ` Stefan Monnier
2023-08-18 14:26                                                         ` Ihor Radchenko
2023-08-18 14:29                                                           ` Ihor Radchenko
2023-08-17 16:43                                           ` Max Nikulin
2023-08-17 16:59                                             ` Ihor Radchenko

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

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

  git send-email \
    --in-reply-to=87h71ct10n.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.