Request: An alternate FileTask that checks whether the file was made
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- ruby
- 領域
- build-system
調査の方向性
まず、既存の Rake::FileTask の動作と、issue で参照されている Rake::DSL task definitions を読んでください。例外が発生しない場合に task action がどのように実行されるかを確認し、続いて、名前の対象となるファイルがまだ存在しない場合に新しい task type が失敗する必要があることを、提供された required_file example を完了条件の確認に使って確認してください。
索引モデルが issue の本文から書いたものです。
説明
I think the current implementation of the file task makes perfect sense: just trigger a series of actions based on a file's status, in case you don't necessarily want to actually produce that file.
However, in cases where you do want to produce that file, it would be nice to have a separate task type that supports that, i.e. fails if the task actions don't produce the file even when there are no exceptions thrown.
Example:
class Rake::RequiredFileTask < Rake::FileTask
def execute(*args)
super(*args)
File.exists?(name) or raise "File #{name} was not created successfully"
end
end
module Rake::DSL
def required_file(*args, &block) # :doc:
Rake::RequiredFileTask.define_task(*args, &block)
end
end
Then, if invoked as:
required_file 'a.out' do |t|
# do nothing
end
an error would be thrown:
rake aborted!
File a.out was not created successfully
- 主要言語
- 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