leanprover-community / leanprover-community/repl

[feature request] Option for pickling imported environment completely, not just diff from imports - so that they can be recovered fast in one command without re-doing the fully-fledged imports

Open
#95 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lean
Stars
228
Forks
69
Avg merge
15m
Merged PRs (30d)
4

Description

This is needed because Lean issues ~100K I/O syscalls when processing mathlib imports. This can stall the whole server, when there are a hundred of parallel REPL processes.

So being able to quickly pre-load the environment instead of waiting for import Mathlib would simplify a lot the operation of REPL servers.

In https://github.com/leanprover-community/repl?tab=readme-ov-file#pickling is written: we don't record full Environments, only the changes relative to imports. The other side of trade-off is also useful: large pickled files, but no need to process import Mathlib (and its I/O syscalls)

Contributor guide

No contributing guide indexed for this repository

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 with the README's pickling section, especially the note that only changes relative to imports are recorded. Define the full-environment pickling and recovery flow so a REPL server can restore an environment without reprocessing imports such as Mathlib; completion should include a usable one-command recovery path.

Written by the indexing model from the issue text.

Assessment

Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.