protesilaos / modus-themes

Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).
https://protesilaos.com/emacs/modus-themes
GNU General Public License v3.0
553 stars 30 forks source link

modus-themes--standard-completions #22

Closed rytis-paskauskas closed 2 years ago

rytis-paskauskas commented 2 years ago

Got this after the last reload-update.

symbol's function definition is void: modus-themes--standard-completions

Package version: modus-themes-20220227.1815

Please advise.

protesilaos commented 2 years ago

Hello @rytis-paskauskas!

There is something wrong with the packaging. The modus-themes--standard-completions is not used in the code of the themes.

Please delete the modus-themes package and install it again.

[ This issue is also raised in the Gitlab repo: https://gitlab.com/protesilaos/modus-themes/-/issues/287 ]

rytis-paskauskas commented 2 years ago

The fastest response ever! Thanks, Mr. Best, Rytis.

protesilaos commented 2 years ago

You are welcome! And sorry for this bug. I will try to find the root cause of it.

protesilaos commented 2 years ago

I have made some changes to the themes and everything seems to work. The discussion is here: https://gitlab.com/protesilaos/modus-themes/-/issues/287

The relevant change:

  commit f067d2ef39c22174b95584f2cba7942aaf03bcca
  Author: Protesilaos Stavrou <info@protesilaos.com>
  Date:   Thu Mar 3 06:52:31 2022 +0200

      Reify themes with eval-and-compile

      This is an attempt to fix a bug that has existed since version 1.2.0 of
      the themes or even earlier.

      The bug is about a mismatch between compiled code and runtime
      dependencies.  The runtime expects the current version while the
      compiled code only furnishes an outdated one, thus resulting in an
      error.  This only happens when:

      1. Private functions change to accept more/fewer arguments.
      2. Variables change their acceptable value (e.g. from symbol to list).
      3. The user is installing the package via the package.el mechanism which
         takes care of byte compilation (though anything that mimics
         package.el should exhibit the same behaviour).

      My understanding is that the cause was the limited scope of the
      'eval-and-compile' we had before: it would run the 'require' also at
      compile time, whereas the 'modus-themes-theme' macro, which reifies the
      actual theme, would only be evaluated at runtime.  Hence the mismatch as
      'require' would read the already installed byte code while the macro
      would expect newer forms.

      Wrapping everything in the 'eval-and-compile' should address this
      problem.  Hopefully it will not engender new ones...

      * * *

      The latest reports about this bug:

      * GitLab issue 287 with Mark Bestley and Daniel Mendler:
        <https://gitlab.com/protesilaos/modus-themes/-/issues/287>.

      * GitHub issue 22 with Rytis Paškauskas:
        <https://github.com/protesilaos/modus-themes/issues/22>.

   doc/modus-themes.info   | 30 +++++++++++++++---------------
   doc/modus-themes.org    | 15 ++++++++-------
   modus-operandi-theme.el | 10 +++++-----
   modus-vivendi-theme.el  | 10 +++++-----
   4 files changed, 33 insertions(+), 32 deletions(-)
protesilaos commented 2 years ago

I believe this issue has been fixed for good. Closing now. Thanks!