Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: CI: enable check for lack of new warnings while byte-compiling #1860

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Hi-Angel
Copy link
Contributor

@Hi-Angel Hi-Angel commented Jan 28, 2024

This fixes one warning and adds a check that makes sure that CI will fail if a pull-request contains byte-compilation errors. As part of that we replace "emacs-snapshot" in CI with the latest released one because it's "frozen in time", while depending on snapshot may result in CI failing just because upstream introduced new warnings.

This is WIP because: there's one "deprecation warning" which Idk what to do about, because it's internal in Evil. It sounds like:

evil-types.el:96:22: Error: ‘evil-want-visual-char-semi-exclusive’ is an obsolete variable (as of 1.15.0); Semi-exclusivity prevents selecting text + 1st char of next line,
without having to introduce new niche functionality.

Thoughts? One possible solution is to disable check for "deprecation warnings", but then we will miss new deprecations from upstream.


P.S.: the changes in Makefile also result in a wall of weird messages Makefile:34: warning: overriding recipe for target 'evil-search.elc'. I would be very grateful if someone points out how to fix that because I'm not that good in Makefiles (I usually migrate everything I maintain to Ninja or Meson) and Makefiles often behave weirdly.

@Hi-Angel
Copy link
Contributor Author

I sent the "warning fix" commit separately at #1861 to have the fix in tree while the discussion here is ongoing.

There's no point in this warning, because it is defined and processed
inside evil-mode. The warning only matters for user-side usage. So
disable it here.

Fixes:
    evil-types.el:96:22: Error: ‘evil-want-visual-char-semi-exclusive’ is an obsolete variable (as of 1.15.0); Semi-exclusivity prevents selecting text + 1st char of next line,
    without having to introduce new niche functionality.
@Hi-Angel Hi-Angel force-pushed the fix-warnings branch 2 times, most recently from 93265e9 to 9f68edd Compare February 20, 2024 18:37
@Hi-Angel
Copy link
Contributor Author

Hi-Angel commented Feb 20, 2024

Weird… so, I fixed everything, but on the older Emacs'es it fails with "undo-redo" undefined. The problem is that it is defined, I put a declare-function as part of the make compilation call. No idea what's going on…\

UPD: reported a bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69290

@Hi-Angel Hi-Angel force-pushed the fix-warnings branch 6 times, most recently from 61cd109 to 7726a9e Compare February 20, 2024 19:25
Fixes warnings like:

    evil-commands.el:5205:1:Error: the following functions are not known to be defined: string-trim-right, tab-bar-close-tab, tab-close, tab-bar-select-tab, tab-bar-switch-to-next-tab
It is part of the newer Emacs, but on the older ones it causes
warnings. There's no tests of that functionality, so just suppress the
warning.
As part of that we test with latest released Emacs version rather than
snapshot, because we don't want CI to start suddenly failing on
unrelated changes because upstream introduced a new warning/check.
@Hi-Angel
Copy link
Contributor Author

Okay, I think I'm done for now, I just don't have anymore resources, this is utter chaos. In some versions some functions were in one or another file. This fail I don't even understand. It claims to not have found string-trim-right which at that version was in subr-x, I checked in Emacs sources. So I have added an optional require subr-x for Emacs versions lower than 29 — but the error just won't go away and I don't know why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant