idris-hackers / idris-mode

Idris syntax highlighting, compiler-supported editing, interactive REPL and more things for Emacs.
GNU General Public License v3.0
267 stars 70 forks source link

Make idris-compiler-notes-mode derived from special-mode and #582

Closed keram closed 1 year ago

keram commented 1 year ago

align code structure of idris-list-compiler-notes with idris-hole-list-show.

idris-comp-notes-list-show-vs-hole-list-show

Also includes few small improvements (see commits for details)

Why: To improve maintainability. This PR may also fix issue with company-mode https://github.com/idris-community/idris2-mode/issues/36 or atleast get us closer as it removes unnecessary calls to pop-to-buffer/display-buffer .

Next steps:

jfdm commented 1 year ago

Several jobs failed. I am rerunning them to see if the issue is caching or something else entirely.

keram commented 1 year ago

Several jobs failed. I am rerunning them to see if the issue is caching or something else entirely.

I may try rebuild my version of Idris2 to check if something changed there by any chance. So far haven't been able to reproduce any of these CI failures with Idris 2, version 0.6.0-f443723f4. One interesting discovery I made this morning on M1 Mac is that the tests that get "randomly" stuck at "Preparing compiler note tree..." from:

(defun idris-list-compiler-notes ()
  "Show the compiler notes in tree view."
  (interactive)
  (with-temp-message "Preparing compiler note tree..."
    (idris-compiler-notes-list-show (reverse idris-raw-warnings))))

start passing consistently after slight change (printing the idris-raw-warnings in debug message) 🤯

(defun idris-list-compiler-notes ()
  "Show the compiler notes in tree view."
  (interactive)
  (with-temp-message "Preparing compiler note tree..."
    (message "-t- idris-list-compiler-notes 0 %s" idris-raw-warnings)
    (idris-compiler-notes-list-show (reverse idris-raw-warnings))))