Skip to content

Commit 44fbe52

Browse files
committed
Auto merge of #13413 - rust-lang:revert-13367-fix-problem-matchers, r=jonas-schievink
Revert "fix: in VSCode, correctly resolve relative paths to errors" Reverts #13367 I didn't manage to figure out what exactly is the issue, so reverting this to fix #13404 before monday.
2 parents 36a70b7 + 55fdcbe commit 44fbe52

File tree

6 files changed

+1
-21
lines changed

6 files changed

+1
-21
lines changed

editors/code/package.json

-9
Original file line numberDiff line numberDiff line change
@@ -1301,15 +1301,6 @@
13011301
"endsPattern": "^\\[Finished running\\b"
13021302
},
13031303
"pattern": "$rustc"
1304-
},
1305-
{
1306-
"name": "rustc-run",
1307-
"base": "$rustc",
1308-
"fileLocation": [
1309-
"autoDetect",
1310-
"${command:rust-analyzer.cargoWorkspaceRootForCurrentRun}"
1311-
],
1312-
"pattern": "$rustc-run"
13131304
}
13141305
],
13151306
"colors": [

editors/code/src/commands.ts

-4
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ export function run(ctx: Ctx): Cmd {
842842
item.detail = "rerun";
843843
prevRunnable = item;
844844
const task = await createTask(item.runnable, ctx.config);
845-
ctx.cargoWorkspaceRootForCurrentRun = item.cargoWorkspaceRoot;
846845
return await vscode.tasks.executeTask(task);
847846
};
848847
}
@@ -947,6 +946,3 @@ export function linkToCommand(ctx: Ctx): Cmd {
947946
}
948947
};
949948
}
950-
export function getCargoWorkspaceDir(ctx: Ctx): Cmd {
951-
return async () => ctx.cargoWorkspaceRootForCurrentRun;
952-
}

editors/code/src/ctx.ts

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ export type Workspace =
1717
};
1818

1919
export class Ctx {
20-
// Helps VS Code to correctly link problems from runnables. This is used by
21-
// `rust-analyzer.cargoWorkspaceRootForCurrentRun` command of $rustc-run problem matcher.
22-
cargoWorkspaceRootForCurrentRun?: string = undefined;
23-
2420
private constructor(
2521
readonly config: Config,
2622
private readonly extCtx: vscode.ExtensionContext,

editors/code/src/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ async function initCommonContext(context: vscode.ExtensionContext, ctx: Ctx) {
189189
ctx.registerCommand("resolveCodeAction", commands.resolveCodeAction);
190190
ctx.registerCommand("applyActionGroup", commands.applyActionGroup);
191191
ctx.registerCommand("gotoLocation", commands.gotoLocation);
192-
ctx.registerCommand("cargoWorkspaceRootForCurrentRun", commands.getCargoWorkspaceDir);
193192

194193
ctx.registerCommand("linkToCommand", commands.linkToCommand);
195194
}

editors/code/src/run.ts

-2
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,12 @@ export async function selectRunnable(
8989

9090
export class RunnableQuickPick implements vscode.QuickPickItem {
9191
public label: string;
92-
public cargoWorkspaceRoot?: string;
9392
public description?: string | undefined;
9493
public detail?: string | undefined;
9594
public picked?: boolean | undefined;
9695

9796
constructor(public runnable: ra.Runnable) {
9897
this.label = runnable.label;
99-
this.cargoWorkspaceRoot = runnable.args.workspaceRoot;
10098
}
10199
}
102100

editors/code/src/tasks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export async function buildCargoTask(
128128
name,
129129
TASK_SOURCE,
130130
exec,
131-
["$rustc-run"]
131+
["$rustc"]
132132
);
133133
}
134134

0 commit comments

Comments
 (0)