Method needed to get rake command line options for spawning new rake job
まだ誰も着手していません。
評価
調査の方向性
Rake.application から始め、handle_options と standard_rake_options のエントリポイントをたどって、コマンドラインオプションがどのように解析され保持されるかを確認します。トップレベルの Rakefile がサブディレクトリでジョブを起動するときに、解析済みの値をどのように読み取れるかを確認します。解析済みのオプションが、呼び出し側でオプション解析を重複して実装することなく、公開された application 属性を通じて利用できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I am implementing a "top level" Rakefile that will spawn off rake jobs in sub-directories.
This is not hard to do, except that I want to pass the same options to the jobs that was passed to the original rake command. I cannot find a way to reliably find out what those options were without using some quasi private methods such as handle_options in the application object. I do not want the targets, just the options.
Could we add code to handle_options to put the options that are parsed into an array that is a public attribute of the application object?
Then I could grab the rake options by a simple use of something like:
Rake.application.rake_options
If there is some way to easily do this that I am missing please let me know. I originally was just iterating over the ARGV entries and grabbing things out of it, but quickly realized that the command line options may or may not have an argument following a "-" prefixed option and there is no way I can know that without duplicating all the code in standard_rake_options.
Thanks.
- 主要言語
- 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