-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
x/pkgsite: proposal for search filters: language features and possible compatibility issues #39195
Comments
I dont think we should shame people for using reflect/unsafe. If we'd rank packages by reflect encoding/json and encoding/gob would be all the way at the bottom, it is the nature of a language without first class code generation support has a high reflect usage in these packages. |
@JAicewizard I'm surprised you could read anything regarding "shaming people" from the proposal, I never intended to shame anybody. Sorry if you understood it like that. Please consider searching on google.com for this: Results exclude all pages related to programming. The results include anything else related languages. #39195 is about a similar functionality. Could you please help rephrase the proposal to exclude anything related shaming people? |
Let's please take a step back and remember that the Gopher Code of Conduct (https://golang.org/conduct) asks us to be respectful and charitable in discussions. We all want Go, and pkg.go.dev, to be as useful as possible. Thanks. |
@fgergo I didn't mean the intend is to shame people, but adding a metric that is not relevant will encourage, in one way or another, shaming. Nobody might say this out-loud, but things like "ew that package uses a lot reflect" will pop up into someones head. Nobody should pick one package over another just because one has a bit more unsafe than the other, as long as the API don't expose anything that is wrong. Places where people DO start measuring things like unsafe as a measure of quality, like the rust community, people WILL get shamed for using unsafe/reflect, like what happened to actix-web. Other actual relevant things, like cgo, 32/64 bit incompatibility, OS compatibility etc should IMO be displayed/filtered on, they are things that should 100% influence your decision of one package over another, but reflect/unsafe don't belong in that list. Sorry if it felt like a personal attack, it was not meant that way. We should try and avoid actix-web in go, and exposing stats about irrelevant, but possibly with negative reputation, is a step towards an actix-web situation. |
@ianlancetaylor I think my point is clear, and I hope my intend it to avoid a toxic community, not encourage it, is also somewhat clear. I think we shouldn't continue to discuss my exact words, I hope my point is clear, sorry if I went a bit far in trying to make it clear. Again sorry if it felt like I was being disrespectfull to @fgergo. |
I think we do want to discourage use of If there are two packages that do the same thing, everything else being equal I would choose the one that didn't use |
Yes, but things will never be equal, otherwise the unsafe package wouldn't exist. edit: |
Sure, that would be a good signal also. Probably a better signal. But we don't have to choose just one.
If I'm looking for a package which is performance-critical, I would absolutely consider |
I think the intend is to avoid buggy code, and amount of unsafe usage is not a good way to detect buggy code. Another better metric would be how populair it is or how well maintained it is, something that is very badly maintained should be avoided because a bug is unlikely to be resolved, while a good maintained popular package is likely to be very robust. Putting a direct metric on unsafe/reflect usage will at some point create a actix-web situation, I think we should try and avoid that at all cost and that was my initial reason for not wanting this feature. |
A few meta-notes: Maybe since I'd partly socialized on c.o.l.a in the end of the 90s, I still don't see how anything @JAicewizard wrote would be personal or disrespectful. Rereading everything I wrote above I am still not sure a github issue comment thread is the best place to have this conversation. Should I just delete this comment? On the technical merit of #39195: I am proposing something like this: when I type this in the search box: If somebody is not interested on any specific package usage, they just won't use this feature of search. |
Although I definitely still don't agree, having something to filter out any package for me doesn't sound anywhere near as bad as singling out just unsafe/reflect. @fgergo I don't see what would have been insulting, but Ian posted the coc so I felth like maybe it could be seen that way by someone else. Sorry i had to edit this, I'm on my phone now and accidentally pressed the comment button |
Edit2: |
An indicator showing if a module or one of its dependencies uses Cgo would be really helpful. It doesn't even have to be a search filter. Maybe under "Details" on the right. |
#23172 will help. |
A couple of search filters I would use:
|
What is the URL of the page with the issue?
https://pkg.go.dev/
Proposal(?) to add search filter functionality to include/exclude features when searching for packages, modules.
Usefulness in descending order (for me at least):
Most probably these are only really useful if search filters are applicable to all dependencies transitively as well (except for the standard library of course).
for reference:
https://groups.google.com/forum/#!topic/golang-dev/U27D-g9j0LA
The text was updated successfully, but these errors were encountered: