Hi, i recently got an error while using the clang-format feature for cpp. The error was 'callback must be a function' and no formatting did work at all. I have to say that i am using an archlinux system (so maybe this is only an issue with a new node version or smt).
I was able to fix the issue by going into the clang-format.coffee and insert an empty function into line 84.
from:
return @exe("clang-format").run([
@dumpToFile(dumpFile, text)
["--style=file"]
]).finally( ->
fs.unlink(dumpFile)
)
to:
return @exe("clang-format").run([
@dumpToFile(dumpFile, text)
["--style=file"]
]).finally( ->
fs.unlink(dumpFile, ->)
)
this fixed the issue for me. You might want to consider adding this to your code, because i do not thing it will be a breaking change to other systems :).
This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.
I still think this should be added since the error still exists
This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.
I have this same error, also on Arch Linux (5.1.15-arch1-1-ARCH, x86_64). Will try the fix mentioned above.
_Edit: The above mentioned fix by @honigbeutler123 worked for me as well._
WOW,the method works for me too.I'm also on Arch Linux(5.1.16-arch1-1-ARCH)
Works for me. I'm on macOS High Sierra 10.13.6.
Thanks @honigbeutler123 , it works for me too.
I now have a issue on macOS Catalina Public Beta.
Your solution is almost prefect, just one more bracket ')' at the end.
Well, it is my case. :)
Thanks a lot for your solution, I only found this one.
Same problem here, the patched worked for me as well. Thanks!
I had the same problem on Windows 10 (Atom 1.41.0 x64). The patch worked well in my environment as well.
same story on ubuntu 16.04, atom v1.40
Fixed it for me too, thanks!
I am on macOS 10.14.6
Atom 1.41.0 x64
Issue persists in latest package
Fixed it for me too, thanks!
I am on windows 10 18363.1016
Atom 1.50.0 x64
It works for me, thanks!