Open shishini opened 3 years ago
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.
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
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 ()
.
Referring to the purescript book issue 259
search for readFloat returns nothing, because
Global
is deprecated To be more specific searchingwhich returns nothing and the searching for
(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