Closed joaopaulo23 closed 6 years ago
Not sure what is wrong.
I call (process-lines "irony-server" "--version")
.
I would expect process-lines to handle Windows line endings.
What happen if you do something like:
(process-lines "echo" "toto")
Do you have ("toto")
or something like ("toto^M")
?
The first call returned
("irony-server version 1.0.0^M" "clang version 4.0.0 (tags/RELEASE_400/final)^M")
the second
("toto")
This "^M" work as breakline i guess.
Other Windows users have not reported any issue like this before, so I'm suspecting it's something up with your environment. I could try to work around it, but I'm afraid it would hide the real issue.
Maybe it's something related to the mysys environment, which Emacs could consider "unixy" and expect \n
newline, while the binary is run with a Windows launcher and return \r\n
.
Ideally you could try with a simple hello world app compile the same as irony-server to see if the behavior is the same. I don't have much advice to offer, I expect "process-lines" to not return the ^M, or that we understand why it does.
I guess that i could just modify something in some .el to repair that. I'll try to change the C code, removing \n or using another charset. I really guess that is the charset problem, that "^M" seems to be a "\n" in other charset, but i'm not so sure. If it helps, i will post here what i changed to help another who could be struggling in this problem.
I guess i was able to fix the error. go to irony-mode/server/src/main.cpp, find the print version parte of the code and substitute for this.
static void printVersion() {
// do not change the format for the first line, external programs should be
// able to rely on it
std::cout << "irony-server version " IRONY_PACKAGE_VERSION;
/*CXString cxVersionString = clang_getClangVersion();
std::cout << clang_getCString(cxVersionString)<<" ";
clang_disposeString(cxVersionString);*/
}
It fixed, but still a little weird, i guess it could be a flycheck problem. Sorry for bother you, i'm new at emacs.
I was able to compile the irony-server on msys2, but, when i try to start flycheck with irony-server, it is returning this error:
Anyone knows how to fix it? I need to recompile at different charset?