Rule dependencies' behaviour is strange, possibly broken or poorly documented
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ruby
- Lĩnh vực
- build-system
Hướng nghiên cứu
Tái hiện báo cáo từ Rakefile được cung cấp, trước tiên chạy rake, rake test.pre, rake test0.txt và rake test.txt, sau đó lặp lại sau khi chạm vào test.pre và test0.pre. Theo dõi quá trình Rake phân giải các phần phụ thuộc của rule và xử lý timestamp. Hoàn tất khi hành vi của phần phụ thuộc được sửa hoặc được ghi tài liệu rõ ràng, kèm theo phạm vi kiểm thử hồi quy cho cả hai trường hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Consider this Rakefile:
require 'rake/clean'
task default: :test
task test: 'test.txt'
file 'test.txt' => 'test0.txt'
rule '.txt' => '.pre' do |t|
sh 'cp', t.source, t.name
end
rule '.pre' do |t|
sh 'touch', t.name
end
CLEAN.include('*.pre')
CLOBBER.include('*.txt')
This Rakefile demonstrates 2 related issues.
The implicit dependency test.pre is not built automatically
In a folder containing only this Rakefile, try:
$ rake
touch test0.pre
cp test0.pre test0.txt
cp test.pre test.txt
cp: cannot stat 'test.pre': No such file or directory
rake aborted!
Command failed with status (1): [cp test.pre test.txt...]
[...]
This creates test0.pre and test0.txt, but fails to create test.pre and test.txt.
However, the following sequence of commands works without issues:
$ rake test.pre
touch test.pre
$ rake
touch test0.pre
cp test0.pre test0.txt
cp test.pre test.txt
Thus, rake knows how to build test.pre, but skips it unless asked explicitly.
Note that despite skipping test.pre, rake builds test0.pre automatically, while both are dependencies by the same rule.
In fact, starting from a folder containing only this Rakefile,
rake test0.txtworks,rake test.txtfails.
Updating test.pre does not trigger rebuilding of test.txt
Assume that everything has been built with
$ rake test.pre
$ rake
Now, try this:
$ touch test.pre
$ rake
Nothing happens.
Now, try:
$ touch test0.pre
$ rake
cp test0.pre test0.txt
cp test.pre test.txt
This triggers rebuilding.
Rake version
rake version: 13.0.6.
- Ngôn ngữ chính
- Ruby
- Star
- 2.5k
- Fork
- 650
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ruby/rake
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 45/100
-
Task Options in Command-Line Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
バグ
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Version bump for OpenVox 9 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
voxpupuli/puppet-epel#186 · 1 bình luận ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) Đang mởBug Frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100