Skip to content

Commit 80dfe4b

Browse files
committed
Rename slurpQueryHistory -> deserializeQueryHistory
1 parent 06bc4c8 commit 80dfe4b

6 files changed

Lines changed: 12 additions & 10 deletions

File tree

extensions/ql-vscode/src/legacy-query-server/run-queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { QueryEvaluationInfo, QueryWithResults } from "../run-queries-shared";
3636
export class QueryInProgress {
3737
public queryEvalInfo: QueryEvaluationInfo;
3838
/**
39-
* Note that in the {@link slurpQueryHistory} method, we create a QueryEvaluationInfo instance
39+
* Note that in the {@link deserializeQueryHistory} method, we create a QueryEvaluationInfo instance
4040
* by explicitly setting the prototype in order to avoid calling this constructor.
4141
*/
4242
constructor(

extensions/ql-vscode/src/query-history.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import {
4848
variantAnalysisStatusToQueryStatus,
4949
} from "./query-status";
5050
import {
51-
slurpQueryHistory,
51+
deserializeQueryHistory,
5252
serializeQueryHistory,
5353
} from "./query-serialization";
5454
import { pathExists } from "fs-extra";
@@ -790,7 +790,9 @@ export class QueryHistoryManager extends DisposableObject {
790790
void extLogger.log(
791791
`Reading cached query history from '${this.queryMetadataStorageLocation}'.`,
792792
);
793-
const history = await slurpQueryHistory(this.queryMetadataStorageLocation);
793+
const history = await deserializeQueryHistory(
794+
this.queryMetadataStorageLocation,
795+
);
794796
this.treeDataProvider.allHistory = history;
795797
await Promise.all(
796798
this.treeDataProvider.allHistory.map(async (item) => {

extensions/ql-vscode/src/query-results.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class CompletedQueryInfo implements QueryWithResults {
7575
interpretedResultsSortState: InterpretedResultsSortState | undefined;
7676

7777
/**
78-
* Note that in the {@link slurpQueryHistory} method, we create a CompletedQueryInfo instance
78+
* Note that in the {@link deserializeQueryHistory} method, we create a CompletedQueryInfo instance
7979
* by explicitly setting the prototype in order to avoid calling this constructor.
8080
*/
8181
constructor(evaluation: QueryWithResults) {
@@ -233,7 +233,7 @@ export class LocalQueryInfo {
233233
public evalLogSummarySymbolsLocation: string | undefined;
234234

235235
/**
236-
* Note that in the {@link slurpQueryHistory} method, we create a FullQueryInfo instance
236+
* Note that in the {@link deserializeQueryHistory} method, we create a FullQueryInfo instance
237237
* by explicitly setting the prototype in order to avoid calling this constructor.
238238
*/
239239
constructor(

extensions/ql-vscode/src/query-serialization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { QueryStatus } from "./query-status";
1313
import { QueryEvaluationInfo } from "./run-queries-shared";
1414
import { QueryResultType } from "./pure/legacy-messages";
1515

16-
export async function slurpQueryHistory(
16+
export async function deserializeQueryHistory(
1717
fsPath: string,
1818
): Promise<QueryHistoryInfo[]> {
1919
try {

extensions/ql-vscode/src/run-queries-shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function findQueryEvalLogEndSummaryFile(resultPath: string): string {
6868

6969
export class QueryEvaluationInfo {
7070
/**
71-
* Note that in the {@link slurpQueryHistory} method, we create a QueryEvaluationInfo instance
71+
* Note that in the {@link deserializeQueryHistory} method, we create a QueryEvaluationInfo instance
7272
* by explicitly setting the prototype in order to avoid calling this constructor.
7373
*/
7474
constructor(

extensions/ql-vscode/test/vscode-tests/no-workspace/query-results.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { CodeQLCliServer, SourceInfo } from "../../../src/cli";
2222
import { CancellationTokenSource, Uri } from "vscode";
2323
import { tmpDir } from "../../../src/helpers";
2424
import {
25-
slurpQueryHistory,
25+
deserializeQueryHistory,
2626
serializeQueryHistory,
2727
} from "../../../src/query-serialization";
2828
import {
@@ -500,7 +500,7 @@ describe("query-results", () => {
500500

501501
// splat and slurp
502502
await serializeQueryHistory(allHistory, allHistoryPath);
503-
const allHistoryActual = await slurpQueryHistory(allHistoryPath);
503+
const allHistoryActual = await deserializeQueryHistory(allHistoryPath);
504504

505505
// the dispose methods will be different. Ignore them.
506506
allHistoryActual.forEach((info) => {
@@ -543,7 +543,7 @@ describe("query-results", () => {
543543
"utf8",
544544
);
545545

546-
const allHistoryActual = await slurpQueryHistory(badPath);
546+
const allHistoryActual = await deserializeQueryHistory(badPath);
547547
// version number is invalid. Should return an empty array.
548548
expect(allHistoryActual).toEqual([]);
549549
});

0 commit comments

Comments
 (0)