syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.69k stars 4.9k forks source link

[Common Lisp] Package `cl` is deprecated: please replace it with `cl-lib` #14476

Closed allentiak closed 3 years ago

allentiak commented 3 years ago

Perhaps you can use cl-libify for this?

lebensterben commented 3 years ago

Those warnings are coming from 3rd party packages. There is nothing we can do.

Phundrak commented 3 years ago

Indeed. The only instance of a (require 'cl) that I could find in Spacemacs’ own files is in frame-fns.el, and it is under a conditional for when the user uses Emacs 20 or below: (eval-when-compile (when (< emacs-major-version 21) (require 'cl))). However, Spacemacs supports Emacs 25.1 and above, I guess this could be removed? I don’t think there are many people using Emacs 20 and below anymore. Can they even use Spacemacs?

If you want to find out which 3rd party packages use the cl library, you could execute grep -rin "(require 'cl)" in your .emacs.d directory and open an issue for these packages specifically.

emacs18 commented 3 years ago

I can find these just among 3 to 4 hundred package repos on my computer.

ace-jump-mode/ace-jump-mode.el:95:(require 'cl)
auto-complete/etc/install.el:1:(require 'cl)
auto-dictionary-mode/auto-dictionary.el:77:(eval-when-compile (require 'cl))
auto-dictionary-mode/tests.el:3:(eval-when-compile (require 'cl))
cl-libify/cl-libify.el:47:    (require 'cl)))
command-log-mode/command-log-mode.el:49:(eval-when-compile (require 'cl))
cuda-mode/cuda-mode.el:28:(require 'cl)
dash.el/dash.el:36:    (require 'cl)))
dash.el/dev/examples.el:35:    (require 'cl)))
direx/direx.el:29:(eval-when-compile (require 'cl))
direx/direx.el:77:    (require 'cl)
drag-stuff.el/drag-stuff.el:69:  (require 'cl))
drag-stuff.el/vendor/ert.el:58:  (require 'cl))
dtrt-indent/dtrt-indent-test.el:23:(eval-when-compile (require 'cl))
dumb-jump/test/test-helper.el:12:  (require 'cl))
el-get/el-get-autoloading.el:15:(require 'cl)
el-get/el-get-bundle.el:14:(eval-when-compile (require 'cl))
el-get/el-get-byte-compile.el:15:(require 'cl)                           ; yes I like loop
el-get/el-get-core.el:22:(require 'cl)            ; needed for `remove-duplicates'
el-get/el-get-dependencies.el:15:(require 'cl)
el-get/el-get-list-packages.el:20:(require 'cl)
el-get/el-get-status.el:22:(require 'cl)
el-get/test/caching-speedtest.el:3:(require 'cl)
el-get/test/el-get-tests.el:5:  (require 'cl)
el-get/test/issues/el-get-issue-407.el:13:(require 'cl)
el-get/test/issues/el-get-issue-579.el:5:(require 'cl)
el-get/test/issues/el-get-issue-592.el:5:(require 'cl)
el-get/test/issues/el-get-issue-619.el:5:(require 'cl)
el-get/test/issues/el-get-issue-632.el:5:(require 'cl)
el-get/test/issues/el-get-issue-656.el:5:(require 'cl)
el-get/test/issues/el-get-issue-659.el:5:(require 'cl)
el-get/test/issues/el-get-issue-772.el:5:(require 'cl)
el-get/test/issues/el-get-issue-835.el:1:(require 'cl)
el-get/test/test-setup.el:2:(require 'cl)
elisp-def/test/elisp-def-test.el:249:  (require 'cl)
emacs-async/async-test.el:36:  (require 'cl))
emacs-bash-completion/test/bash-completion-test.el:33:(require 'cl)
emacs-calfw/calfw.el:56:(require 'cl)
emacs-epc/epc.el:37:(eval-when-compile (require 'cl))
emacs-epc/epcs.el:27:(eval-when-compile (require 'cl))
emacs-epc/test-epc.el:28:(require 'cl)
emacs-jedi/doc/eldomain/eldomain.el:28:(eval-when-compile (require 'cl))
emacs-jedi/test-jedi.el:29:(eval-when-compile (require 'cl))
emacs-noflet/noflet.el:31:(eval-when-compile (require 'cl))
emacs-request/doc/eldomain/eldomain.el:28:(eval-when-compile (require 'cl))
emacs-slim/slim-mode.el:44:  (require 'cl))
emmet-mode/emmet-mode.el:73:  (require 'cl))
emmet-mode/src/init.el:8:  (require 'cl))
esxml/esxml-html.el:37:  (require 'cl))
esxml/esxml.el:47:(require 'cl)
eval-sexp-fu.el/eval-sexp-fu.el:121:(eval-when-compile (require 'cl))
evil-goggles/test/evil-tests-with-evil-goggles.el:7:(require 'cl)
flycheck/test/flycheck-test.el:3744:  (require 'cl)
font-lock-plus/font-lock+.el:96:  (require 'cl) ;; incf
frame-cmds/frame-cmds.el:607:(eval-when-compile (require 'cl)) ;; case, incf (plus, for Emacs 20: dolist, dotimes)
frame-fns/frame-fns.el:83:(eval-when-compile (when (< emacs-major-version 21) (require 'cl)))
fringe-helper.el/fringe-helper.el:98:(eval-when-compile (require 'cl))
gh.el/gh-api.el:30:  (require 'cl))
gh.el/gh-auth.el:30:  (require 'cl))
gh.el/gh-cache.el:30:  (require 'cl))
gh.el/gh-comments.el:30:  (require 'cl))
gh.el/gh-common.el:30:  (require 'cl))
gh.el/gh-gist.el:30:  (require 'cl))
gh.el/gh-issue-comments.el:36:  (require 'cl))
gh.el/gh-issues.el:39:  (require 'cl))
gh.el/gh-oauth.el:30:  (require 'cl))
gh.el/gh-orgs.el:30:  (require 'cl))
gh.el/gh-profile.el:30:  (require 'cl))
gh.el/gh-pull-comments.el:40:  (require 'cl))
gh.el/gh-pulls.el:30:  (require 'cl))
gh.el/gh-repos.el:30:  (require 'cl))
gh.el/gh-url.el:30:  (require 'cl))
gh.el/gh-users.el:30:  (require 'cl))
gh.el/test/gh-test.el:29:(require 'cl)
gist.el/gist.el:40:  (require 'cl))
git-emacs/git-blamed.el:81:(eval-when-compile (require 'cl))                  ; to use `push', `pop'
git-emacs/git-emacs.el:88:(require 'cl)                           ; common lisp
git-gutter-fringe-plus/git-gutter-fringe+.el:28:  (require 'cl))
git-gutter-plus/test/git-gutter+-test.el:25:  (require 'cl))
golden-ratio.el/golden-ratio.el:18:(eval-when-compile (require 'cl))
helm-company/test/test-helper.el:35:  (require 'cl))
helm-css-scss/helm-css-scss.el:64:(eval-when-compile (require 'cl))
helm-dash/helm-dash.el:39:(eval-when-compile (require 'cl))
helm-git-grep/helm-git-grep.el:47:(eval-when-compile (require 'cl))
helm-git-grep/test/helm-git-grep-test.el:30:(eval-when-compile (require 'cl))
help-fns-plus/help-fns+.el:436:(eval-when-compile (require 'cl)) ;; case
help-fns-plus/help-fns+.el:439:  (require 'cl))                ;; Emacs < 24
irony-mode/irony-diagnostics.el:32:  (require 'cl))                        ;for lexical-let macro
irony-mode/irony-iotask.el:39:  (require 'cl))                        ;for lexical-let macro
json-reformat/json-reformat.el:50:(eval-when-compile (require 'cl))
lispy/lispy-test.el:1528:    (should (string= (lispy-with "(eval-when-compile(require'cl)(require'org))|" "M")
lispy/lispy-test.el:1529:                     "(eval-when-compile\n  (require 'cl)\n  (require 'org))|"))
lispy/lispy-test.el:2431:  (should (string= (lispy-with "|  (require 'cl)" (kbd "M-d"))
lispy/lispy-test.el:2433:  (should (string= (lispy-with "|  \"(require 'cl)\"" (kbd "M-d"))
lispy/lispy-test.el:2435:  (should (string= (lispy-with "\"(require |'cl)\"" (kbd "M-d"))
lispy/lispy-test.el:2443:  (should (string= (lispy-with "\"(require |'cl)\"" (lispy-kill-word -1))
lispy/lispy-test.el:2451:  (should (string= (lispy-with "(require 'cl)|" (kbd "M-DEL"))
lispy/lispy-test.el:2453:  (should (string= (lispy-with "(require 'cl)|" (kbd "M-DEL") (kbd "C-y"))
lispy/lispy-test.el:430:  (should (string= (lispy-with "(eval-when-~compile|\n  (require 'cl))" (lispy-down 1))
lispy/lispy-test.el:431:                   "(eval-when-~compile|\n  (require 'cl))"))
list-utils/list-utils.el:259:  (require 'cl)
log4e/log4e.el:69:(eval-when-compile (require 'cl))
macrostep/lib/cl-lib.el:73:(require 'cl)
macrostep/lib/ert.el:58:  (require 'cl))
markdown-toc/test/markdown-toc-test.el:5:(require 'cl)
multiple-cursors.el/features/step-definitions/multiple-cursors-steps.el:1:(require 'cl) ;; For lexical-let
nose/nose.el:68:(require 'cl) ;; for "reduce"
open-junk-file/open-junk-file.el:101:(eval-when-compile (require 'cl))
org-cliplink/test/test-helper.el:1:(require 'cl)
org-jira/jiralib.el:84:(eval-when-compile (require 'cl))
org-jira/t/batch-runner/dash.el:658:  (require 'cl)
org-jira/t/batch-runner/dash.el:661:    (require 'cl)
org-mode/contrib/lisp/ob-tcl.el:34:(eval-when-compile (require 'cl))
org-mode/contrib/lisp/org-choose.el:66:                 ;   (require 'cl))
org-mode/contrib/lisp/org-choose.el:67:(require 'cl)
org-mode/contrib/lisp/org-depend.el:159:  (require 'cl))
org-mode/contrib/lisp/org-invoice.el:55:  (require 'cl)
org-mode/contrib/lisp/org-learn.el:38:  (require 'cl))
org-mode/contrib/lisp/org-registry.el:67:  (require 'cl))
org-mode/contrib/lisp/org-toc.el:36:  (require 'cl))
org-mode/contrib/lisp/org-wikinodes.el:28:  (require 'cl))
org-mode/contrib/lisp/ox-deck.el:48:(eval-when-compile (require 'cl))
org-mode/contrib/lisp/ox-groff.el:40:(eval-when-compile (require 'cl))
org-mode/contrib/lisp/ox-s5.el:58:(eval-when-compile (require 'cl))
org-mode/contrib/lisp/ox-taskjuggler.el:148:(eval-when-compile (require 'cl))
org-mode/contrib/scripts/org-docco.org:71:(require 'cl)
org-mode/testing/jump/findr.el:106:  (require 'cl))
org-mode/testing/jump/inflections.el:31:  (require 'cl)
org-mode/testing/jump/test/elunit.el:73:  (require 'cl)
org/contrib/lisp/ob-tcl.el:34:(eval-when-compile (require 'cl))
org/contrib/lisp/org-choose.el:66:                  ;   (require 'cl))
org/contrib/lisp/org-choose.el:67:(require 'cl)
org/contrib/lisp/org-depend.el:159:  (require 'cl))
org/contrib/lisp/org-invoice.el:55:  (require 'cl)
org/contrib/lisp/org-learn.el:38:  (require 'cl))
org/contrib/lisp/org-registry.el:67:  (require 'cl))
org/contrib/lisp/org-toc.el:36:  (require 'cl))
org/contrib/lisp/org-wikinodes.el:28:  (require 'cl))
org/contrib/lisp/ox-deck.el:48:(eval-when-compile (require 'cl))
org/contrib/lisp/ox-groff.el:40:(eval-when-compile (require 'cl))
org/contrib/lisp/ox-s5.el:58:(eval-when-compile (require 'cl))
org/contrib/lisp/ox-taskjuggler.el:148:(eval-when-compile (require 'cl))
org/contrib/scripts/org-docco.org:71:(require 'cl)
org/testing/jump/findr.el:106:  (require 'cl))
org/testing/jump/inflections.el:31:  (require 'cl)
org/testing/jump/test/elunit.el:73:  (require 'cl)
origami.el/origami-parsers.el:33:(require 'cl)
outshine/outshine.el:43:  (require 'cl))
ox-jira.el/ox-jira.el:38:(eval-when-compile (require 'cl))
ox-jira.el/ox-jira.org:104:(eval-when-compile (require 'cl))
ox-pandoc/ox-pandoc.el:37:  (require 'cl))
p4.el/p4.el:65:(eval-when-compile (require 'cl)) ; defstruct, loop, dolist, lexical-let, ...
package-lint/package-lint-test.el:350:    (package-lint-test--run "(require 'cl)"))))
paradox/helpers/paradox-counter.el:35:(eval-when-compile (require 'cl))
php-mode/lisp/php-mode.el:92:    (require 'cl)))
pylookup/pylookup.el:30:  (require 'cl)
pytest-el/pytest.el:67:(require 'cl)
pyvenv/test/test-helper.el:9:  (require 'cl))
regex-tool/regex-tool.el:56:  (require 'cl))
restart-emacs/test/restart-emacs-test.el:19:(require 'cl)
rinari/rinari.el:80:(require 'cl)
rinari/util/jump/findr.el:106:  (require 'cl))
rinari/util/jump/inflections.el:30:(require 'cl)
rinari/util/jump/test/elunit.el:73:  (require 'cl)
rinari/util/test/ert/ert.el:40:(eval-when-compile (require 'cl))
s.el/dev/ert.el:58:  (require 'cl))
scratch-el/scratch.el:118:  (require 'cl))
sesman/sesman-test.el:36:(require 'cl)
session/session.el:129:  (require 'cl)
slime/lib/cl-lib.el:73:(require 'cl)
slime/lib/ert-x.el:58:  (require 'cl))
slime/lib/ert.el:58:  (require 'cl))
spinner/spinner.el:101:  (require 'cl))
string-edit.el/features/step-definitions/string-edit-steps.el:1:(eval-when-compile (require 'cl))
tagedit/features/step-definitions/tagedit-steps.el:5:(eval-when-compile (require 'cl))
terminal-here/test/test-helper.el:12:  (require 'cl)) ;; for el-mock
twittering-mode/test.el:129:(require 'cl)
twittering-mode/twittering-mode.el:48:(eval-when-compile (require 'cl)
twittering-mode/url-emacs21/docomp.el:3:(require 'cl)
twittering-mode/url-emacs21/url-about.el:28:  (require 'cl))
twittering-mode/url-emacs21/url-buffer.el:27:  (require 'cl))
twittering-mode/url-emacs21/url-cookie.el:32:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-dav.el:26:  (require 'cl))
twittering-mode/url-emacs21/url-file.el:29:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-gw.el:27:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-handlers.el:36:  (require 'cl))
twittering-mode/url-emacs21/url-history.el:31:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-http.el:28:  (require 'cl)
twittering-mode/url-emacs21/url-imap.el:34:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-mailto.el:29:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-methods.el:30:  (require 'cl))
twittering-mode/url-emacs21/url-news.el:34:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-nfs.el:29:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-privacy.el:29:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url-vars.el:30:(eval-when-compile (require 'cl))
twittering-mode/url-emacs21/url.el:30:(eval-when-compile (require 'cl))
typescript.el/typescript-mode-general-tests.el:10:(require 'cl)
typescript.el/typescript-mode-tests.el:10:(require 'cl)
use-package/use-package-tests.el:25:(require 'cl)
volatile-highlights.el/volatile-highlights.el:198:  (require 'cl)
web-beautify/test/web-beautify-test.el:30:(eval-when-compile (require 'cl))
writegood-mode/writegood-mode.el:68:  (require 'cl))
ws-butler/tests/ws-butler-tests.el:7:(require 'cl)
yard-mode.el/yard-mode.el:31:(eval-when-compile (require 'cl))
yari.el/yari.el:54:(eval-when-compile (require 'cl))
yasnippet/doc/yas-doc-helper.el:28:  (require 'cl))
zoom-frm/zoom-frm.el:233:(eval-when-compile (require 'cl)) ;; case
jkonecny12 commented 3 years ago

Indeed. The only instance of a (require 'cl) that I could find in Spacemacs’ own files is in frame-fns.el, and it is under a conditional for when the user uses Emacs 20 or below: (eval-when-compile (when (< emacs-major-version 21) (require 'cl))). However, Spacemacs supports Emacs 25.1 and above, I guess this could be removed? I don’t think there are many people using Emacs 20 and below anymore. Can they even use Spacemacs?

If you want to find out which 3rd party packages use the cl library, you could execute grep -rin "(require 'cl)" in your .emacs.d directory and open an issue for these packages specifically.

I'm not good at reading the lisp code but isn't the cl package required also here: https://github.com/syl20bnr/spacemacs/blob/383237ef295a07356deb79812952c9440c1d438b/layers/%2Bspacemacs/spacemacs-visual/local/zoom-frm/zoom-frm.el#L233 ?

emacs18 commented 3 years ago

I think this file comes from emacswiki. This is not a file developed within spacemacs. Hence I think this should be treated as an external package.

emacs18 commented 3 years ago

Drew Adams wrote many elisp code going back decades before package.el was developed. I think most of his work is still on emacswiki, and not packaged like most other elisp packages. That I think is why these files are handled specially. If zoom-frm was on a package archive, I think a copy of this file would not be within spacemacs repo.

lebensterben commented 3 years ago

Closing since these packages are out of our control.