rake -P output is ambiguous with prereq namespaces
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- ruby
- Lĩnh vực
- build-system, cli
Hướng nghiên cứu
Bắt đầu từ điểm đầu vào của đầu ra rake -P/--prereqs và tái hiện Rakefile được nêu trong issue. Theo dõi cách các prerequisite có namespace được phân giải cho tool:run và tool:run2, sau đó xác minh rằng prerequisite được in ra cho cả hai đều có tên đầy đủ và không mơ hồ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When tasks are in a namespace, their pre-reqs "inherit" the namespace prefix.
Given the following rakefile:
task :setup do
puts "global setup, oops"
end
namespace :tool do
task :setup do
puts "setting up"
end
task run: :setup do
puts "running"
end
task run2: 'tool:setup' do
puts "running a second way"
end
end
The both tasks run and run2 have the same pre-req (setup). However, task run omits the namespace, while run2 is explicit with its pre-req's namespace. Both forms work as expected:
$ rake tool:run
setting up
running
$ rake tool:run2
setting up
running a second way
However, when the pre-req tree is printed, rake is not clear about what the pre-reqs' full names are.
$ rake -P
rake setup
rake tool:run
setup # <--- This is ambiguous!
rake tool:run2
tool:setup
rake tool:setup
The expectation is that rake -P prints the "fully resolved" pre-reqs and is thus clear about what task will actually be run. In the example above, it is not clear what tool:run's pre-req is. Is it the "global" setup, task as it appears in the -P output? Or is it in fact tool:setup because it is namespaced?
To be clear, rake's invocation behavior matches my expectations: tool:run invokes tool:setup, not setup. But this behavior is not evident in rake's --prereqs output.
- 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 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
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/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