Weak guarantees for `IO#write` override
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/cli-ui
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
simp/pupmod-simp-stunnel#173 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TheOdinProject/curriculum#31444 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100