Skip to content

Commit a844395

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents ffbd88d + 80a91c4 commit a844395

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

integration/vscode/ada/src/taskProviders.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ async function computeProject(taskDef?: CustomTaskDefinition): Promise<string> {
8080

8181
// Call commonArgs on args and append `-gnatef` to generate full file names in errors/warnings
8282
export const getDiagnosticArgs = (): string[] => {
83-
const p_gnatef = ['-cargs', '-gnatef'];
83+
const p_gnatef = ['"-cargs:ada"', '-gnatef'];
84+
// PowerShell splits arguments on `:`, so we need extra quotes around `-cargs:ada`
8485
return p_gnatef;
8586
};
8687

integration/vscode/ada/test/suite/general/tasks.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ suite('GPR Tasks Provider', function () {
8484
const exec = resolved.execution as vscode.ShellExecution;
8585
const actualCmd = [exec.command].concat(exec.args).join(' ');
8686

87-
const expectedCmd = `gprbuild -P ${def.configuration.projectFile} -cargs -gnatef`;
87+
const expectedCmd = `gprbuild -P ${def.configuration.projectFile} "-cargs:ada" -gnatef`;
8888

8989
assert.strictEqual(actualCmd, expectedCmd);
9090
});
@@ -111,7 +111,7 @@ suite('GPR Tasks Provider', function () {
111111

112112
const expectedCmd = `gprbuild -P ${def.configuration.projectFile} ${
113113
def.configuration.main ?? ''
114-
} -cargs -gnatef`;
114+
} "-cargs:ada" -gnatef`;
115115

116116
assert.strictEqual(actualCmd, expectedCmd);
117117
});
@@ -140,7 +140,7 @@ suite('GPR Tasks Provider', function () {
140140
// via project attributes
141141
const expectedCmd = `gprbuild -P ${def.configuration.projectFile} ${
142142
def.configuration.main ?? ''
143-
} -cargs -gnatef && obj/main1exec${process.platform == 'win32' ? '.exe' : ''}`;
143+
} "-cargs:ada" -gnatef && obj/main1exec${process.platform == 'win32' ? '.exe' : ''}`;
144144

145145
assert.strictEqual(actualCmd, expectedCmd);
146146
});

source/client/lsp-raw_clients.adb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ package body LSP.Raw_Clients is
139139
return Self.Server.Identifier;
140140
end Server_PID;
141141

142+
------------------
143+
-- Kill_Process --
144+
------------------
145+
146+
procedure Kill_Process (Self : in out Raw_Client'Class) is
147+
begin
148+
Self.Server.Kill_Process;
149+
end Kill_Process;
150+
142151
-------------------
143152
-- Set_Arguments --
144153
-------------------

source/client/lsp-raw_clients.ads

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,17 @@ package LSP.Raw_Clients is
112112

113113
function Can_Send_Message (Self : Raw_Client'Class) return Boolean;
114114
-- Return True when server's process is running and send queue is empty,
115-
-- thus send operation can start immidiately.
115+
-- thus send operation can start immediately.
116116

117117
function Server_PID (Self : Raw_Client'Class) return String;
118118
-- Return server process id (pid) if the server has been started.
119119

120+
procedure Kill_Process (Self : in out Raw_Client'Class);
121+
-- Kill current server process. Process will exit immediately.
122+
--
123+
-- On Windows, TerminateProcess() is called, and on POSIX, the SIGKILL
124+
-- signal is sent.
125+
120126
private
121127
type Listener (Client : access Raw_Client'Class) is limited
122128
new Spawn.Processes.Process_Listener with null record;

0 commit comments

Comments
 (0)