Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spawn sync #130

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/haxeLanguageServer/features/haxe/DiagnosticsFeature.hx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DiagnosticsFeature {
}
timerName = useJsonRpc ? DisplayMethods.Diagnostics : "@diagnostics";

ChildProcess.exec(context.config.haxelib.executable + " config", (error, stdout, stderr) -> haxelibPath = new FsPath(stdout.trim()));
ChildProcess.exec(context.config.haxelib.executable + " config", {shell: true}, (error, stdout, stderr) -> haxelibPath = new FsPath(stdout.trim()));

context.languageServerProtocol.onNotification(LanguageServerMethods.RunGlobalDiagnostics, onRunGlobalDiagnostics);
}
Expand Down
2 changes: 1 addition & 1 deletion src/haxeLanguageServer/server/HaxeServer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class HaxeServer {
mergeEnvs(js.Node.process.env, env);
mergeEnvs(config.env, env);

final spawnOptions = {env: env, cwd: context.workspacePath.toString()};
final spawnOptions = {env: env, cwd: context.workspacePath.toString(), shell: true};

if (!checkHaxeVersion(config.path, spawnOptions)) {
return;
Expand Down
11 changes: 7 additions & 4 deletions src/haxeLanguageServer/server/ServerRecording.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package haxeLanguageServer.server;

import haxe.Json;
import haxe.io.Path;
import haxeLanguageServer.Configuration.ServerRecordingConfig;
import haxeLanguageServer.helper.FsHelper;
import haxeLanguageServer.server.ServerRecordingTools.getVcsState;
import jsonrpc.CancellationToken;
import jsonrpc.ResponseError;
import sys.FileSystem;
import sys.io.File;
import sys.io.FileOutput;
import sys.FileSystem;
import haxeLanguageServer.Configuration.ServerRecordingConfig;
import haxeLanguageServer.helper.FsHelper;
import haxeLanguageServer.server.ServerRecordingTools.getVcsState;

using StringTools;
using haxeLanguageServer.helper.StringHelper;
Expand Down Expand Up @@ -170,6 +170,9 @@ class ServerRecording {
}

public function onFileEvent(event:FileEvent):Void {
if (!enabled)
return;

final kind = switch (event.type) {
case Changed: "fileChanged";
case Created: "fileCreated";
Expand Down
Loading