leanprover-community / leanprover-community/lean

exceptions when saving oleans are not user-visible

Open
#750 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
434
Forks
79
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.
Description

The olean compilation process emits user-friendly messages for several failure scenarios, such as https://github.com/leanprover-community/lean/blob/v3.45.0/src/library/module_mgr.cpp#L128. However, the failure is not notified to the user. This includes heartbeat exception reporting, as in #749.

Steps to Reproduce
  1. Create an empty olean and remove write permissions
  2. Use lean --make to compile something that would overwrite the above file

Expected behavior: Non-zero exit code and a message

Actual behavior: No reported error

Reproduces how often: 100%

Versions

Lean (version 3.45.0, commit 22b09be35ef6, Release)

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 with the olean failure handling in src/library/module_mgr.cpp at the linked location, then reproduce the issue by making an olean unwritable and running lean --make. Done means the failure, including heartbeat exceptions, produces a user-visible message and a non-zero exit code.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.