Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Weak guarantees for `IO#write` override

Open
#434 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
cli

Research direction

Start with lib/cli/ui/stdout_router.rb around lines 402-410, then inspect the ActiveSupport stream capture code linked in the issue and the referenced TruffleRuby pull request. Reproduce how IO#reopen affects the STDOUT and STDERR write overrides on CRuby and TruffleRuby; done means the intended cli-ui behavior remains reliable after reopen.

Written by the indexing model from the issue text.

Description

During CI bug investigation we noticed this code: https://github.com/Shopify/cli-ui/blob/f6294ff1864dc3279fa7ca08ec79d17b338fe1f5/lib/cli/ui/stdout_router.rb#L402-L410 overriding IO#write for STDOUT and STDERR. This is quietly disabled by any call on IO#reopen, for example: a test calling #capture from https://github.com/rails/rails/blob/0e99d0893b0e98c626a3c7d8972eea22d29c9d25/activesupport/lib/active_support/testing/stream.rb#L23-L38

If the goal of the cli-ui code to be permanent, it needs adjustments. This is true for CRuby and TruffleRuby engines.

More details: https://github.com/oracle/truffleruby/pull/3088

Dominant language
Ruby
Stars
1.1k
Forks
57
Avg merge
2h 55m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/cli-ui

All issues in Shopify/cli-ui

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.