Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Jan 10, 2025
1 parent 835bbd3 commit f30accf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 11 additions & 3 deletions vscode-lean4/src/diagnostics/setupDiagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,24 @@ export async function checkAll(

export async function checkLean4ProjectPreconditions(
channel: OutputChannel,
context: string,
folderUri: ExtUri,
): Promise<PreconditionCheckResult> {
const options: SetupNotificationOptions = {
errorMode: { mode: 'NonModal' },
warningMode: { modal: false, proceedByDefault: true },
}
const d = new SetupDiagnostics(options)
return await checkAll(
() => checkIsValidProjectFolder(channel, folderUri),
() => checkIsLeanVersionUpToDate(channel, folderUri, { modal: false }),
() => d.checkIsValidProjectFolder(channel, folderUri),
() => d.checkIsLeanVersionUpToDate(channel, context, folderUri, { toolchainUpdateMode: 'PromptAboutUpdate' }),
async () => {
if (!(await willUseLakeServer(folderUri))) {
return 'Fulfilled'
}
return await checkIsLakeInstalledCorrectly(channel, folderUri, {})
return await d.checkIsLakeInstalledCorrectly(channel, context, folderUri, {
toolchainUpdateMode: 'PromptAboutUpdate',
})
},
)
}
3 changes: 3 additions & 0 deletions vscode-lean4/src/utils/clientProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class LeanClientProvider implements Disposable {
outputChannel: OutputChannel,
private checkLean4ProjectPreconditions: (
channel: OutputChannel,
context: string,
folderUri: ExtUri,
) => Promise<PreconditionCheckResult>,
) {
Expand Down Expand Up @@ -115,6 +116,7 @@ export class LeanClientProvider implements Disposable {

const preconditionCheckResult = await this.checkLean4ProjectPreconditions(
this.outputChannel,
'Client Restart',
projectUri,
)
if (preconditionCheckResult !== 'Fatal') {
Expand Down Expand Up @@ -240,6 +242,7 @@ export class LeanClientProvider implements Disposable {

const preconditionCheckResult = await this.checkLean4ProjectPreconditions(
this.outputChannel,
'Client Startup',
folderUri,
)
if (preconditionCheckResult === 'Fatal') {
Expand Down

0 comments on commit f30accf

Please sign in to comment.