-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Summary
Investigate whether separating statements and session into sub-packages is worthwhile.
Challenge
Executemethods take*Sessiondirectly- Session has ~30+ methods, making a
SessionExecutorinterface unwieldy - Interface bloat risk may outweigh the organizational benefit
Possible approaches
- Interface approach: Define narrow
SessionExecutorinterface — risk of interface being too large - File naming convention: Keep in same package, use consistent file prefixes for logical grouping
- Partial extraction: Extract only statement types/definitions, keep execution in main package
Decision
This phase may not be necessary if file naming conventions provide sufficient organization. Evaluate after Phase 2-3 are complete.
Evaluation (post Phase 2-3)
Phase 2-3 completed:
internal/mycli/reduced from ~97 to 80 files- 5 sub-packages extracted:
decoder/,filesafety/,format/,metrics/,streamio/ sysvar/extraction abandoned — unexported struct fields inCustomVar/EnumVarused in ~20 struct literals invar_registry.gomake extraction impractical without exporting fields or adding constructors
Assessment
File naming conventions provide sufficient organization for now. The ~30+ methods on Session make interface extraction high-effort/low-value. Keeping this open as a future consideration if the package grows further or natural interface boundaries emerge.
Remaining extraction candidates (not blocking)
sysvar/— blocked by unexported field access pattern; could revisit ifvar_registry.gois refactored- Result struct decomposition — not urgent, could be done incrementally via embedded structs
Prerequisites
Parent: #495
Reactions are currently unavailable