Rexml or Nokogiri?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with lib/dbus/xml.rb and spec/bus_and_xml_backend_spec.rb, especially the test case that switches to Nokogiri without restoring the backend. Run the affected specs and inspect the reported failures to establish the supported parser behavior; done means the parser configuration and dependency behavior are decided and the test suite is consistent with that decision.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
PR #87 introduced hard dependency on ReXML. However, the irony is that the Nokogiri is actually preferred and the whole test suite is executed against Nokogiri. On top of that, if Nokogiri is not available, there are ~170 test failures such as:
2) DBus::Service when a private bus is set up #exists? is true for an existing service
Failure/Error: @doc = Nokogiri.XML(xml)
NameError:
uninitialized constant DBus::IntrospectXMLParser::NokogiriParser::Nokogiri
# ./lib/dbus/xml.rb:81:in `initialize'
# ./lib/dbus/xml.rb:127:in `new'
# ./lib/dbus/xml.rb:127:in `parse'
# ./lib/dbus/proxy_object_factory.rb:33:in `introspect_into'
# ./lib/dbus/proxy_object.rb:80:in `introspect'
# ./spec/bus_driver_spec.rb:20:in `block (4 levels) in <top (required)>'
# ./spec/spec_helper.rb:119:in `with_service_by_activation'
# ./spec/bus_driver_spec.rb:11:in `block (4 levels) in <top (required)>'
# ./spec/spec_helper.rb:95:in `block (2 levels) in with_private_bus'
# ./spec/spec_helper.rb:66:in `with_env'
# ./spec/spec_helper.rb:94:in `block in with_private_bus'
# ./spec/spec_helper.rb:66:in `with_env'
# ./spec/spec_helper.rb:77:in `with_private_bus'
# ./spec/bus_driver_spec.rb:10:in `block (3 levels) in <top (required)>'
as soon as the BusAndXmlBackendTest tests introspection reading nokogiri test case is executed, because it sets the backend to Nokogiri without reseting it back to the original value:
I'd like to clarify this situation.
If both backends are really equal, then the two test cases should be probably merged into one, where the XML backend is defined by the available package set (or by some env variable) and the test suite should be run twice, once with Nokogiri and the other time with ReXML.
It also is suboptimal to always pull in ReXML gem, when Nokogiri is going to be used. Ideally, there should be no implicit dependency. Maybe the default behavior should be to just gracefully fail if there is no XML parser available. Or only one XML parser could be supported ...
- Ngôn ngữ chính
- Ruby
- Star
- 174
- Fork
- 50
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 mvidner/ruby-dbus
-
Specify rexml versioningĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
NetworkManager.Settings.Connection cannot round-trip, calling Update with what GetSettings returnedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
UNIX_FD in practice?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
Tất cả issue của mvidner/ruby-dbus
Issue tương tự
-
Add ZammadCó thể đã có người làm @Arslan-TR đã nhận hôm nay. Đang mởrequest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
endoflife-date/endoflife.date#11298 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
performance v/6
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
WITCodingClub/calendar-backend#689 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
rubys/roundhouse#571 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/web interface
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mastodon/mastodon#40924 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày