-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong indirect reverse dependencies for arithmoi #1234
Comments
Good eye. This has to do with how revdeps are calculated on hackage, which we could tune. Arguably we should have some constraint on which version of a package constitutes a "revdep" -- only the most current, perhaps? cc: @ysangkok |
Note that we already do have a more restrictive listing on https://hackage.haskell.org/package/arithmoi/reverse , where it explicitly filters the revdeps for whether they accept the latest version. |
How did we decide which page would show which, and also how do we provide a link to that second page? I'm not sure if I recall the discussions over the tradeoffs here... |
I don't think we had a discussion on this. If I remember correctly, the deps that don't accept a specific version are filtered out after getting the closure that is "too large". The reason that I chose to keep the package package unfiltered is probably because I thought that it would be better to minimize the processing done on the package page. I am not sure whether this choice makes sense, since I haven't actually benchmarked it. I wasn't focusing too much on the UI, since my main goal was to get the rev dep email notifications ready. As this issue report shows, it is confusing to people when the closure includes old rev deps. The reason it does this might be because a decision was made (before I got involved) to never delete the rev-dep edges. I never really questioned this. We should think about a new UI for this. I think some decent primitives are already in place. So we should be able to iterate on the UI without too much risk. I was wondering whether the "drill-down"[0] mode should really be the primary way of interaction, since I personally haven't used this much. Something that would be interesting to see, which we aren't exposing now, are the actual ranges used by the rev deps. That could easily fit in the table as it currently is. But the question again arises of how to pick a version to pull the range from. There are many edge cases, due to dependencies getting set conditionally and such. [0]: finding rev-deps, following a link, getting new rev-deps and repeating |
Anecdotally, I found the numbers given for reverse dependencies so wrong that they are at least useless spam if not harmfully misleading. For instance I was interested in the importance of https://hackage.haskell.org/package/unix-compat which is presented as:
Oh wow, I thought, this package is super important, the Haskell ecosystem will collapse impromptu if this package ever gets outdated. 4219 dependencies, this is more than what is captured by stackage (3000 packages). So, yes, this isn't useful information. How can we improve it?
P.S.: "drill-down" this is just good old depth-first graph search, is it? |
That is somewhat opinionated take. The IMHO, packdeps has useful info, e.g. https://packdeps.haskellers.com/reverse/unix-compat or https://packdeps.haskellers.com/reverse/arithmoi though it includes any usages IIRC (and doesn't list which components use stuff), not only in library components. |
I think that a first good step might be to
I won't work on this for a while though. When I get more free time in two weeks, I will start working more on Hackage, starting with the vouching feature. When I start on this feature, I plan on making mockups first. |
I have to agree with earlier comments: the current results are often really bad. I thought that acme-everything was also part of the problem? Or was that a wrong hunch? |
The main problem is just that all versions are mushed together, so if a library at one point had a dependency, it keeps having it forever. |
I find it hard to believe that even all package versions can account for the vast number of indirect dependents of many packages. But if you say so I have to believe it I guess, but some seem impossible to me. |
@juhp Please show me the concrete example, then we can determine whether it is the same issue, or whether there is a separate issue. It sounds like you're not referring to the arithmoi example. |
https://hackage.haskell.org/package/http2 [1] It is exactly the same problem as arithmoi I believe... I do feel that acme-everything (which has 7533 dependencies) should be filtered out of reverse dependency results anyway. If one looks on Stackage: only 2 dependents are listed: https://www.stackage.org/nightly-2024-05-04/package/http2-5.0.1/revdeps - just for comparison [1] I chose http2 because it is apparently the most frequently downloaded package currently, which I suppose it is a counterpoint or actually makes it a potentially bad example. |
But I guess it is not that simple or still a mystery to me anyway, I think we would need to look at specific examples to understand what is going on. I took the example of Biobase which I cannot easily see how it is related to http2. Anyway even just restricting to revdeps for latest version of a package or using reverse/ as Janus suggests would be a vast improvement: basically "anything" would be better than the status quo (it is also a bit annoying that it is not possible to link directly to the reverse deps pop-up). (For bonus points it could close with Escape - nice to dream 😃) |
Biobase -> PrimitiveArray -> DPUtils -> streaming-bytestring -> http-client note that streaming-bytestring only depended on http-client in the 1.0 version. |
Another example: https://hackage.haskell.org/package/gi-gtk (36 direct, 3592 indirect) 🔥 I guess one should write a tool at this point to understand the results. |
[Lots of stuff using the crypto ecosystem] -> [A Huge Crypto Ecosystem] -> crypto-api -> entropy -> jsaddle -> gi-webkit -> gi-gtk I agree its not so intuitive or easy to browse, but one can follow the links in the detail view to get there... In this case, the difference between the results on hackage and stackage is that |
And it does so transitively, I suppose. Since there are so many false positives, I consider the hackage dependency feature not helpful atm. Reverse dependencies within a single snapshot seems to me the more meaningful concept. The (minimum) quality assurance provided by Stackage is the reason why I slowly learned to embrace |
There is a large design space and a PR is welcome to tune what is displayed by default (as we calculate enough information to only consider most recent versions as well, for example). |
@andreasabel you might be interested to try https://github.com/Bodigrim/hackage-revdeps, it's roughly equivalent to what packdeps was doing. |
I basically also use stackage these days for this. Flora also has sane reverse deps info. I actually had a look at the Hackage code some days ago, trying to figure out how the implementation could be switched out, but I found it pretty hard to find what I was looking for. A simple useful workaround could be just to link to the other reverse dependencies page instead, but I wasn't able to find the relevant code for it. I still reckon acme-everything should be excluded too, though it probably wouldn't help as much as I thought. |
https://hackage.haskell.org/package/arithmoi-0.13.0.0 says "Reverse Dependencies | 22 direct, 7356 indirect". This does not look right, I'm pretty sure that a transitive closure is well below one hundred packages.
The text was updated successfully, but these errors were encountered: