We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cider-test-run-test runs complex-metadata test.
cider-test-run-test
complex-metadata
cider-test-run-test runs no-metadata test.
no-metadata
Create a fresh project with a test namespace.
(ns core-test (:require [clojure.test :refer [deftest is]])) (deftest ^{:a 1} simple-metadata (println "simple-metadata") (is true)) (deftest ^{:a {}} complex-metadata (println "complex-metadata") (is true)) (deftest no-metadata (println "no-metadata") (is true))
Evaluate all forms and then
simple-metadata
The problem is likely with cider, because if I run the test with M-x nrepl-toggle-message-logging I see the following nrepl message
M-x nrepl-toggle-message-logging
(--> id "31" op "test" session "5592cda3-5c97-44d9-86ad-b4d240708b61" time-stamp "2024-11-19 22:25:08.377683423" fail-fast "true" load? "true" ns #("core-test" 0 9 (face font-lock-type-face cider-block-dynamic-font-lock t cider-locals nil help-echo cider--help-echo fontified t)) tests ("no-metadata") )
Meaning that cider actually picks up the wrong var to test.
;; CIDER 1.16.0 (Kherson), nREPL 1.3.0 ;; Clojure 1.11.1, Java 21.0.5
However, I've installed cider through melpa-unstable and it's installed in the directory cider-20241115.343. I.e. I'm running https://github.com/clojure-emacs/cider/tree/c228dec27df6b2c68262f17158208fe699e1ce02.
cider-20241115.343
29.4
I haven't ruled out interaction with other emacs packages. Although, my initial guess is that it's unlikely.
ArchLinux
The text was updated successfully, but these errors were encountered:
If you can point me to the relevant code (and test), I can look into fixing this.
Sorry, something went wrong.
Interesting catch!
The Elisp-level parsing happens at (cider--extract-test-var-at-point)
(cider--extract-test-var-at-point)
Hmmm. I haven't debugged this thoroughly, but when I looked at the source code of (cider--extract-test-var-at-point), I found this nugget.
(clojure-find-def) ;; when the point is inside `complex-metadata` => ("deftest" "no-metadata")
Thanks for the hint, btw!
Nice! Then it's primarily an issue in https://github.com/clojure-emacs/clojure-mode , although it seems good to keep this one here too.
No branches or pull requests
Expected behavior
cider-test-run-test
runscomplex-metadata
test.Actual behavior
cider-test-run-test
runsno-metadata
test.Steps to reproduce the problem
Create a fresh project with a test namespace.
Evaluate all forms and then
no-metadata
-> all's goodsimple-metadata
-> all's goodcomplex-metadata
-> it'll actually run the test no-metadataThe problem is likely with cider, because if I run the test with
M-x nrepl-toggle-message-logging
I see the following nrepl messageMeaning that cider actually picks up the wrong var to test.
Environment & Version information
CIDER version information
However, I've installed cider through melpa-unstable and it's installed in the directory
cider-20241115.343
. I.e. I'm running https://github.com/clojure-emacs/cider/tree/c228dec27df6b2c68262f17158208fe699e1ce02.Emacs version
29.4
I haven't ruled out interaction with other emacs packages. Although, my initial guess is that it's unlikely.
Operating system
ArchLinux
The text was updated successfully, but these errors were encountered: