Rexml or Nokogiri?
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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 ...
- 主要语言
- Ruby
- 星标
- 174
- 派生
- 51
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mvidner/ruby-dbus 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
-
NetworkManager.Settings.Connection cannot round-trip, calling Update with what GetSettings returned未关闭
难度 4/5 3-5 天 新手友好度 35/100
-
good first issue
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 32/100
查看 mvidner/ruby-dbus 的全部 Issue
相似的 Issue
-
security
难度 2/5 1-3 小时 新手友好度 82/100
geeksforsocialchange/PlaceCal#3838 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
matteocrippa/awesome-swift#2028 ·
维护者通常 3 天内回复
-
Release workflow: a build provenance attestation for the gem with `actions/attest-build-provenance`未关闭area: devops area: security lane: strong-agent roadmap size: S type: task
难度 2/5 1-3 小时 新手友好度 75/100
arminazimi/slipway#712 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
fractaledmind/litestream-ruby#89 · 1 条评论 ·
维护者通常 1 天内回复