{"id":5,"date":"2006-06-06T03:37:58","date_gmt":"2006-06-06T02:49:34","guid":{"rendered":""},"modified":"2017-03-07T20:23:48","modified_gmt":"2017-03-07T20:23:48","slug":"resolver_data_structures","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/sonnenschein\/2006\/06\/06\/resolver_data_structures\/","title":{"rendered":"Resolver data structures"},"content":{"rendered":"<p>So, initially I thought that the best way for the resolver to find the best path would be for each node in the depgraph, to instantiate a new &#8216;resolver&#8217; object. <\/p>\n<p>Now, I&#8217;m not so sure. I think the entire depgraph ought to be built using associative arrays. <\/p>\n<p>In other words, package A is\/contains a touple pointing to C and W (it&#8217;s dependencies) flagged as DEPS, and D and R flagged as REVDEPS. <\/p>\n<p>The reason why I was thinking the first idea was because (in my mind) it would&#8217;ve been easier to linearize. Brian&#8217;s code is not bad at that currently, so I&#8217;ve switched focus from trying to find the best install path, to simply building a graph data structure (which, it occurred to me, is a better idea anyway. The graph needs to be built before it can be examined\/scored \ud83d\ude09 )<\/p>\n<p>Now, that said, it should make revdeps with slotting easier too. A package that depends on foo can keep it&#8217;s dependency without being changed. We don&#8217;t need to rebuild the graph in that case if there aren&#8217;t version restrictions. It lets the node know that there are 2 versions of a package attached to it. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, initially I thought that the best way for the resolver to find the best path would be for each node in the depgraph, to instantiate a new &#8216;resolver&#8217; object. Now, I&#8217;m not so sure. I think the entire depgraph ought to be built using associative arrays. In other words, package A is\/contains a touple &hellip; <a href=\"https:\/\/blogs.gentoo.org\/sonnenschein\/2006\/06\/06\/resolver_data_structures\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Resolver data structures<\/span><\/a><\/p>\n","protected":false},"author":42,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,5],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/posts\/5"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":6,"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/posts\/5\/revisions\/6"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/sonnenschein\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}