Closed krgn closed 9 years ago
What is your emacs version?
How did you install irony?
Emacs 24.4 (Arch Linux) + Cask
Does it happens with the most basic configuration of flycheck irony?
Can you print the arguments of irony-diagnostics--request-handler
?
(defun irony-diagnostics--request-handler (diagnostics callback)
(message "diagnostics: %s, callback: %s" diagnostics callback)
(cond
((irony--buffer-parsed-p)
(funcall callback 'success diagnostics))
(t
;; buffer has become out-of-date
(funcall callback 'cancelled "diagnostics obselete, buffer has changed"))))
I don't think it's the same problem but someone else has an invalid-function error with flycheck, it was due to some configuration issue, see https://github.com/flycheck/flycheck/issues/594#issuecomment-86688488
Can you make sure that you have this issue with a minimal configuration of flycheck-irony?
Hi, I'm receiving the same error. I took my flycheck and irony configs out of use-package but the issue remains.
I added the message statement and captured the output. Diagnostics looked fine (it was a list of errors from clang) but the callback arg was binary data and I can't copy/paste. Please let me know what I can do to assist with this issue.
Here's a much as I could get from callback:
callback: #[385 \303=\203 [irony #[128 \301\302\300#\207 [[cl-struct-flycheck-syntax-check main.c irony nil] apply flycheck-report-buffer-checker-status] 5
I'm not excluding an error in irony-mode but that would be helpful if you show the configuration file you are using, configuring only flycheck-irony and its dependencies.
emacs -Q
#installing the required packages via melpa
#basic configuration
#does it still happen?
Either I do not understand how to use lexical-let
or there is some kind of configuration issue with flycheck, or maybe it's something else but to be honest I have not many clues right now.
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)
(require 'flycheck)
(global-flycheck-mode)
(require 'irony)
(defun my-irony-mode-hook ()
(define-key irony-mode-map [remap completion-at-point]
'irony-completion-at-point-async)
(define-key irony-mode-map [remap complete-symbol]
'irony-completion-at-point-async))
(add-hook 'c-mode-common-hook 'irony-mode)
(add-hook 'irony-mode-hook 'my-irony-mode-hook)
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
(require 'flycheck-irony)
(eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
The error:
Error while checking syntax automatically: (void-function lexical-let)
Err... that error is because I didn't require cl. After requiring cl I get the original error (invalid-function (cb callback))
Sorry for the late feedback. Basically, stripping my env down with emacs -Q
then adding bits as demoed by @aport causes the same problem to occur. I'm using ArchLinux version of Emacs, which is at 24.4.1.
Here is a list of specific version of dependencies that got installed. Might be of help?
dash: 20150311.2355
epl: 201503262.1212
flycheck: 20150330.925
flycheck-irony: 20150308.1230
irony: 20150329.1347
let-alist: 1.0.3
pkg-info: 20140610.630
Okay, I get the issue now, it's due to lexical-let
apparently. I guess now is a good time to drop Emacs 23 support.
A small update. If I delete irony-diagnostics.elc then the irony checker works. Let me know if I can provide any additional information. By the way, thank you for these packages! This works a lot better than using the clang checker directly.
Okay, sorry for the delay, I understand a few things better now and it should be fixed without sacrifying Emacs 23 compatibility.
Updating irony-mode should fix your issue,
Thanks for reporting.
If I delete irony-diagnostics.elc then the irony checker works
Yeah that's normal, cl
is often loaded by some modules at some point so lexical-let is available at some point but that is just some luck, you cannot really rely on this.
Hi,
I'm seeing this error after installing flycheck-irony:
I followed the installation instructions and company-irony is working. What could be the issue?
Cheers,
k