RFC: Don't shake deprecated modules
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Proposal
#13002 added a way to deprecate modules. Deprecated modules are likely meant to maintain the set of things they bring in to the env when imported in order to avoid breaking downstream code. I propose that the shake tool should be aware of whether a module is deprecated, and if so it should treat it similarly to --shake: keep-all. Shake should not remove an import from deprecated modules even if nothing in the module uses the imported declerations, or if no other file imports the deprecated module, in order to maintain backwards compatibility.
Community Feedback
See leanprover-community/mathlib4#34864
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
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 tracing the shake tool's handling of deprecated modules and the deprecation support added in #13002. Compare the proposal with the community feedback in mathlib4#34864; done means deprecated modules retain their imports and are treated like keep-all modules for backwards compatibility.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100