refactor(cli): extract dispatch handlers - #1102
Closed
cedric013 wants to merge 2 commits into
Closed
Conversation
This was referenced Jul 20, 2026
yvgude
approved these changes
Jul 21, 2026
yvgude
left a comment
Owner
There was a problem hiding this comment.
Code Review: refactor(cli): extract dispatch handlers
Good architectural improvement — dispatch/mod.rs was overloaded and hard to navigate.
What it does:
- Extracts CLI command handlers from a monolithic
matchindispatch/mod.rsinto domain-specific handler functions - Introduces
core/runtime_flags.rsto replace directenv::set_var/env::varfor LEAN_CTX_RAW, LEAN_CTX_COMPRESS, etc. (addresses #1107) - 21 files touched, but net +333/-267 is modest — mostly moving existing code
Quality:
- Each handler becomes a self-contained function with clear responsibility
runtime_flagseliminates unsafeset_varcalls in multi-threaded context- No logic changes in the extracted handlers — pure structural refactoring
Suggestion: Consider splitting runtime_flags into its own commit for a cleaner git history — it is orthogonal to the dispatch extraction.
Note: Import fixes overlap with main. Please rebase.
LGTM after rebase.
4 tasks
Owner
|
Merged to main via CLI rebase+merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1103
Closes #1107
Summary
Validation