pursuit icon indicating copy to clipboard operation
pursuit copied to clipboard

Searching for deprecated libraries should return something

Open shishini opened this issue 4 years ago • 3 comments

Referring to the purescript book issue 259

search for readFloat returns nothing, because Global is deprecated To be more specific searching

readFloat

which returns nothing and the searching for

readFloat()

(I added the brackets thinking, maybe search only work on functions if you add brackets) return a lot of irrelevant results

I think the search behavior should be more reasonable And it should not return nothing

I think ideally it should return the correct result but clearly flag it as deprecated

shishini avatar Dec 27 '20 03:12 shishini

Thanks for the report. This behaviour was implemented on purpose originally, because in practice a lot of things from deprecated packages won’t work unless you go back to a version of the compiler that basically nobody is using any more. However it’s true that this is not always ideal; we shouldn’t assume that everyone is on the latest version of everything. I think we should still penalise results from deprecated packages quite heavily in the search ranking, but I am inclined to agree that removing them entirely is a bit heavy-handed.

hdgarrood avatar Dec 27 '20 03:12 hdgarrood

Thanks for looking at this

If you still want to penalize deprecated modules in search May I suggest that the search result says something in the line

Your search for readFloat did not yield any results. Check deprecated modules list link to deprecated modules and functions list

Also is it normal that search for readFloat and readFloat() behave differently, or is it a bug, because this played a big role in increasing my confusion

shishini avatar Dec 27 '20 03:12 shishini

It is expected that those behave differently: if the query is a valid PureScript type then the search will contain values whose types most closely match the query. readFloat() can be parsed as an application of a type variable readFloat to the empty row type ().

hdgarrood avatar Dec 27 '20 04:12 hdgarrood