Skip to content

Commit 423ff5b

Browse files
committed
Disable caching of provided tasks
1 parent 22ec0e3 commit 423ff5b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

integration/vscode/ada/src/taskProviders.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,16 @@ export const DEFAULT_PROBLEM_MATCHER = '$ada';
427427
* This class implements the TaskProvider interface with some configurable functionality.
428428
*/
429429
export class ConfigurableTaskProvider implements vscode.TaskProvider {
430+
/**
431+
* The list of provided tasks can be cached for efficiency, however some
432+
* tasks depend on the cursor location in the active editor. With caching,
433+
* the cursor location gets considered only the first time the tasks get
434+
* computed. The cached tasks keep using that first location.
435+
*
436+
* So for now we disable caching of tasks until a solution is found.
437+
*/
438+
private static DISABLE_CACHING = true;
439+
430440
public static taskTypeAda: TaskType = 'ada';
431441
public static taskTypeSpark: TaskType = 'spark';
432442
tasks: vscode.Task[] | undefined = undefined;
@@ -439,7 +449,7 @@ export class ConfigurableTaskProvider implements vscode.TaskProvider {
439449
}
440450

441451
async provideTasks(token?: vscode.CancellationToken): Promise<vscode.Task[]> {
442-
if (!this.tasks) {
452+
if (!this.tasks || ConfigurableTaskProvider.DISABLE_CACHING) {
443453
this.tasks = [];
444454
const cmdPrefix = await alire();
445455

0 commit comments

Comments
 (0)