-
Notifications
You must be signed in to change notification settings - Fork 37
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
Ultra causes CIDER to hang indefinitely when running tests with some values #79
Comments
As a non-Emacs user, I have a bit of a naive question, which is what do you use Ultra for? |
I use Ultra for test output in the terminal. This conflict has lead me to disable it so that it doesn't interfere with test output from CIDER. |
What happens if you set |
I've never used an Ultra options map, but I tried putting it in both my lein profile and my project.clj and neither had any effect. Same problem. |
Hmmmmm. Okay. I'm not sure what's happening here. Based on the behavior you're describing, I'd guess that there's something happening at a lower-level library - possibly Puget or Whidbey - that relates to the formatting of decimals or other specific data types that could be interfering with CIDER. But I can't say for certain. I'm not particularly familiar with the CIDER codebase so my initial thought was that Ultra's nREPL middleware was interfering with CIDER's. But if you've disabled the nREPL middleware by setting |
OK. In that case I think it's fair to just warn CIDER users that a conflict exists. This issue will do that (even if closed), but maybe a message in the README would help. I understand that debugging it would be a big task and it's not really necessary. Thanks for your time. |
I'll add a small note. On your end, what you could do to fix the problem (presumably) would be just to move Ultra to a dependency under the |
I'll leave this issue open for now in the event that an enterprising contributor comes along and feels like solving this. |
I managed to get this stack trace when running tests with ultra and Cider. I used
|
Following the test case helpfully provided at the start of this thread, I can reproduce the issue with the following notes:
5.5. Refresh the project with
The traceback is viewable in the |
I use Emacs and the command-line. I opted to define this issue out of existence by configuring how This will not cause any issues when keeping to the rule that projects do not depend on the lein user profile; projects have repeatable builds by including all dependencies in the project.clj. If you have a lein user profile intended to alter CIDER's behavior, consider declaring a separate profile and name it in In my .emacs: ; Skip :user section of ~/.lein/profiles.clj when using cider-jack-in.
(setq cider-lein-parameters
"with-profile -user repl :headless :host localhost") This is generally useful as projects other than Ultra run into similar conflicts when the command-line tool and IDE both attempt to format test output. For example, the humane-test-output README says:
Of course, using I'm using CIDER 0.17.0. |
Expected behavior
I run tests using CIDER, regardless of whether I have Ultra in my lein profile, regardless of the values in maps being passed from function to function, and the tests complete.
Actual behavior
With Ultra in my lein profile, CIDER hangs indefinitely when running tests which call a function that returns certain values (a decimal in one case, an integer in another; I suspect other cases exist).
Steps to reproduce the problem
{:user {:plugins [[venantius/ultra "0.5.2"]]}}
in ~/.lein/profiles.cljlein new decimal-bug
(defn bar [] {:number 1})
and save the buffera-test
with this new test in that project's file test/decimal_bug/core_test.clj:M-x cider-jack-in
/C-c M-j
M-x cider-test-run-ns-tests
/C-c C-t C-n
, tests complete and pass almost instantly, all is wellbar
to now return{:number 1.0}
cider-test-show-report-on-success
, add an assertion to our test, so that it is clear that the*cider-test-report*
does not successfully return:M-x cider-test-run-ns-tests
/C-c C-t C-n
, 💥 tests hang indefinitely, CIDER must be shut down manuallyI could also get the tests to hang with
bar
returning simply 1 anddecimal-test
checking(number? (bar))
.All these issues with hanging seem to disappear when I remove ultra from ~/.lein/profiles.clj.
Environment & Version information
CIDER version information
Lein/Boot version
Emacs version
Operating system
MacOS High Sierra 10.13.2 (17C88)
The text was updated successfully, but these errors were encountered: