Occasionally, the wrong REPL type is selected.

未关闭
#151 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
clojure, emacs, emacs-lisp

调研方向

从 inf-clojure.el 中第 297 行附近的 inf-clojure--detect-repl-type 开始,检查 inf-clojure--process-response 和 inf-clojure--process-reponse-match-p 如何处理空结果。在本地重置 inf-clojure-repl-type 后,通过 process-activity logging 重现该问题,然后验证检测不会选择错误的 REPL 类型,并验证 eldoc 输出正确使用所选类型。

由索引模型根据 Issue 内容生成。

描述

Occasionally, inf-clojure will select the wrong REPL type. The problem appears to start here at inf-clojure--detect-repl-type: https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L297

I added debug messages around inf-clojure--process-reponse-match-p ( https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L1277) and it looks like what is happening is that one of the calls to inf-clojure--process-response, to check if a certain namespace, like planck.repl, is available, will return a blank string, and then the corresponding type will be selected because it isn't nil.

The most obvious symptom of this issue is that the eldoc output will either be absent or show part of an error message. I added a message to print out the type as soon as it was selected, but you can also see it calling the wrong functions if you follow the instructions for logging process activity here: https://github.com/clojure-emacs/inf-clojure#log-process-activity.

To test this, I had to M-: (setq-local inf-clojure-repl-type nil) RET in the buffer that I was testing in order for inf-clojure to reattempt to determine the REPL type.

Initially, I thought I could reproduce the problem by evaluating the buffer after the REPL starts, but before triggering eldoc (by moving the cursor inside an expression), but I haven't been able to trigger the issue consistently (only about 3 out of 25 attempts).

主要语言
Emacs Lisp
星标
260
派生
43
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

clojure-emacs/inf-clojure 的其他 Issue

查看 clojure-emacs/inf-clojure 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。