Skip to content

Commit

Permalink
fix: use manifest packagesDir entry instead of lake-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuisi committed Nov 14, 2023
1 parent ddf645d commit ba5c660
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vscode-lean4/src/projectoperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class ProjectOperationProvider implements Disposable {
await this.tryFetchingCache(lakeRunner)

const localToolchainPath: string = join(activeClient.folderUri.fsPath, 'lean-toolchain')
const dependencyToolchainPath: string = join(activeClient.folderUri.fsPath, 'lake-packages', dependencyChoice.name, 'lean-toolchain')
const dependencyToolchainPath: string = join(activeClient.folderUri.fsPath, manifestResult.packagesDir, dependencyChoice.name, 'lean-toolchain')
const dependencyToolchainResult: string | 'DoNotUpdate' | 'Cancelled' = await this.determineDependencyToolchain(localToolchainPath, dependencyToolchainPath, dependencyChoice.name)
if (dependencyToolchainResult === 'Cancelled') {
return
Expand Down
4 changes: 3 additions & 1 deletion vscode-lean4/src/utils/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface DirectGitDependency {
}

export interface Manifest {
packagesDir: string
directGitDependencies: DirectGitDependency[]
}

Expand All @@ -23,6 +24,7 @@ export function parseAsManifest(jsonString: string): Manifest | undefined {
}

const schema = z.object({
packagesDir: z.string(),
packages: z.array(
z.union([
z.object({
Expand All @@ -45,7 +47,7 @@ export function parseAsManifest(jsonString: string): Manifest | undefined {
return undefined
}

const manifest: Manifest = { directGitDependencies: [] }
const manifest: Manifest = { packagesDir: result.data.packagesDir, directGitDependencies: [] }

for (const pkg of result.data.packages) {
if (!('git' in pkg)) {
Expand Down

0 comments on commit ba5c660

Please sign in to comment.