11import { CancellationToken } from "vscode" ;
2- import { CodeQLCliServer } from "../codeql-cli/cli" ;
32import { ProgressCallback } from "../common/vscode/progress" ;
43import { DatabaseItem } from "../databases/local-databases" ;
54import { CoreCompletedQuery , QueryRunner } from "../query-server" ;
6- import { createLockFileForStandardQuery } from "./standard-queries" ;
75import { TeeLogger , showAndLogExceptionWithTelemetry } from "../common/logging" ;
86import { QueryResultType } from "../query-server/new-messages" ;
97import { extLogger } from "../common/logging/vscode" ;
@@ -12,7 +10,6 @@ import { redactableError } from "../common/errors";
1210import { basename } from "path" ;
1311
1412type RunQueryOptions = {
15- cliServer : CodeQLCliServer ;
1613 queryRunner : QueryRunner ;
1714 databaseItem : DatabaseItem ;
1815 queryPath : string ;
@@ -21,11 +18,9 @@ type RunQueryOptions = {
2118 extensionPacks : string [ ] | undefined ;
2219 progress : ProgressCallback ;
2320 token : CancellationToken ;
24- createLockFile : boolean ;
2521} ;
2622
2723export async function runQuery ( {
28- cliServer,
2924 queryRunner,
3025 databaseItem,
3126 queryPath,
@@ -34,18 +29,7 @@ export async function runQuery({
3429 extensionPacks,
3530 progress,
3631 token,
37- createLockFile,
3832} : RunQueryOptions ) : Promise < CoreCompletedQuery | undefined > {
39- let cleanupLockFile : ( ( ) => Promise < void > ) | undefined = undefined ;
40- if ( createLockFile ) {
41- // Create a lock file for the query. This is required to resolve dependencies and library path for the query.
42- const { cleanup } = await createLockFileForStandardQuery (
43- cliServer ,
44- queryPath ,
45- ) ;
46- cleanupLockFile = cleanup ;
47- }
48-
4933 // Create a query run to execute
5034 const queryRun = queryRunner . createQueryRun (
5135 databaseItem . databaseUri . fsPath ,
@@ -68,8 +52,6 @@ export async function runQuery({
6852 new TeeLogger ( queryRunner . logger , queryRun . outputDir . logPath ) ,
6953 ) ;
7054
71- await cleanupLockFile ?.( ) ;
72-
7355 if ( completedQuery . resultType !== QueryResultType . SUCCESS ) {
7456 void showAndLogExceptionWithTelemetry (
7557 extLogger ,
0 commit comments