leanprover / leanprover/lean4

RFC: lake should give a warning if a project is called `test`

Open
#13,227 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-medium RFC
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Proposal

Lake should warn, with an overridable warning, when a new project is given a problematic name such as Test. We recently saw a fresh project depending on mathlib fail to compile because Lean resolved Test.Basic to Plausible.Test.Basic. A warning at project creation time, or at least a clearer error message, would make this much easier to understand and avoid.

More generally, lake could check if the name of the project is already "taken" by a dependency (for example if a project depending on mathlib is called batteries).

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 examining lake's project-creation flow and reproduce the naming collision described with mathlib and Plausible.Test.Basic. Determine whether the intended scope is an overridable warning for names taken by dependencies, or a clearer resolution error. Done means the chosen behavior covers the Test example and the broader dependency-name case.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.