Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Dec 8, 2022

Conversation

keram
Copy link
Contributor

@keram keram commented Dec 6, 2022

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 idris-community/idris2-mode#36 or atleast get us closer as it removes unnecessary calls to pop-to-buffer/display-buffer .

Next steps:

  • remove now unused variable idris-stay-in-current-window-on-compiler-error
  • ensure that the notes buffer is not displayed in the same window as the loaded file when first connection to idris is created

Why:
Last call in `idris-list-compiler-notes` is already call to
display the notes buffer.
This also simplify the decision if to pop or only display the notes buffer.
Why:
To make it similar with idris-list-holes and idris-hole-list-show
Why:
Interactive functions should by convention be defined in the idris-commands.el
@jfdm
Copy link
Contributor

jfdm commented Dec 7, 2022

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

@keram
Copy link
Contributor Author

keram commented Dec 7, 2022

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

@jfdm jfdm merged commit a971194 into idris-hackers:main Dec 8, 2022
@keram keram deleted the notes-error-buffer-code-cleanup branch December 8, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants