leanprover-community / leanprover-community/mathlib4

Should LAKEPACKAGESDIR respect packagesDir in lakefile.toml?

Open
#25,657 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lean
Stars
4.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Lines 81-82 of Cache/IO.lean say def LAKEPACKAGESDIR : FilePath :=".lake" / "packages". If I understand correctly (and it is very possible that I do not) this behaviour is incorrect: the value of LAKEPACKAGESDIR should respect the option packagesDir which can be set in lakefile.toml.

In more detail, line 142 of Cache/IO.lean is proofWidgetsBuildDir := LAKEPACKAGESDIR / "proofwidgets" / ".lake" / "build"}. Line 226 of Cache/Requests.lean is getProofWidgets (← read).proofWidgetsBuildDir. At line 211 of Cache/Requests.lean, in the function getProofWidgets I get an exception, because the expected directory does not exist: it is in the place specified by my packagesDir option, which is not .lake/packages relative to the top directory of my package. (This is because I want to keep mathlib outside of my Google Drive.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the definitions around lines 81-82 and 142 of Cache/IO.lean, then trace getProofWidgets in Cache/Requests.lean around lines 211 and 226. Confirm how packagesDir from lakefile.toml is represented and used; done means proofWidgetsBuildDir points into the configured packages directory and the proof widgets lookup succeeds there.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.