Hacker News new | ask | show | jobs
by worewood 1339 days ago
Why not just add ripgrep as a dependency, effectively making it an alias of the original package?
5 comments

I wouldn't sign off on this personally. It makes auditing harder. You see `cargo install rg` somewhere, but you also see that `cargo install ripgrep` is what's listed in ripgrep's README. So now you wonder, is `cargo install rg` correct? Then maybe ripgrep has to add a note about this to the README, and maybe you see it, maybe you don't.

Better to just make `cargo install rg` fail so that it never worked in the first place. `cargo install ripgrep` is also more self-describing and gives you a better search engine query.

Maybe it's only for me, but I've never liked this of too-smart solutions.

Let people do the mistakes once and learn the correct package name, instead of relying on a hack and potentially introduce confusion later.

Not to mention adding a juicy target for malicious shenanigans.
Would this install the binaries of the dependency to your $PATH? I would expect that only the top-level package would be "installed" that way.
This would work, but I think hiding a package behind an alias is never a good idea.
Nah KISS