How to approach adding logging timestamps
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- ruby
- 領域
- build-system, cli
調査の方向性
まず、Rake のコードベース全体と Rakefiles における出力処理を確認します。特に、Kernel.puts の直接使用と、STDOUT/STDERR をラップする提案アプローチを確認してください。オプトインのタイムスタンプ機能によってライブラリの動作を維持できるかを判断します。実装前に、実現可能な設計と明確なスコープについて合意できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello,
our customer would like to have optional timestamps for rake output and I would like to contribute this feature if this is feasible. I did some research and it looks like both Rake codebase and Rakefiles use "Kernel.puts" directly. So I have two ideas I would like to discuss before I do any coding:
-
Hacky approach: create STDOUT/STDERR wrappers and change
$stdoutand$stderrglobal variables to these instances. They would add timestamps when configured. Pros: Safe for the future changes because nothing is changing in the codebase. Cons: When Rake is used as a library, changing standard output and error would introduce regressions and problems after upgrade. -
Clean but disturbing approach: search and replace
putsin the codebase and create a DSL methodputsfor use in Rakefiles. This looks cleaner, but developers are already used toputsin the codebase. Everytime new line withputsis added, the output will appear in the output without timestamp. Since this feature would be opt-in, devs will start adding these types kinds of errors pretty soon.
Honestly, I am not sure if I can deliver this feature to my customer but let's discuss and see what you guys think about this. Cheers!
- 主要言語
- Ruby
- スター
- 2.5k
- フォーク
- 650
- 平均マージ
- 6分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/rake のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
似ている issue
-
SyncEm always forwards a dummy block, so wrapped methods lose their no-block/Enumerator behavior オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
endoflife-date/endoflife.date#11086 ·
-
internal
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Kong/developer.konghq.com#7322 ·
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100