Occasionally, the wrong REPL type is selected.

Ouverte
#151 9 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
clojure, emacs, emacs-lisp

Piste de recherche

Commencez dans inf-clojure.el, au niveau de inf-clojure--detect-repl-type vers la ligne 297, et examinez comment inf-clojure--process-response et inf-clojure--process-reponse-match-p gèrent les résultats vides. Reproduisez le problème avec process-activity logging après avoir réinitialisé localement inf-clojure-repl-type, puis vérifiez que la détection ne sélectionne pas un type de REPL incorrect et que la sortie de eldoc utilise correctement le type sélectionné.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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).

Langage dominant
Emacs Lisp
Étoiles
260
Forks
43
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de clojure-emacs/inf-clojure

Toutes les issues de clojure-emacs/inf-clojure

Issues similaires

Plus d'issues DevTools

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.