Skip to content

Commit 1188e25

Browse files
committed
fix(emacs): work around "Feature `project' is now provided by a different file"
Running our Emacs plugin tests with Emacs 27 on a fresh clone (i.e. no MELPA cache) fails: ``` $ ./plugin/emacs/test-emacs.sh [snip] passed 7/10 quicklintjs-flymake-parse-errors-and-warnings (0.000134 sec) Eager macro-expansion failure: (error "Feature `project' is now provided by a different file /__w/quick-lint-js/quick-lint-js/plugin/emacs/.melpa-cache/project-0.11.1/project.elc") Eager macro-expansion failure: (error "Feature `project' is now provided by a different file /__w/quick-lint-js/quick-lint-js/plugin/emacs/.melpa-cache/project-0.11.1/project.elc") Test quicklintjs-is-in-eglot-servers backtrace: signal(error ("Feature `project' is now provided by a different f... error("Feature `%S' is now provided by a different file %..." projec require-with-check(project) mapc(require-with-check (project flymake xref jsonrpc external-compl (let ((reload (if (fboundp 'require-with-check) #'require-with-check (progn (let ((reload (if (fboundp 'require-with-check) #'require-wit eval((progn (let ((reload (if (fboundp 'require-with-check) #'requir #f(compiled-function (&rest body) "Like `progn', but evaluates the b (eval-and-compile (let ((reload (if (fboundp 'require-with-check) #' eval-buffer(#<killed buffer> nil "/__w/quick-lint-js/quick-lint-js/p load-with-code-conversion("/__w/quick-lint-js/quick-lint-js/plugin/e require(eglot) eval-buffer(#<killed buffer> nil "/__w/quick-lint-js/quick-lint-js/p load-with-code-conversion("/__w/quick-lint-js/quick-lint-js/plugin/e require(eglot-quicklintjs) (closure (t) nil (let* ((fn-20 #'>=) (args-21 (condition-case err (l ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name quicklintjs-is-in-eglot-servers :docu ert-run-or-rerun-test(#s(ert--stats :selector t :tests ... :test-map ert-run-tests(t #f(compiled-function (event-type &rest event-args) # ert-run-tests-batch(nil) ert-run-tests-batch-and-exit() quicklintjs-test-main() command-line-1(("-L" "." "-l" "test/quicklintjs-test.el" "-f" "quick command-line() normal-top-level() Test quicklintjs-is-in-eglot-servers condition: (error "Feature `project' is now provided by a different file /__w/quick-lint-js/quick-lint-js/plugin/emacs/.melpa-cache/project-0.11.1/project.elc") FAILED 8/10 quicklintjs-is-in-eglot-servers (0.010112 sec) passed 9/10 quicklintjs-is-in-flycheck-checkers (0.000109 sec) passed 10/10 quicklintjs-is-in-lsp-clients (0.002524 sec) Ran 10 tests, 9 results as expected, 1 unexpected (2025-06-16 00:18:10+0000, 0.386571 sec) 1 unexpected results: FAILED quicklintjs-is-in-eglot-servers ``` Running tests again doesn't have this issue. (A filled MELPA cache fixes the problem.) Work around this issue with a hack to make the tests pass.
1 parent 6a5482a commit 1188e25

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugin/emacs/test/quicklintjs-test.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
(quicklintjs-install-deps (if (>= emacs-major-version 26)
4242
'(flycheck eglot lsp-mode)
4343
'(flycheck)))
44+
45+
; HACK(strager): Work around error:
46+
; Feature `project' is now provided by a different file
47+
; /__w/quick-lint-js/quick-lint-js/plugin/emacs/.melpa-cache/project-0.11.1/project.elc"
48+
; https://github.com/joaotavora/eglot/discussions/1436
49+
(delete 'project features)
50+
4451
(def-flycheck-tests)
4552
(def-eglot-tests)
4653
(def-lsp-tests)

0 commit comments

Comments
 (0)