hackage-server icon indicating copy to clipboard operation
hackage-server copied to clipboard

Rank package search results by latest GHC supported

Open Bodigrim opened this issue 6 years ago • 4 comments

Is it possible to add "latest GHC supported" as a ranking factor?

Several times I had a very frustrating experience, when I clicked the first search result, assured myself that the package fits my requirements, spent some time learning API (and liked it!) - only to discover later that the latest supported GHC is roughly 7.10.

I do not know technical details: is it easy to extract "latest GHC supported" metric from Hackage Matrix? Maybe "upper base bound" may serve as a good approximation, if it is easier to access.

Bodigrim avatar May 18 '19 14:05 Bodigrim

The idea of having last upload date in the results (and being able to sort by it) is supposed to be a proxy for that. Does that not suffice?

That said, whether we rank by it or not, having an explicit representation of last base upper bound in the search results might be helpful.

gbaz avatar May 19 '19 17:05 gbaz

Does that not suffice?

Not really. It is quite possible that the package is small/simple enough to work with recent GHC without changes for a decade.

Also, last upload date does not reflect last revision date. Showing last revision date will be ambiguous as well: there are both revisions, relaxing base bounds (like, a maintainer checked that a package is compatible with a newer GHC), and revisions, which restrict them (like, a Hackage trustee noticed that a package is not compatible with a newer GHC and changed base < 5 to base < 4.13).

Bodigrim avatar May 19 '19 17:05 Bodigrim

is it easy to extract "latest GHC supported" metric from Hackage Matrix?

Fwiw, there's already a badge shown at each package, such as e.g.

the long-term plan for it is to have it express a build-plan quality/health metric (such as support for recent GHCs as well as not failing); we can encode various things into a graphic representation that fits into a badge

...and in principle we could make the search-result include such a badge for each result row

would that help?

That said, whether we rank by it or not, having an explicit representation of last base upper bound in the search results might be helpful.

Btw, for that to make sense we should filter out/ignore the meaningless base < 5 bounds which provide no information and thus would merely reduce the signal/noise ratio. And you need to be a bit smarter than merely look at the most recent release to infer the compat range (I have a few examples where this would break down completely and give the wrong impression)

hvr avatar May 20 '19 07:05 hvr

...and in principle we could make the search-result include such a badge for each result row would that help?

Certainly.

Bodigrim avatar May 20 '19 20:05 Bodigrim