Visitar URL original
Improve Flycheck workaround by raxod502 · Pull Request #1235 · radian-software/straight.el · GitHub
Skip to content

Improve Flycheck workaround - #1235

Merged
raxod502 merged 1 commit into
developfrom
rr-flycheck-advice-fix
Jun 24, 2025
Merged

raxod502 merged 1 commit into
developfrom
rr-flycheck-advice-fix

Conversation

@raxod502

Copy link
Copy Markdown
Member

Fix problem reported in #938 by advising a more appropriate function; this way, only the minimum amount of code is disabled, preventing setup and tear-down from being skipped.

I haven't actually tested this. If it causes a regression, I pinkie-promise to add a regression test when fixing that.

@raxod502
raxod502 enabled auto-merge June 24, 2025 19:16
@raxod502
raxod502 merged commit 0ec8220 into develop Jun 24, 2025
@raxod502
raxod502 deleted the rr-flycheck-advice-fix branch June 24, 2025 19:17
@ed9w2in6

ed9w2in6 commented Oct 9, 2026 •

Copy link
Copy Markdown

It seems that the part where the advice is added has not been changed.
May I ask if this is intended?

straight.el/straight.el

Lines 7875 to 7882 in a784c61

(if straight-fix-flycheck
(progn
(add-hook 'first-change-hook #'straight--flycheck-in-place-reenable)
(advice-add 'flycheck-start-current-syntax-check :around
#'straight--flycheck-in-place-inhibit))
(remove-hook 'first-change-hook #'straight--flycheck-in-place-reenable)
(advice-remove 'flycheck-start-current-syntax-check
#'straight--flycheck-in-place-inhibit))

I expect sth like this

(if straight-fix-flycheck
     (progn
       (add-hook 'first-change-hook #'straight--flycheck-in-place-reenable)
       (advice-add 'flycheck-may-use-checker :before-until  ; HERE
                   #'straight--flycheck-in-place-inhibit))
   (remove-hook 'first-change-hook #'straight--flycheck-in-place-reenable)
   (advice-remove 'flycheck-may-use-checker ; HERE
                  #'straight--flycheck-in-place-inhibit))

which seems to fix the errors showing up in the message buffer

@raxod502

Copy link
Copy Markdown
Member Author

Oh jeez. No that looks like I just straight-up failed to make the change described. Lines up with the fact I said I didn't test the result. Want to PR that or shall I make the change?

@ed9w2in6

Copy link
Copy Markdown

@raxod502 Sure, something like this?

#1302

raxod502 pushed a commit that referenced this pull request Oct 17, 2026
As mentioned on #1235 , these are my expected changes to allow flycheck
to startup normally, and to
get rid of the error messages showing up in the `*Messages*` buffer.

I had discovered the regression after a recent update to latest commit
(a784c61).
The symptoms are that flycheck failed to start up, complaining about
wrong number of arguments.

As I am not sure what are the intention of the fix, I had only verified
that flycheck starts up normally again.
The changes proposed are based on the intention stated in the docstring
in the relevant advice function.

ref:
pull #1235 commit sha: bffdeba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants