clojure-emacs / clojure-emacs/inf-clojure
Occasionally, the wrong REPL type is selected.
- Lingua principale
- Emacs Lisp
- Stelle
- 259
- Fork
- 42
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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).
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in inf-clojure.el, in corrispondenza di inf-clojure--detect-repl-type intorno alla riga 297, e analizza come inf-clojure--process-response e inf-clojure--process-reponse-match-p gestiscono i risultati vuoti. Riproduci il problema con process-activity logging dopo aver reimpostato localmente inf-clojure-repl-type, quindi verifica che il rilevamento non selezioni un tipo di REPL errato e che l'output di eldoc utilizzi correttamente il tipo selezionato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- clojure, emacs, emacs-lisp
- Ambito
- developer-experience, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100