Closed Bo98 closed 4 years ago
Moving some of the discussion here from Slack:
Part two of fixing the issue involves setting TERMINFO_DIRS
somewhere, and the question now is where - be it in brew
or by patching Ruby. This value to set TERMINFO_DIRS
to cannot be baked in at compile time - it must be evaluated at runtime, since it doesn't work well with relative paths.
Part two of fixing the issue involves setting
TERMINFO_DIRS
somewhere, and the question now is where - be it inbrew
or by patching Ruby. This value to setTERMINFO_DIRS
to cannot be baked in at compile time - it must be evaluated at runtime, since it doesn't work well with relative paths.
The suggestion I liked the most from Slack adding /usr/share/terminfo
to the search patch rather than bundling our of terminfo
files. I don't feel strongly, though. I think we need to have something merged by e.g. 5pm Scotland time today so this isn't blocking the release of the next Homebrew version.
Just to summarise the different options here:
Bundle terminfo
and set TERMINFO_DIRS
in brew
to <portable-ruby-dir>/share/terminfo
.
brew.sh
or locally to IRB
invokations (dev-cmd and debrew),portable-ncurses
look for another env like HOMEBREW_TERMINFO_DIRS
, which is a simple inreplace
, is a way to prevent that
Bundle terminfo
and set TERMINFO_DIRS
in portable-ruby
.
Bundle terminfo
and patch ncurses to determine the data directory dynamically.
Don't bundle terminfo
and pass a configure arg to ncurses to rely on a system installation.
brew
Docker image does not currently provide this./usr/share/terminfo
?
- Can be done either globally in
brew.sh
ruby.sh
might make more sense?
- Is there any concern about this affecting subprocesses?
I'd think this is fine 👍. We can also always unset at install
time if needed.
- This requires hacking the Ruby source.
- Where exactly?
On the timescale we're on I think this is a 👎
- Likely bulletproof, but is ultimately still a patch.
Gentle 👎 as requiring a patch.
Don't bundle
terminfo
and pass a configure arg to ncurses to rely on a system installation.
This is my preference.
I'd be happy with either "configure arg" or "modify Homebrew/brew" approaches. The latter may be easier to fix if we have any issues cropping up (rebuilding and revisioning portable-ruby
is not fun).
The latter may be easier to fix if we have any issues cropping up
Yeah, I think it's best to play it safe for now.
Works for me, thanks again @Bo98!
This is one step towards fixing
irb
on Linux not being able to handle left, right or backspace keys.