Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions extensions/ql-vscode/src/codeql-cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { spawn } from "child-process-promise";
import type { ChildProcessWithoutNullStreams } from "child_process";
import { spawn as spawnChildProcess } from "child_process";
import { readFile } from "fs-extra";
import { delimiter, dirname, join } from "path";
import { delimiter, join } from "path";
import type { Log } from "sarif";
import { SemVer } from "semver";
import type { Readable } from "stream";
Expand Down Expand Up @@ -91,15 +91,6 @@ export type QlpacksInfo = { [name: string]: string[] };
*/
type LanguagesInfo = { [name: string]: string[] };

/** Information about an ML model, as resolved by `codeql resolve ml-models`. */
type MlModelInfo = {
checksum: string;
path: string;
};

/** The expected output of `codeql resolve ml-models`. */
type MlModelsInfo = { models: MlModelInfo[] };

/** Information about a data extension predicate, as resolved by `codeql resolve extensions`. */
type DataExtensionResult = {
predicate: string;
Expand All @@ -109,7 +100,6 @@ type DataExtensionResult = {

/** The expected output of `codeql resolve extensions`. */
type ResolveExtensionsResult = {
models: MlModelInfo[];
data: {
[path: string]: DataExtensionResult[];
};
Expand Down Expand Up @@ -1097,24 +1087,6 @@ export class CodeQLCliServer implements Disposable {
);
}

/** Resolves the ML models that should be available when evaluating a query. */
async resolveMlModels(
additionalPacks: string[],
queryPath: string,
): Promise<MlModelsInfo> {
const args =
// use the dirname of the path so that we can handle query libraries
[...this.getAdditionalPacksArg(additionalPacks), dirname(queryPath)];
return await this.runJsonCodeQlCliCommand<MlModelsInfo>(
["resolve", "ml-models"],
args,
"Resolving ML models",
{
addFormat: false,
},
);
}

/**
* Gets the RAM setting for the query server.
* @param queryMemoryMb The maximum amount of RAM to use, in MB.
Expand Down
Loading