Earlier quoted context omitted.
Seems like it would be better to contain: compile_error!("You meant to …"); so that the install would fail and `cargo uninstall rg` wouldn't be needed.
Can always-failing-to-compile crates be deployed to the registry?
“You meant to install ripgrep”
31–40 of 165 posts
Re: “You meant to install ripgrep”
#32Huh - the same author also has https://crates.io/crates/memap and memap2, which explicitly say that they're "squatting to prevent a malicious typo package". Not sure how to feel about this... on an individual-package level, it seems a sensible enough idea, but if it becomes a widespread practice, the namespace could get really cluttered.
Re: “You meant to install ripgrep”
#33Earlier quoted context omitted.
Seems like it would be better to contain: compile_error!("You meant to …"); so that the install would fail and `cargo uninstall rg` wouldn't be needed.
Can always-failing-to-compile crates be deployed to the registry?
Re: “You meant to install ripgrep”
#34Hah! TIL. I had no idea someone did this. But it's smart. I should have thought of it! (I'm the author of ripgrep.)
Would you consider taking the "rg" package and redirecting people to ripgrep? I mean, asking the current owner to kindly donate it to you.
EDIT: Found their email via git. Always forget about that one.
Re: “You meant to install ripgrep”
#35Huh - the same author also has https://crates.io/crates/memap and memap2, which explicitly say that they're "squatting to prevent a malicious typo package". Not sure how to feel about this... on an individual-package level, it seems a sensible enough idea, but if it becomes a widespread practice, the namespace could get really cluttered.
I guess "owner/packagename" convention could solve such issues as it's common with other package ecosystems.
Re: “You meant to install ripgrep”
#36Huh - the same author also has https://crates.io/crates/memap and memap2, which explicitly say that they're "squatting to prevent a malicious typo package". Not sure how to feel about this... on an individual-package level, it seems a sensible enough idea, but if it becomes a widespread practice, the namespace could get really cluttered.
I guess "owner/packagename" convention could solve such issues as it's common with other package ecosystems.
Namespaces are a solution or mitigation to some problem, but that problem is not malicious typo-squatting.
Re: “You meant to install ripgrep”
#37Huh - the same author also has https://crates.io/crates/memap and memap2, which explicitly say that they're "squatting to prevent a malicious typo package". Not sure how to feel about this... on an individual-package level, it seems a sensible enough idea, but if it becomes a widespread practice, the namespace could get really cluttered.
Re: “You meant to install ripgrep”
#38Hah! TIL. I had no idea someone did this. But it's smart. I should have thought of it! (I'm the author of ripgrep.)
Re: “You meant to install ripgrep”
#39That way "ripgrep" could include "rg", searching cargo for "rg" brings back "ripgrep", not a second package named "rg", and an install could tell the user the correct name for any attempt to install it.
This also covers typo-squats, so there would be no need for packages like "memap".
Obviously this represents a low-effort vector for massive squatting, so maintainers would need to be responsible for preventing that, and could add some typos themselves, being the ones which see the request for the mis-typed packages.
Re: “You meant to install ripgrep”
#40Earlier quoted context omitted.
You should not have done this unless you want to further normalize the practice of namespace squatting. This is the same type of behavior leads to domain squatting. While arguably being slightly more benign in the sense of hedging against typosquatting, if everyone started going things like that, we'd quickly begin to run into namespace exhaustion problems as people started ballooning their package namespace footprin…
I'd like to note there are three perverse incentives that lead to abuses of public namespaces (that I am aware of - please tell me if I've missed any): 1.) The use of names as a speculative financial instrument (in all shades of grey, up to and including extortion for lapsed or stolen names) 2.) The use of names as vectors of attack, such as by exploiting typos or homographs (such as malicious packages) 3.) The reser…
I think it's more accurate to say that they consider dealing with this out of scope. "I want this name that has been unused since it was added as a placeholder package 7 years ago" is not something that the human moderation will help you with. The extent of human moderation on crates.io is basically "This is malicious or illegal and was reported to us and we looked and agreed so removed it"