leanprover-community / leanprover-community/mathlib4
Should LAKEPACKAGESDIR respect packagesDir in lakefile.toml?
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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