Skip to content

Extract Guard::UI into a separate gem #713

@e2

Description

@e2

TL;DR - UI functionality should be in a separate gem to solve many problems

Basically to decouple the functionality from Guard, because it's a maintenance nightmare:

  • reliance on global state
  • dependency on other Guard:: modules (even though it's just for outputting in color)
  • mixing up logging with screen output
  • hard to refactor without breaking compatibility
  • hard to test because of global state / singleton
  • color handling is not transparent
  • too many responsibilities in one class (logging, option handling, coloring, line reset, deprecations, screen clearing, scope name, backtrace filtering, requiring win32console) while none are actually Guard-specific
  • options exposed as a hash makes little sense (logger options during init) and just makes the interface confusing

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions