diff --git a/extensions/ql-vscode/src/commandRunner.ts b/extensions/ql-vscode/src/commandRunner.ts index 7079723c1..ea1a84526 100644 --- a/extensions/ql-vscode/src/commandRunner.ts +++ b/extensions/ql-vscode/src/commandRunner.ts @@ -1,11 +1,4 @@ -import { - CancellationToken, - ProgressOptions as VSCodeProgressOptions, - window as Window, - commands, - Disposable, - ProgressLocation, -} from "vscode"; +import { CancellationToken, commands, Disposable } from "vscode"; import { showAndLogExceptionWithTelemetry, showAndLogWarningMessage, @@ -14,51 +7,22 @@ import { extLogger } from "./common"; import { asError, getErrorMessage, getErrorStack } from "./pure/helpers-pure"; import { telemetryListener } from "./telemetry"; import { redactableError } from "./pure/errors"; - -export class UserCancellationException extends Error { - /** - * @param message The error message - * @param silent If silent is true, then this exception will avoid showing a warning message to the user. - */ - constructor(message?: string, public readonly silent = false) { - super(message); - } -} - -export interface ProgressUpdate { - /** - * The current step - */ - step: number; - /** - * The maximum step. This *should* be constant for a single job. - */ - maxStep: number; - /** - * The current progress message - */ - message: string; -} - -export type ProgressCallback = (p: ProgressUpdate) => void; - -// Make certain properties within a type optional -type Optional = Pick, K> & Omit; - -export type ProgressOptions = Optional; +import { + UserCancellationException, + withProgress, + ProgressOptions, + ProgressCallback, +} from "./progress"; /** - * A task that reports progress. + * A task that handles command invocations from `commandRunner`. + * Arguments passed to the command handler are passed along, + * untouched to this `NoProgressTask` instance. * - * @param progress a progress handler function. Call this - * function with a `ProgressUpdate` instance in order to - * denote some progress being achieved on this task. - * @param token a cancellation token + * @param args arguments passed to this task passed on from + * `commands.registerCommand`. */ -export type ProgressTask = ( - progress: ProgressCallback, - token: CancellationToken, -) => Thenable; +export type NoProgressTask = (...args: any[]) => Promise; /** * A task that handles command invocations from `commandRunner` @@ -75,64 +39,12 @@ export type ProgressTask = ( * @param args arguments passed to this task passed on from * `commands.registerCommand`. */ -export type ProgressTaskWithArgs = ( +type ProgressTaskWithArgs = ( progress: ProgressCallback, token: CancellationToken, ...args: any[] ) => Thenable; -/** - * A task that handles command invocations from `commandRunner`. - * Arguments passed to the command handler are passed along, - * untouched to this `NoProgressTask` instance. - * - * @param args arguments passed to this task passed on from - * `commands.registerCommand`. - */ -export type NoProgressTask = (...args: any[]) => Promise; - -/** - * This mediates between the kind of progress callbacks we want to - * write (where we *set* current progress position and give - * `maxSteps`) and the kind vscode progress api expects us to write - * (which increment progress by a certain amount out of 100%). - * - * Where possible, the `commandRunner` function below should be used - * instead of this function. The commandRunner is meant for wrapping - * top-level commands and provides error handling and other support - * automatically. - * - * Only use this function if you need a progress monitor and the - * control flow does not always come from a command (eg- during - * extension activation, or from an internal language server - * request). - */ -export function withProgress( - task: ProgressTask, - { - location = ProgressLocation.Notification, - title, - cancellable, - }: ProgressOptions = {}, -): Thenable { - let progressAchieved = 0; - return Window.withProgress( - { - location, - title, - cancellable, - }, - (progress, token) => { - return task((p) => { - const { message, step, maxStep } = p; - const increment = (100 * (step - progressAchieved)) / maxStep; - progressAchieved = step; - progress.report({ message, increment }); - }, token); - }, - ); -} - /** * A generic wrapper for command registration. This wrapper adds uniform error handling for commands. * @@ -216,48 +128,3 @@ export function commandRunnerWithProgress( outputLogger, ); } - -/** - * Displays a progress monitor that indicates how much progess has been made - * reading from a stream. - * - * @param readable The stream to read progress from - * @param messagePrefix A prefix for displaying the message - * @param totalNumBytes Total number of bytes in this stream - * @param progress The progress callback used to set messages - */ -export function reportStreamProgress( - readable: NodeJS.ReadableStream, - messagePrefix: string, - totalNumBytes?: number, - progress?: ProgressCallback, -) { - if (progress && totalNumBytes) { - let numBytesDownloaded = 0; - const bytesToDisplayMB = (numBytes: number): string => - `${(numBytes / (1024 * 1024)).toFixed(1)} MB`; - const updateProgress = () => { - progress({ - step: numBytesDownloaded, - maxStep: totalNumBytes, - message: `${messagePrefix} [${bytesToDisplayMB( - numBytesDownloaded, - )} of ${bytesToDisplayMB(totalNumBytes)}]`, - }); - }; - - // Display the progress straight away rather than waiting for the first chunk. - updateProgress(); - - readable.on("data", (data) => { - numBytesDownloaded += data.length; - updateProgress(); - }); - } else if (progress) { - progress({ - step: 1, - maxStep: 2, - message: `${messagePrefix} (Size unknown)`, - }); - } -} diff --git a/extensions/ql-vscode/src/contextual/locationFinder.ts b/extensions/ql-vscode/src/contextual/locationFinder.ts index 86af86211..317861613 100644 --- a/extensions/ql-vscode/src/contextual/locationFinder.ts +++ b/extensions/ql-vscode/src/contextual/locationFinder.ts @@ -11,7 +11,7 @@ import { import { CodeQLCliServer } from "../cli"; import { DatabaseManager, DatabaseItem } from "../local-databases"; import fileRangeFromURI from "./fileRangeFromURI"; -import { ProgressCallback } from "../commandRunner"; +import { ProgressCallback } from "../progress"; import { KeyType } from "./keyType"; import { qlpackOfDatabase, diff --git a/extensions/ql-vscode/src/contextual/queryResolver.ts b/extensions/ql-vscode/src/contextual/queryResolver.ts index 550d1b6b4..40cf87cc6 100644 --- a/extensions/ql-vscode/src/contextual/queryResolver.ts +++ b/extensions/ql-vscode/src/contextual/queryResolver.ts @@ -16,7 +16,7 @@ import { DatabaseItem } from "../local-databases"; import { extLogger } from "../common"; import { createInitialQueryInfo } from "../run-queries-shared"; import { CancellationToken, Uri } from "vscode"; -import { ProgressCallback } from "../commandRunner"; +import { ProgressCallback } from "../progress"; import { QueryRunner } from "../queryRunner"; import { redactableError } from "../pure/errors"; import { QLPACK_FILENAMES } from "../pure/ql"; diff --git a/extensions/ql-vscode/src/contextual/templateProvider.ts b/extensions/ql-vscode/src/contextual/templateProvider.ts index 4b53146d4..ddc23346c 100644 --- a/extensions/ql-vscode/src/contextual/templateProvider.ts +++ b/extensions/ql-vscode/src/contextual/templateProvider.ts @@ -18,7 +18,7 @@ import { import { CodeQLCliServer } from "../cli"; import { DatabaseManager } from "../local-databases"; import { CachedOperation } from "../helpers"; -import { ProgressCallback, withProgress } from "../commandRunner"; +import { ProgressCallback, withProgress } from "../progress"; import AstBuilder from "./astBuilder"; import { KeyType } from "./keyType"; import { diff --git a/extensions/ql-vscode/src/databaseFetcher.ts b/extensions/ql-vscode/src/databaseFetcher.ts index 1e31e7857..ac63fffbb 100644 --- a/extensions/ql-vscode/src/databaseFetcher.ts +++ b/extensions/ql-vscode/src/databaseFetcher.ts @@ -18,7 +18,7 @@ import { retry } from "@octokit/plugin-retry"; import { DatabaseManager, DatabaseItem } from "./local-databases"; import { showAndLogInformationMessage, tmpDir } from "./helpers"; -import { reportStreamProgress, ProgressCallback } from "./commandRunner"; +import { reportStreamProgress, ProgressCallback } from "./progress"; import { extLogger } from "./common"; import { getErrorMessage } from "./pure/helpers-pure"; import { diff --git a/extensions/ql-vscode/src/databases/ui/db-panel.ts b/extensions/ql-vscode/src/databases/ui/db-panel.ts index c2dec3897..7df235347 100644 --- a/extensions/ql-vscode/src/databases/ui/db-panel.ts +++ b/extensions/ql-vscode/src/databases/ui/db-panel.ts @@ -7,7 +7,7 @@ import { window, workspace, } from "vscode"; -import { UserCancellationException } from "../../commandRunner"; +import { UserCancellationException } from "../../progress"; import { getNwoFromGitHubUrl, isValidGitHubNwo, diff --git a/extensions/ql-vscode/src/distribution.ts b/extensions/ql-vscode/src/distribution.ts index 119c82244..017da698d 100644 --- a/extensions/ql-vscode/src/distribution.ts +++ b/extensions/ql-vscode/src/distribution.ts @@ -14,7 +14,7 @@ import { } from "./helpers"; import { extLogger } from "./common"; import { getCodeQlCliVersion } from "./cli-version"; -import { ProgressCallback, reportStreamProgress } from "./commandRunner"; +import { ProgressCallback, reportStreamProgress } from "./progress"; import { codeQlLauncherName, deprecatedCodeQlLauncherName, diff --git a/extensions/ql-vscode/src/extension.ts b/extensions/ql-vscode/src/extension.ts index ba78230be..6f4279fcd 100644 --- a/extensions/ql-vscode/src/extension.ts +++ b/extensions/ql-vscode/src/extension.ts @@ -89,12 +89,8 @@ import { QLTestAdapterFactory } from "./test-adapter"; import { TestUIService } from "./test-ui"; import { CompareView } from "./compare/compare-view"; import { initializeTelemetry } from "./telemetry"; -import { - commandRunner, - commandRunnerWithProgress, - ProgressCallback, - withProgress, -} from "./commandRunner"; +import { commandRunner, commandRunnerWithProgress } from "./commandRunner"; +import { ProgressCallback, withProgress } from "./progress"; import { CodeQlStatusBarHandler } from "./status-bar"; import { getPackagingCommands } from "./packaging"; import { HistoryItemLabelProvider } from "./query-history/history-item-label-provider"; diff --git a/extensions/ql-vscode/src/helpers.ts b/extensions/ql-vscode/src/helpers.ts index 512c77fcf..33f5abd45 100644 --- a/extensions/ql-vscode/src/helpers.ts +++ b/extensions/ql-vscode/src/helpers.ts @@ -19,7 +19,7 @@ import { commands, } from "vscode"; import { CodeQLCliServer, QlpacksInfo } from "./cli"; -import { UserCancellationException } from "./commandRunner"; +import { UserCancellationException } from "./progress"; import { extLogger, OutputChannelLogger } from "./common"; import { QueryMetadata } from "./pure/interface-types"; import { telemetryListener } from "./telemetry"; diff --git a/extensions/ql-vscode/src/legacy-query-server/legacyRunner.ts b/extensions/ql-vscode/src/legacy-query-server/legacyRunner.ts index 44eba17d9..f12434822 100644 --- a/extensions/ql-vscode/src/legacy-query-server/legacyRunner.ts +++ b/extensions/ql-vscode/src/legacy-query-server/legacyRunner.ts @@ -1,5 +1,5 @@ import { CancellationToken } from "vscode"; -import { ProgressCallback } from "../commandRunner"; +import { ProgressCallback } from "../progress"; import { DatabaseItem } from "../local-databases"; import { Dataset, diff --git a/extensions/ql-vscode/src/legacy-query-server/queryserver-client.ts b/extensions/ql-vscode/src/legacy-query-server/queryserver-client.ts index 3cec4d0e7..25e60db23 100644 --- a/extensions/ql-vscode/src/legacy-query-server/queryserver-client.ts +++ b/extensions/ql-vscode/src/legacy-query-server/queryserver-client.ts @@ -13,7 +13,7 @@ import { ProgressMessage, WithProgressId, } from "../pure/legacy-messages"; -import { ProgressCallback, ProgressTask } from "../commandRunner"; +import { ProgressCallback, ProgressTask } from "../progress"; import { ServerProcess } from "../json-rpc-server"; type WithProgressReporting = ( diff --git a/extensions/ql-vscode/src/legacy-query-server/run-queries.ts b/extensions/ql-vscode/src/legacy-query-server/run-queries.ts index a60f8da49..e2f3fb5f5 100644 --- a/extensions/ql-vscode/src/legacy-query-server/run-queries.ts +++ b/extensions/ql-vscode/src/legacy-query-server/run-queries.ts @@ -13,7 +13,7 @@ import { tryGetQueryMetadata, upgradesTmpDir, } from "../helpers"; -import { ProgressCallback } from "../commandRunner"; +import { ProgressCallback } from "../progress"; import { QueryMetadata } from "../pure/interface-types"; import { extLogger, Logger, TeeLogger } from "../common"; import * as messages from "../pure/legacy-messages"; diff --git a/extensions/ql-vscode/src/legacy-query-server/upgrades.ts b/extensions/ql-vscode/src/legacy-query-server/upgrades.ts index 0ec182766..6b70bf58b 100644 --- a/extensions/ql-vscode/src/legacy-query-server/upgrades.ts +++ b/extensions/ql-vscode/src/legacy-query-server/upgrades.ts @@ -4,7 +4,7 @@ import { showAndLogExceptionWithTelemetry, tmpDir, } from "../helpers"; -import { ProgressCallback, UserCancellationException } from "../commandRunner"; +import { ProgressCallback, UserCancellationException } from "../progress"; import { extLogger } from "../common"; import * as messages from "../pure/legacy-messages"; import * as qsClient from "./queryserver-client"; diff --git a/extensions/ql-vscode/src/local-databases-ui.ts b/extensions/ql-vscode/src/local-databases-ui.ts index c12081221..81bf64097 100644 --- a/extensions/ql-vscode/src/local-databases-ui.ts +++ b/extensions/ql-vscode/src/local-databases-ui.ts @@ -21,7 +21,7 @@ import { DatabaseItem, DatabaseManager, } from "./local-databases"; -import { ProgressCallback, withProgress } from "./commandRunner"; +import { ProgressCallback, withProgress } from "./progress"; import { isLikelyDatabaseRoot, isLikelyDbLanguageFolder, diff --git a/extensions/ql-vscode/src/local-databases.ts b/extensions/ql-vscode/src/local-databases.ts index 9542ef767..3d390b472 100644 --- a/extensions/ql-vscode/src/local-databases.ts +++ b/extensions/ql-vscode/src/local-databases.ts @@ -12,7 +12,7 @@ import { isFolderAlreadyInWorkspace, showBinaryChoiceDialog, } from "./helpers"; -import { ProgressCallback, withProgress } from "./commandRunner"; +import { ProgressCallback, withProgress } from "./progress"; import { zipArchiveScheme, encodeArchiveBasePath, diff --git a/extensions/ql-vscode/src/packaging.ts b/extensions/ql-vscode/src/packaging.ts index 3a543173e..64196d48c 100644 --- a/extensions/ql-vscode/src/packaging.ts +++ b/extensions/ql-vscode/src/packaging.ts @@ -9,7 +9,7 @@ import { ProgressCallback, UserCancellationException, withProgress, -} from "./commandRunner"; +} from "./progress"; import { extLogger } from "./common"; import { asError, getErrorStack } from "./pure/helpers-pure"; import { redactableError } from "./pure/errors"; diff --git a/extensions/ql-vscode/src/progress.ts b/extensions/ql-vscode/src/progress.ts new file mode 100644 index 000000000..45758e39f --- /dev/null +++ b/extensions/ql-vscode/src/progress.ts @@ -0,0 +1,128 @@ +import { + CancellationToken, + ProgressLocation, + ProgressOptions as VSCodeProgressOptions, + window as Window, +} from "vscode"; + +export class UserCancellationException extends Error { + /** + * @param message The error message + * @param silent If silent is true, then this exception will avoid showing a warning message to the user. + */ + constructor(message?: string, public readonly silent = false) { + super(message); + } +} + +export interface ProgressUpdate { + /** + * The current step + */ + step: number; + /** + * The maximum step. This *should* be constant for a single job. + */ + maxStep: number; + /** + * The current progress message + */ + message: string; +} + +export type ProgressCallback = (p: ProgressUpdate) => void; + +// Make certain properties within a type optional +type Optional = Pick, K> & Omit; + +export type ProgressOptions = Optional; + +/** + * A task that reports progress. + * + * @param progress a progress handler function. Call this + * function with a `ProgressUpdate` instance in order to + * denote some progress being achieved on this task. + * @param token a cancellation token + */ +export type ProgressTask = ( + progress: ProgressCallback, + token: CancellationToken, +) => Thenable; + +/** + * This mediates between the kind of progress callbacks we want to + * write (where we *set* current progress position and give + * `maxSteps`) and the kind vscode progress api expects us to write + * (which increment progress by a certain amount out of 100%). + */ +export function withProgress( + task: ProgressTask, + { + location = ProgressLocation.Notification, + title, + cancellable, + }: ProgressOptions = {}, +): Thenable { + let progressAchieved = 0; + return Window.withProgress( + { + location, + title, + cancellable, + }, + (progress, token) => { + return task((p) => { + const { message, step, maxStep } = p; + const increment = (100 * (step - progressAchieved)) / maxStep; + progressAchieved = step; + progress.report({ message, increment }); + }, token); + }, + ); +} + +/** + * Displays a progress monitor that indicates how much progess has been made + * reading from a stream. + * + * @param readable The stream to read progress from + * @param messagePrefix A prefix for displaying the message + * @param totalNumBytes Total number of bytes in this stream + * @param progress The progress callback used to set messages + */ +export function reportStreamProgress( + readable: NodeJS.ReadableStream, + messagePrefix: string, + totalNumBytes?: number, + progress?: ProgressCallback, +) { + if (progress && totalNumBytes) { + let numBytesDownloaded = 0; + const bytesToDisplayMB = (numBytes: number): string => + `${(numBytes / (1024 * 1024)).toFixed(1)} MB`; + const updateProgress = () => { + progress({ + step: numBytesDownloaded, + maxStep: totalNumBytes, + message: `${messagePrefix} [${bytesToDisplayMB( + numBytesDownloaded, + )} of ${bytesToDisplayMB(totalNumBytes)}]`, + }); + }; + + // Display the progress straight away rather than waiting for the first chunk. + updateProgress(); + + readable.on("data", (data) => { + numBytesDownloaded += data.length; + updateProgress(); + }); + } else if (progress) { + progress({ + step: 1, + maxStep: 2, + message: `${messagePrefix} (Size unknown)`, + }); + } +} diff --git a/extensions/ql-vscode/src/query-server/query-runner.ts b/extensions/ql-vscode/src/query-server/query-runner.ts index d80a07cbc..ebb90907b 100644 --- a/extensions/ql-vscode/src/query-server/query-runner.ts +++ b/extensions/ql-vscode/src/query-server/query-runner.ts @@ -1,5 +1,5 @@ import { CancellationToken } from "vscode"; -import { ProgressCallback, UserCancellationException } from "../commandRunner"; +import { ProgressCallback, UserCancellationException } from "../progress"; import { DatabaseItem } from "../local-databases"; import { clearCache, diff --git a/extensions/ql-vscode/src/query-server/queryserver-client.ts b/extensions/ql-vscode/src/query-server/queryserver-client.ts index 80bda904c..428526299 100644 --- a/extensions/ql-vscode/src/query-server/queryserver-client.ts +++ b/extensions/ql-vscode/src/query-server/queryserver-client.ts @@ -11,7 +11,7 @@ import { ProgressMessage, WithProgressId, } from "../pure/new-messages"; -import { ProgressCallback, ProgressTask } from "../commandRunner"; +import { ProgressCallback, ProgressTask } from "../progress"; import { ServerProcess } from "../json-rpc-server"; type ServerOpts = { diff --git a/extensions/ql-vscode/src/query-server/run-queries.ts b/extensions/ql-vscode/src/query-server/run-queries.ts index f63203d89..a08680cc4 100644 --- a/extensions/ql-vscode/src/query-server/run-queries.ts +++ b/extensions/ql-vscode/src/query-server/run-queries.ts @@ -1,7 +1,7 @@ import { join } from "path"; import { CancellationToken } from "vscode"; import * as cli from "../cli"; -import { ProgressCallback } from "../commandRunner"; +import { ProgressCallback } from "../progress"; import { DatabaseItem } from "../local-databases"; import { getOnDiskWorkspaceFolders, diff --git a/extensions/ql-vscode/src/queryRunner.ts b/extensions/ql-vscode/src/queryRunner.ts index a2e92ee66..0ef8058e5 100644 --- a/extensions/ql-vscode/src/queryRunner.ts +++ b/extensions/ql-vscode/src/queryRunner.ts @@ -1,6 +1,6 @@ import { CancellationToken } from "vscode"; import { CodeQLCliServer } from "./cli"; -import { ProgressCallback } from "./commandRunner"; +import { ProgressCallback } from "./progress"; import { DatabaseItem } from "./local-databases"; import { InitialQueryInfo, LocalQueryInfo } from "./query-results"; import { QueryWithResults } from "./run-queries-shared"; diff --git a/extensions/ql-vscode/src/quick-query.ts b/extensions/ql-vscode/src/quick-query.ts index ca0e0ae65..47c3ca3a9 100644 --- a/extensions/ql-vscode/src/quick-query.ts +++ b/extensions/ql-vscode/src/quick-query.ts @@ -11,7 +11,7 @@ import { getQlPackForDbscheme, showBinaryChoiceDialog, } from "./helpers"; -import { ProgressCallback, UserCancellationException } from "./commandRunner"; +import { ProgressCallback, UserCancellationException } from "./progress"; import { getErrorMessage } from "./pure/helpers-pure"; import { FALLBACK_QLPACK_FILENAME, getQlPackPath } from "./pure/ql"; import { App } from "./common/app"; diff --git a/extensions/ql-vscode/src/run-queries-shared.ts b/extensions/ql-vscode/src/run-queries-shared.ts index 4ee8588fb..da4b7e86c 100644 --- a/extensions/ql-vscode/src/run-queries-shared.ts +++ b/extensions/ql-vscode/src/run-queries-shared.ts @@ -12,7 +12,7 @@ import { window, } from "vscode"; import { isCanary, AUTOSAVE_SETTING } from "./config"; -import { UserCancellationException } from "./commandRunner"; +import { UserCancellationException } from "./progress"; import { pathExists, readFile, diff --git a/extensions/ql-vscode/src/telemetry.ts b/extensions/ql-vscode/src/telemetry.ts index 4c4cd79d2..6062cb345 100644 --- a/extensions/ql-vscode/src/telemetry.ts +++ b/extensions/ql-vscode/src/telemetry.ts @@ -16,7 +16,7 @@ import { } from "./config"; import * as appInsights from "applicationinsights"; import { extLogger } from "./common"; -import { UserCancellationException } from "./commandRunner"; +import { UserCancellationException } from "./progress"; import { showBinaryChoiceWithUrlDialog } from "./helpers"; import { RedactableError } from "./pure/errors"; diff --git a/extensions/ql-vscode/src/variant-analysis/export-results.ts b/extensions/ql-vscode/src/variant-analysis/export-results.ts index 472b914df..a866436b7 100644 --- a/extensions/ql-vscode/src/variant-analysis/export-results.ts +++ b/extensions/ql-vscode/src/variant-analysis/export-results.ts @@ -13,7 +13,7 @@ import { ProgressCallback, UserCancellationException, withProgress, -} from "../commandRunner"; +} from "../progress"; import { showInformationMessageWithAction } from "../helpers"; import { extLogger } from "../common"; import { createGist } from "./gh-api/gh-api-client"; diff --git a/extensions/ql-vscode/src/variant-analysis/repository-selection.ts b/extensions/ql-vscode/src/variant-analysis/repository-selection.ts index 59f0b7b7b..b8ddcdb51 100644 --- a/extensions/ql-vscode/src/variant-analysis/repository-selection.ts +++ b/extensions/ql-vscode/src/variant-analysis/repository-selection.ts @@ -1,4 +1,4 @@ -import { UserCancellationException } from "../commandRunner"; +import { UserCancellationException } from "../progress"; import { DbManager } from "../databases/db-manager"; import { DbItemKind } from "../databases/db-item"; diff --git a/extensions/ql-vscode/src/variant-analysis/run-remote-query.ts b/extensions/ql-vscode/src/variant-analysis/run-remote-query.ts index 2eb1d8a1b..6b9565a99 100644 --- a/extensions/ql-vscode/src/variant-analysis/run-remote-query.ts +++ b/extensions/ql-vscode/src/variant-analysis/run-remote-query.ts @@ -18,7 +18,7 @@ import { getRemoteControllerRepo, setRemoteControllerRepo, } from "../config"; -import { ProgressCallback, UserCancellationException } from "../commandRunner"; +import { ProgressCallback, UserCancellationException } from "../progress"; import { RequestError } from "@octokit/types/dist-types"; import { QueryMetadata } from "../pure/interface-types"; import { getErrorMessage, REPO_REGEX } from "../pure/helpers-pure"; diff --git a/extensions/ql-vscode/src/variant-analysis/variant-analysis-manager.ts b/extensions/ql-vscode/src/variant-analysis/variant-analysis-manager.ts index af4eea987..276a3af36 100644 --- a/extensions/ql-vscode/src/variant-analysis/variant-analysis-manager.ts +++ b/extensions/ql-vscode/src/variant-analysis/variant-analysis-manager.ts @@ -55,7 +55,7 @@ import { ProgressCallback, UserCancellationException, withProgress, -} from "../commandRunner"; +} from "../progress"; import { CodeQLCliServer } from "../cli"; import { defaultFilterSortState,