23 ms·
With namespacing you still run the risk of @namespace/requests -> @namsepace/requests typos. These may not be all that obvious. For example, the name of the po
by jeroenhd 3y ago
With namespacing you still run the risk of @namespace/requests -> @namsepace/requests typos.
These may not be all that obvious. For example, the name of the popular Rust HTTP client "reqwest" is an intentional typo. tokio vs tokyo can also be a less than obvious typo.
- Too 3y agoOn the other hand, this opens up for two potential places to typo. Both the name and the namespace. This happens often to me on GitHub, you keep browsing some code, only to later realize you are in someone’s personal fork of the official project. Especially when the original author isn’t a big organization, you only have two equally arbitrary usernames as namespaces to compare against.
- jeroenhd 3y agoIf the namespace is handled correctly, you won't accidentally download a malicious dependency if you get the namespace right. You'll get an error, but that's what you want for that kind of typo. The cryptic username problem is indeed a bother, but often popular projects will use readable names for their Github accounts. There's no real fix for that if you depend on a much smaller project. When you think you may be running that risk, you should probably wonder if it's a good idea to depend on a project made by someone small enough not to be instantly recognizable within your specific programming niche.