dimitri / el-get

Manage the external elisp bits and pieces upon which you depend!
http://tapoueh.org/emacs/el-get.html
1.64k stars 457 forks source link

Replace cl by cl-lib #2802

Closed stephan-cr closed 3 years ago

stephan-cr commented 3 years ago

Since Emacs 27 the package cl is deprecated, the replacement is cl-lib, which is available since Emacs 24.3.

This patch replaces cl by cl-lib and drops support for Emacs versions less than 24.3. Dropping older Emacsen is required, because cl-lib is a builtin starting from version 24.3 and doesn't need an extra package from ELPA.

Testcases for past issues (in test/issues) still contain cl. Most of them seem to be broken and need further investigation.

This patch is tested with test/run-ert.sh, which outputs:

Ran 10 tests, 10 results as expected, 0 unexpected (2021-01-30 13:24:54+0100, 0.672122 sec)
1 expected failures

and manually by daily usage for a month now.

This PR addresses issue #2792.

stephan-cr commented 3 years ago

Rebased to current master. Some check for Emacs 24.5 fails with fatal: origin/master...HEAD: no merge base. I have to figure out why.

tarao commented 3 years ago

Aha, I guess it is about a workaround replacing TRAVIS_COMMIT_RANGE. I will fix it but it may take some time.

stephan-cr commented 3 years ago

@tarao It must be something different, the message fatal: origin/master...HEAD: no merge base appears for the successful ones as well.

tarao commented 3 years ago

@stephan-cr I think I could fix it now. It seems that byte-compilation tests should run if there is change outside recipe/.

Here are results from a test pull request; I think these are what you have expected: https://github.com/dimitri/el-get/pull/2838/checks?check_run_id=2813750015

stephan-cr commented 3 years ago

@tarao For some strange reason https://github.com/dimitri/el-get/pull/2838/checks?check_run_id=2813750015 gives:

In toplevel form:
methods/el-get-go.el:42:43:Error: reference to free variable ‘el-get-dir’

I cannot reproduce it locally, but I fix that nevertheless.

Edit: I can, with:

$ byte-compile -Werror methods/el-get-go.el

In toplevel form:
methods/el-get-go.el:42:43:Error: reference to free variable ‘el-get-dir’

seems like byte-compile -Werror *.el methods/*.el is not reliable.

stephan-cr commented 3 years ago

@tarao Fixed all compilation errors. The PR doesn't look nice, because it fixes several unrelated errors, due to unreliable CI. I created a follow-up issue to fix the remaining compilation errors.