Closed atar-axis closed 5 years ago
The line after workspaceManager -> restartClient -> yield client.start();
is not reached.
I think the problem must be somewhere here:
createConnection() {
let socket = new net.Socket();
let connection = protocol.createProtocolConnection(socket, socket);
connection.onMessage((msg) => this.onMessage(msg));
connection.onSignal((data) => this.onSignal(data));
connection.onProgress((progress) => this.onProgress(progress));
this._hello = new Promise((resolve) => {
connection.onHello((msg) => {
this._state = ClientState.RUNNING;
resolve(msg);
});
});
let cmakePath = vscode.workspace.getConfiguration("cmake", this.uri).get("cmakePath", "cmake");
let configEnv = vscode.workspace.getConfiguration("cmake", this.uri).get("configurationEnvironment", {});
let processEnv = process.env;
let env = Object.assign({}, processEnv, configEnv);
this._process = child_process.execFile(cmakePath, ["-E", "server", "--pipe=" + this.pipeName, "--experimental"], { env: env });
this._connection = connection;
return new Promise((resolve, reject) => {
let errorHandler = (err) => {
this._state = ClientState.STOPPED;
this._process = undefined;
reject(err);
};
this._process.on("error", errorHandler);
// Wait some time until cmake server is spawned, the server creates the pipe
setTimeout(() => {
socket.connect(this.pipeName);
socket.on('error', errorHandler);
socket.on('connect', () => {
// Remove promise handlers
socket.removeListener('error', errorHandler);
this._process.removeListener('error', errorHandler);
socket.on("close", () => {
this._state = ClientState.STOPPED;
if (this._process) {
this._process.kill();
}
});
this._process.on("exit", (code, signal) => {
this._state = ClientState.STOPPED;
this._process = undefined;
});
connection.listen();
this._state = ClientState.CONNECTED;
resolve();
});
}, 500);
});
}
this.pipe is btw /test-9099-cmake.sock
flood@flood-r3:[~]$ cat /tmp/test-9099-cmake.sock
cat: /tmp/test-9099-cmake.sock: No such device or address
flood@flood-r3:[~]$ cmake -E server --pipe=/tmp/test-9099-cmake.sock --experimental
CMake Error: Internal Error with /tmp/test-9099-cmake.sock: EADDRINUSE
Hi, thanks for trying this extension. I know, that it is in a quiet early state, but I hoped to get some testers like you. :-) I think, I found the bug. I try to come up a fix tonight or tomorrow. I have some more fixes and features in the pipeline. So stay tuned. :-)
Perfect! Thank you for your quick response and your hard work, I am at your disposal :)
It seems like you are a bit busy right now, so if I can help you in any way - let me know ;)
Hi there, I have been quite busy lately. Sometimes it's hard to find the right balance between work, family and spare time. :) I just updated the extension. Can you try, if this version fixes your problem?
Hey there,
no problem :) thank you for your efforts!
F7
works and I faced no crashes so far :+1: Thanks!
Unfortunately, I cannot switch between the projects now :grin:
:see_no_evil: Missed that, fixed that with 0.2.1. Feel free to open more issues, when you find some more bugs. :-)
Hi there! Thank you for your Extension, looks really great at a first glance. Unfortunately I am not able to use it yet :disappointed:
When I try to clean the project, the following message appears:
Failed to restart CMake: connect ECONNREFUSED /tmp/ff1_selfcheck-3044-cmake.sock
Furthermore hitting
F7
does nothing.Additional Context
CMakeLists.txt
settings.json
Log (Extension Host)