-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
cider-test-run-ns-tests-with-filters
- includes/excludes don't work
#2357
Comments
@bbatsov I've just tried the latest build (
That single "typo" isn't probably the whole story. |
Seems there's also some mismatch between the params passed by cider-nrepl to orchard (where this filtering actually happens). I'm extremely busy today, so I'll take a look either in the evening or tomorrow. Maybe @SevereOverfl0w will be able to check what's going wrong in the mean time. |
I think I'm being stupid, where's the typo (did What's changed in cider.el? The ns query I'm expecting here would be:
I'm not an emacs user, so I'm a bit stuck on how to run/debug this, @jumarko are you comfortable using some strategy to debug cider-nrepl (Can you debug cider with cider maybe?). |
@SevereOverfl0w It was fixed on |
(that's just a guess, because before I fixed the middleware call we were just not sending anything meaningful to the middleware and now we send empty include/exclude most of the time). |
This makes sense if there's an empty list being passed. This goes back to our previous discussion about emacs nil of cider-nrepl could coerce Having said that, orchard should probably define a behavior for empty include/exclude-meta lists. I'm not sure what reasonable behavior is, my personal view is that Given that both those states don't mean much or add anything, I consider an empty list "undefined behavior" for now, until I can figure out what it means to be in those states. |
@vspinu Any great ideas how to properly encode nil on the Emacs side as nil? Maybe add some special representation for it for our bencode encoder? |
I am not following all the details, but would not sending nil entries be an option? On the other side you would essentially get a nil. |
It's actually nrepl/bencode semantics which identifies lists and nils. So if you would like to support nrepl clients I am afraid you have to either adopt this semantics, push a change to tools.nrepl.bencode, or enforce nil-punning which orchard's query.clj already does with that |
Same problem running via the Spacemac's Clojure layer. Can't run any of my tests. Not doing anything with include / exclude.
|
@vspinu is right. The best fix is not to send the nil values to the middleware. I'll update this.
I never read nREPL bencode implementation, I just assumed the problem we were facing with the nils was related to the fact they don't truly exist in Emacs. |
@jmcelwain @jumarko Can you confirm that this is solved for you? |
@bbatsov I don't see any change. When I use
When I use |
Please, file a different issue for this, so we won't forget about this. |
Ok, so after reading #2357 (comment) properly I can confirm that this works.
One more problem that I had was using |
Probably we should just support both, so people won't have to think about this. |
Done. |
Summary
Function
cider-test-run-ns-tests-with-filters
doesn't work as expected: includes/excludes aren't taken into account.The problem is probably a typo: "includes" ("excludes") instead of "include" ("exclude").
Expected behavior
The specified includes/excludes should be applied and only matching tests should be run.
Actual behavior
It always runs all the tests.
Steps to reproduce the problem
Just run
cider-test-run-ns-tests-with-filters
in a namespace with some "integration tests"And try to run the tests via
cider-test-run-ns-tests-with-filters
using empty "includes" and:integration
as "excludes".Cider will always run all the tests not excluding anything
Environment & Version information
CIDER version information
Include here the version string displayed when
CIDER's REPL is launched. Here's an example:
Emacs version
25.3.1
Operating system
Mac OS High Sierra 10.13.5
The text was updated successfully, but these errors were encountered: