Skip to content
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

Searching for deprecated libraries should return something #429

Open
shishini opened this issue Dec 27, 2020 · 3 comments
Open

Searching for deprecated libraries should return something #429

shishini opened this issue Dec 27, 2020 · 3 comments

Comments

@shishini
Copy link

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

@hdgarrood
Copy link
Collaborator

hdgarrood commented Dec 27, 2020

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.

@shishini
Copy link
Author

shishini commented Dec 27, 2020

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

@hdgarrood
Copy link
Collaborator

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 ().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants