Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lean): minimize imports in Base/Arith #328

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RaitoBezarius
Copy link
Contributor

This is a methodology employed by the Mathlib community to improve the build performance of Mathlib.

The idea is to exploit the ImportGraph library which has a command #min_imports and #redundant_imports to figure out what imports to trim down.

See: https://reservoir.lean-lang.org/@leanprover-community/importGraph for the docs.

This is the result of this process for Base/Arith.

@sonmarcho If you are happy with the idea, I can minimize the rest of the library. This will be helpful with the documentation PR to minimize the build times as well (as we won't build unnecessary Mathlib modules in Nix).

This is a methodology employed by the Mathlib community to improve the
build performance of Mathlib.

The idea is to exploit the ImportGraph library which has a command
`#min_imports` and `#redundant_imports` to figure out what imports to
trim down.

See: https://reservoir.lean-lang.org/@leanprover-community/importGraph
for the docs.

This is the result of this process for `Base/Arith`.

Signed-off-by: Ryan Lahfa <[email protected]>
@sonmarcho
Copy link
Member

I think this is a great idea! You don't have to do this for the whole library, but it would be good to document this somewhere, perhaps in the README or in a CONTRIBUTING.md file ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants