Skip to content

Fix the undeclared rainbow require in the deprecations executable - #197

Merged
JuanVqz merged 2 commits into
mainfrom
fix/deprecations-undeclared-rainbow
Aug 3, 2026
Merged

Fix the undeclared rainbow require in the deprecations executable#197
JuanVqz merged 2 commits into
mainfrom
fix/deprecations-undeclared-rainbow

Conversation

@JuanVqz

@JuanVqz JuanVqz commented Aug 3, 2026

Copy link
Copy Markdown
Member

Problem

exe/deprecations requires rainbow, which the gemspec never declares as a runtime dependency. v1.6.0 dropped that dependency in favor of the native NextRails::Tint wrapper (#183), but only for lib/; the executable kept its require "rainbow".

On a clean install the shipped executable raises LoadError and no mode works at all. It only appears to work where rainbow happens to be installed for some other reason, which is why it went unnoticed.

Fix

Switch the CLI to NextRails::Tint, the dependency-free ANSI wrapper already used throughout lib/, and add the underline code (4) it was missing, since the CLI headlines use it.

Verification

$ ruby -e '$LOAD_PATH.reject! { |p| p.include?("rainbow") }; load "exe/deprecations"' info --help
Usage: exe/deprecations [options] [mode]
...

With rainbow removed from the load path the CLI now loads and runs; before this change it aborted with LoadError.

JuanVqz added 2 commits August 3, 2026 09:53
exe/deprecations required rainbow, which the gemspec never declares as a
runtime dependency, so the shipped executable raised LoadError on a clean
install and only worked where rainbow happened to be present for another
reason. v1.6.0 dropped the dependency for lib/ but the executable kept
requiring it.

The gem already has a dependency-free ANSI wrapper used throughout lib/. Add
the underline style it was missing and switch the CLI to it.
@JuanVqz
JuanVqz merged commit f85d041 into main Aug 3, 2026
11 checks passed
@JuanVqz
JuanVqz deleted the fix/deprecations-undeclared-rainbow branch August 3, 2026 15:58
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.

1 participant