【发布时间】:2017-01-05 22:11:52
【问题描述】:
我正在尝试使用 CIDER 的 cider-auto-test-mode 在 Emacs/CIDER 中运行我的命名空间测试。但是,每当我加载命名空间时,都会收到错误 Not an nREPL dict。有关如何解决此问题或进一步调试的任何建议?
在描述到目前为止我发现的内容之前:我使用的是 CIDER 0.12.0、cider-nrepl 版本 0.10.0 和 nREPL 0.2.12。我知道 CIDER/cider-nrepl 版本差异不好;这不是自愿的,但如果这是导致此问题的原因,我可以修复它。
在 CIDER Github issue 和 a follow-up humane-test-output issue 上讨论了同样的错误消息。在我正在使用的构建过程中,我没有发现任何可能与 humane-test-output 相关的内容。
第一次加载文件(C-c C-k)时,测试运行,我得到以下堆栈跟踪:
error("Not an nREPL dict")
nrepl-dict-map( #[...] ((dict "context" "my `testing` comment" ...)))
nrepl-dict-map( #[...] (dict "my-deftest-name" ((dict "context" "my `testing` comment" ...))))
cider-test-highlight-problems((dict "my-deftest-name" ((dict "context" "my `testing` comment" ...))))
nrepl--dispatch-response(...)
当我toggle-debug-on-error 已经加载文件后,测试不再运行,我得到这个堆栈跟踪:
error("Not an nREPL dict")
nrepl-dict-keys(((dict "context" "my `testing` comment" ...)))
nrepl-dict-map(#[...] (dict "my-deftest-name" ((dict "context" "my `testing` comment" ...))
cider-test-clear-highlights()
cider-test-execute(...)
cider-test-run-ns-tests(...)
cider--test-silently()
堆栈跟踪略有不同但问题相同:dict 的列表列出了is not a valid nREPL dict。虽然cider-test-highlight-problems 显然期望并在外部dict 列表中获得a namespace and vars,而不是接收dict 列表as apparently expected 的dict 列表,而是接收dict 列表的简单列表,如图所示在我的堆栈跟踪中。
关于如何进一步研究或解决此问题的任何建议?
【问题讨论】:
-
对于“非选择”版本不匹配有什么我可以帮助的吗?听起来这是一个不同但相关的问题?