Skip to content

Ultra causes CIDER to hang indefinitely when running tests with some values #79

@daveliepmann

Description

@daveliepmann

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

  1. Have {:user {:plugins [[venantius/ultra "0.5.2"]]}} in ~/.lein/profiles.clj
  2. lein new decimal-bug
  3. Create new function in that project's file src/decimal_bug/core.clj: (defn bar [] {:number 1}) and save the buffer
  4. Replace a-test with this new test in that project's file test/decimal_bug/core_test.clj:
    (deftest decimal-test
      (testing "documenting CIDER decimal bug"
        (is (map? (bar)))))
  5. M-x cider-jack-in / C-c M-j
  6. M-x cider-test-run-ns-tests / C-c C-t C-n, tests complete and pass almost instantly, all is well
  7. Change bar to now return {:number 1.0}
  8. (Optional) For clarity, especially for folks using 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:
    (deftest decimal-test
      (testing "documenting CIDER decimal bug"
        (is (map? (bar)))
        (is (number? (val (first (bar)))))))
  9. M-x cider-test-run-ns-tests / C-c C-t C-n, 💥 tests hang indefinitely, CIDER must be shut down manually

I could also get the tests to hang with bar returning simply 1 and decimal-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

;; CIDER 0.16.0 (Riga), nREPL 0.2.13
;; Clojure 1.8.0, Java 1.8.0_151

Lein/Boot version

Leiningen 2.8.1 on Java 1.8.0_151 Java HotSpot(TM) 64-Bit Server VM

Emacs version

GNU Emacs 25.3.1 (x86_64-apple-darwin17.2.0, Carbon Version 158 AppKit 1561.1) of 2018-01-05

Operating system

MacOS High Sierra 10.13.2 (17C88)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions