On 11/6/18 2:07 AM, 尤立宇 wrote:
Eli Schwartz <eschwartz@archlinux.org>:
Can you update doc/rpc.txt to describe the new version? Looks like the github wiki contains partial work towards this, but it's not in asciidoc format. Sure.
Eli Schwartz <eschwartz@archlinux.org>:
This is a WIP patch, and I'd like to get some feedback before moving on.
There are a few things worth noting: 1. commit 1ff40987 implemented search by depends, checkdepends, optdepends. They are currently left out.
This means we're in a funny situation where in order to get depfields searches we would need to still recommend the v5 interface. Could we implement this as well? If not, we should document it... Of course, v6 should absolutely support what is possible now in v5. The previous patch is more about asking if we can agree on the interface. I'll work on to bring the v6 patch up to date with the new rpc methods supported in v5.
Great! Because other than that, the new interface looks reasonable to me too, so I'd like to see this go forward as well.
Why is this pulling indexes from a map? It's only ever used once, and I don't think listing search qualifiers here really helps code clarity vs. a case statement. I'll fix it.
Moreso when we need to drop the special handling of finding NULL maintainers and don't do provides here because it doesn't fit into the architecture at all. I don't quite get it. Do you mean support for searching by NULL maintainers should be dropped?
Sorry, that may have been confusing. I mean that keeping everything in a map over here doesn't make sense when in order to properly handle searching for NULL maintainers and searching for provides, we (I think) need a switch later on anyway. This is in addition to my earlier point about my belief that the reading of the logic flow would benefit from making the different cases all appear in a switch rather than some being in an if statement and some being included via a map lookup. -- Eli Schwartz Bug Wrangler and Trusted User