r/rust•
Xtremegamor

Cargo crate name reservation spam

Recently I was going through crates.io recents to see if there were any libraries that caught my eye as something I could use to write something cool. I noticed that there was a large number of crates created at the exact same time, with the exact same description, all with version 0.0.0 and a message "WIP. Contact me if you want to use this name!". Here's a screenshot of this.

the user who's reserved all of these names is https://crates.io/users/swmon. I went through his profile and it seems as though every one of his crates on the 11 pages of his profile is just a "reserved name", bar one or two. I find it very hard to believe that one person could have so many "work in progress" projects that would require names as broad as "while", "youtube", "thef***", etc.

Can these crates be removed to free up the names, and perhaps consequences imposed on people who mass reserve common names they're never going to use like this?

Posted Aug 25, 2018, 9:25 PM UTC

309154
Meyermagic•

I know it's too late unless we introduce a "legacy" namespace, but I wish Cargo had gone with namespaced packages, with a reserved / curated top-level namespace, taking the place of rust-lang-nursery and augmented with well-recognized and supported community projects. There could even be a formal auditing process for these packages, code / documentation / licensing standards, etc.

The top-level packages would be the first place a new user would look for things, and the namespaces would make it easy for users to find packages related to a specific project, while the presence of namespaces would make clear to the user "there are no guarantees for this package".

163
epic_pork•

Finding original names for projects is a pain in the ass. Let it be namespaced using the github username/org.

40
dnkndnts•

lol, the entire community was saying this before crates.io launched and the Rust team was about as responsive to their pleas as the Wailing Wall.

So yeah, this has been discussed extensively, but ultimately he who controls the infrastructure makes the rules, and the infrastructure is not controlled by the community.

33
fgilcherrust-community · rustfest•

I have to oppose this view heavily. There were equally large chunks of the community who were fine with this decision or wanted to have it that way.

You can join the crates and infra team by the way.

(Also, for context, I wasn't part of the project back then)

3†
dnkndnts•

There were equally large chunks of the community who were fine with this decision or wanted to have it that way.

The consensus seems clear to me.

9
Elession•

Are you fine with a bot registering all of 4 and 5 letters crate names then? Not against the policy.

1
Ran4•

That would be really annoying.

Have a single, simple to remember name is very valuable.

9
ahayd•

It is valuable, which is why it shouldn't be given away for free (without vetting/review etc).

20
Schmeckinger•

How about you namespace it and if you earn it you get a namespaceless alias.

7
DHermit•

I don't like this idea as it would force you to use Github. I don't have anything against Github right now and use it, but being dependent on another organization is nothing I like.

6
mtsr•

Who’s going to write the RFC for this?

3
kixunil•

Then it might be hard to remember the author of the crate. With typosquatting, it looks like a recipe for disaster.

On the other hand, if there were few high-quality organizations and one remembered their names, it could solve the discoverability problem as well.

3†
burkadurka•

Why is it harder to remember an author's name than a "creative" crate name? The goal of flat-namespacing was explicitly stated to be encouraging people to come up with random names like "nokogiri". Maybe that hasn't happened so much yet on crates.io, but we do have stuff like a crate named "reqwest" solely because "request" and "requests" were taken.

8
kixunil•

Good question. I'd guess that remembering short creative name is easier than remembering nick of a person (likely based on foreign name) + (possibly creative) name.

As an experiment, here are crates and authors I remember (I don't check whether they are correct, not spelling of the names, so you can see how many mistakes I do):

  • serde_json by dtolnay
  • I think serde is by dtolnay too, but I'm unsure
  • futures by alexcrichton
  • toml by alexcrichton
  • mio by carllerche
  • bytes by carllerche
  • ripgrep by burntsushi - but that one isn't a library
  • csv by burntsushi (very unsure about this one)
  • rtfm by japaric
  • copper by japaric
  • m4 by japaric (not sure about crate name)
  • embedded_hal by japaric (or some other member of embedded wg?)
  • syslog by geal
  • simple_server by steveklabnik

And here are crates with creative names (name not obviously associated with what it does) that I can remember:

  • tokio - async framework
  • iron - web framework
  • gotham - web framework
  • rocket - web framework
  • hyper - http parser
  • pest - parser framework
  • nom - parser framework
  • rtfm - real time for the masses - real time embedded framework
  • copper - embedded framework
  • piston - game engine
  • conduit - servie mesh framework, I think
  • clap - command line argument parsing

At the first sight it might look like username + crate name wins, but that's not actually the case. First I think that I don't use many crates with creative name, so the second list isn't shorter because of my inability to remember, but because of them not being many. Secondly, in the zeroth case I'd be (theoretically) unable to use any other crate. However, I remember both creative names listed above and "normal" names - many of them listed in the zeroth case, but there are others (websocket, protobuf, reqwest, serde, etc).

In other words, I remember more crate names than crate names and their authors. Of course, it's anecdotal evidence, but I'd be surprised if anyone remembered the nick of the author of every crate he uses.

4
Shnatsel•

we do have stuff like a crate named "reqwest" solely because "request" and "requests" were taken

Which, I might add, is bucking unpronounceable, guaranteed to be mangled by autocorrect or even mistaken for a typo by humans. Ugh.

2
DHermit•

You could make it optional. If there is only one package with that name, you can omit it (but cargo still saves the full name in Cargo.lock so if there is one added lated you project will still compile), but if there are multiple, cargo will throw an error and list the possibilities.

3
kixunil•

That could work for bin crates but it'd be a problem for lib, which don't have Cargo.lock committed.

1
Treyzania•

Let it be namespaced using the github username/org.

Let's not repeat Go here. You already have to register to publish crates on crates.io, use that username.

3
DHermit•

Another option is to have multiple repositories like distros have (and some thing where everybody can submit like copr or the AUR).

8
Hitife80•

I second that. I think Arch Linux is a living example of a perfect balance between reliable stable core and wild wild west in AUR. The barrier to entry for newcomers is minimal (just the PKGBUILD script), yet once your package is recognized it gets moved up through community, extra and then core repos. Very sane, pragmatic approach to packaging software.

11

Yes. Namespaces, please.

3
Aceeri•

If squatting hundreds of crate names is considered not malicious, why should I personally not set up a bot to squat thousands to tens of thousands? This is going to get worse as rust grows and more people see an opportunity for abuse.

138
pleurplus•

Maybe that's how this is solved, if it's proven unsustainable without actually causing problems this would be solved pretty fast.

41
usernamedottxt•

Eh. Careful. I threatened something similar the last time this came up and just got downvoted into oblivion. People would rather pretend it won't happen.

19
7165015874•

I'm strongly against involuntary change of control for crates. Please feel free to disable any namespace that isn't up to par but please don't hand over to someone else, even the core team.

-5†
logannc11•

Why?

10
birkenfeldclippy · rust•

To be honest, if nothing is done about this blatant instance, someone is bound to do that. And although it will be a pain in the ass, it might result in better policy.

13
burkadurka•

Presumably that's exactly what happened in this case, since nothing was done about previous squatters like mahkoh.

7
Elession•

It's apparently not against the policy to do that so I think it would be a good idea. When people can't find a free name for their crate anymore, maybe some change will happen.

6
Thin_K•

This looks like blatant name squatting, surely someone on the Rust team can swing the hammer on this?

93
XtremegamorOP•

The crates.io policies page says that package ownership will not be handed over for squatting, but I hope that something is done about this. As rust's popularity increases the problem of squatting names with no intent to create and distribute will only become worse, and genuinely good packages will have to be hidden behind less intuitive names purely because of the name they want being taken. This is something that's seen in NPM and it would be a real shame to see the same situation happen with cargo.

75
kixunil•

All hope isn't lost:

In general, these policies are guidelines. Problems are often contextual, and exceptional circumstances sometimes require exceptional measures.

I think nobody would be against doing something about this specific case. However, just removing them would be a bad idea, since they could be squatted again.

I'd suggest:

  1. yank them
  2. Change owner to few people from Rust team
  3. Put there a description for those who want the name to ask someone from the team.

The team member could do a very quick review - whether the name makes sense for his crate and that the crate is actually useful (not empty).

50
usernamedottxt•

I literally own the rustup crate because I myself tried to 'cargo install rustup' and was surprised to get back a 404. I've freely offered it to the rustup team, but they would probably also be willing to yank that from me :P

31
burkadurka•

FYI, since you yanked the crate, it still gives the same error as if you tried to install a nonexistent crate. Maybe you should put up a dummy crate with a build script that does panic!("Yer doin it wrong, try https://rustup.rs")

7
DannoHung•

Definitely looks like someone running an "exploit" to try and force an issue.

I don't see any problem whatsoever with the Rust team kicking him off and freeing the names up manually.

13
kixunil•

Or that person intends to demand payment for handing over those names.

16
noxisacatWG-codegen•

NPM

npm doesn't allow squatting.

https://docs.npmjs.com/misc/disputes#exceptions

7
xialvjun•
-6
logannc11•

Not only would that be a nightmare if it succeeded (two popular crates battling over the same name, leaving all our Cargo.tomls changing every day), but it could be trivially subject to Sybil attacks (unless I started skimming too early where they dealt with, but I can't imagine how anyone could).

10
d3b105b•

I think at this point it’s fair to say that at not having namespaces for packages has become a problem, it’s been a problem on npm for a long time so I’m surprised there hasn’t been a bigger push for it in cargo and the greater Rust ecosystem. Having a few persons being able to squat packages like this in large quantities and have a policy that says that for the most part you do not return them will become a large problem later, if it isn’t now.

56
ForeverAlot•

It was a problem with Python even before npm. This development is unsurprising and it was predicted before Rust 1.0. Namespacing was actively rejected, I don't remember why exactly but I do remember the reasoning I saw 1) was basically aesthetics, and 2) seemed solvable with a legitimate special-case.

16
dabruc•

It was a lot easy to reject when Rust was younger. Anyone advocating for namespacing knew this would happen. It's not just squatting either. It will also be a problem when some major packages need to fork 2 or 3 times and need to name themselves "${package}-2", "${package}-ng", etc. Linux distributions, Python, npm, etc all have these issues.

We need packages to be namespaced with some light controls on the top level. By default you publish under your username. Core/trusted libs can be granted access to reserved names.

10
Devnought•

The user's github account was created 7 hours at the time of this writing.

35
Nemo157•

Interestingly https://crates.io/crates/boost is owned by them but 3 months old. I wonder if there’s some way to get the original owner data for this crate before they moved it to this new account.

7
Nemo157•

Found a way, https://crates.rs/crates/boost still has the old owner information 😀, that shows https://crates.io/users/ndkimhao as the original owner, which is linked to a not-entirely-empty github account: https://github.com/ndkimhao (with an associated email address).

5
burkadurka•

Have you tried contacting ndkimhao?

2
burkadurka•

One clue: that crate says the author is "Kary <[email protected]>", whereas most of swmon's other crates don't have any contact information (which, incidentally, pretty much eliminates any presumption that they were reserving names in "good faith"...). EDIT: I emailed "Kary". The mail was immediately returned "mailbox unavailable".

3
sunjayv•

This is unfortunately not a unique thing and I think so far the answer is that nothing will be done about it. I saw something similar about a month ago and I got the same answer. Here's my tweet about it: https://twitter.com/Sunjay03/status/906261293497282560?s=19

It's good to keep talking about it. Maybe a policy change will occur. Thanks for bringing this up!

33
dr_entropy•

Java's domain based module naming system doesn't seem so bad now.

31
XtremegamorOP•

There's a lot more that keeps Java's packaging clean of this. Central (the de-facto standard package repository) entries are vetted before being available, and you need a working product before you can grab a name. It makes it much harder to squat with no or low quality work

27
loginonreddit•

To be fair, you only need to prove you own the domain to get a com.something groupId in maven central. You don't need proof of work. I personally got my github username with io prefix.

13

You need a registered domain name certifiably registered to your name to publish an artifact to Maven Central. This kind of limits abuse.

2
vadixidav•

My solution:

If you email them and they ask for money to get the squatted crate which has no code, then proving they did that to the core team should give them ample evidence to transfer ownership and ban them.

24
NoahTheDuke•

What if they don’t ask for money and are silent?

6
vadixidav•

I don't have a solution for that, but my assumption is most namesquatters are doing it to get money. If people do it just to troll people then that would be sad.

2
rrobukef•

There's plenty of sad people in the world.

2

I think it's pretty funny tbh.

2
folk_science•

As I said maybe they are just being a name vigilante and not trying to extort money? https://www.reddit.com/r/rust/comments/9aaanw/cargo_crate_name_reservation_spam/e57g1u5/

1
pyfisch•

Some of the names reserved by swmon are Rust keywords like the if crate. The "cargo new" command does not allow to create crates with a keyword as a name and has a blacklist. Perhaps this blacklist should also be enforced on crates.io?

20
birkenfeldclippy · rust•

Sounds like a good idea. Might be a nice "first PR" issue for people to contribute.

7
kixunil•

Can we have our namespaces and eat them too? Here's a slightly different idea, that could help with discoverability as well:

Let's have namespaces, but only few of them. The current one would get called experimental, there would be others: community, nursery, quality and possibly paid.

  • experimental is the same as today and it'd work the same way. Anyone could publish to it. Squatting like this could get occasionally cleared.
  • community would only contain crates that are known to be useful. I'm unsure how the progress from experimental would work, but probably something like voting + quick look from someone from some curator. (Just basic check whether the crate seems to be doing what's in the description and isn't a copy-paste from other crate. Fork could be accepted if it solves some specific problem or the original author no longer maintains the crate.)
  • nursery is basically a marker for "this crate should eventually get to quality, but isn't quite there yet".
  • quality should only contain really great crates. It'd have to meet many criteria like widely used, well maintained, several maintainers, full documentation with examples and tutorial, descriptive name, tests, review from security team, etc.
  • paid could be a way to get additional funding for Rust development by allowing people to pay for getting into this namespace.

In order for a crate to get into quality namespace, first an RFC would be written describing why the crate is considered useful as well as all deficiencies it has and how they should be solved. After this RC being accepted, the crate would get into nursery namespace. It'd signal that the crate is considered useful and actively maintined with the intention to make it high-quality. After all issues with the crate are resolved, another RFC would be created that describes why the crate is considered high-quality and after accepting it, the crate would go to quality namespace.

The quality namespace would thus also be a great answer for those, who see small std as a problem.

16
ognarb1•

Interested idea, but I'm unsure how dependencies between the namespace could be done

2
kixunil•

I think it'd be fairly easy - just specify e.g. namespace = "quality". Alternatively, one could specify default namespce for whole project.

Also, I'd expect quality crates to never depend on anything outside of quality.

1
burkadurka•

What happens when crates move between namespaces? To me, you seem to be describing the tagging system that already exists. But I don't see how it solves any of the issues that people want namespaces for.

1
kixunil•

It would become permanently "symlinked", so that everything still works.

I'm not aware of any such tagging system.

1
fgilcherrust-community · rustfest•

Who would gatekeep the "quality" namespace? We're already well in the 10000, who reviews all the stuff? How will it be removed? If you have a look at the state of all those manually awesome built lists after like 1 year or so, you already see the problems you might run into.

People up there are complaining about the Rust team already, how do you ensure your team doesn't end up being a clique?

Who would get the money from "paid"? How do we make sure this makes more money then is lost in accounting?

It's pretty simple to write these ideas down, they have huge repercussions and involve a _lot_ of work downstream, especially forever.

1
kixunil•

Hmm, while I mentioned RFC process, I somehow forgot to mention that it'd be managed by the Rust devs. They wouldn't have to review every crate, if some kind of community voting was used to pre-filter them.

People up there are complaining about the Rust team already,

Didn't see this yet. Can you point me at some cases? So far I found Rust team very competent. Of course, it's not a guarantee that it will remain so, but it's the best we have so far (I think).

Who would get the money from "paid"? How do we make sure this makes more money then is lost in accounting?

Core Rust developers and maintainers + covering expenses of running the server. Economic calculation isn't too hard in capitalism: price is the value of all things one had to sacrifice. Therefore if accounting costs x, then just add that to the price of publishing into paid namespace. Also I consider this feature as optional.

2
fgilcherrust-community · rustfest•

Hmm, while I mentioned RFC process, I somehow forgot to mention that it'd be managed by the Rust devs.

Our teams are already at the edge of their bandwidth and now we should come up with a way to manage this?

They wouldn't have to review every crate, if some kind of community voting was used to pre-filter them.

How do you make sure that community voting doesn't become a popularity contest?

Core Rust developers and maintainers + covering expenses of running the server.

Again: this isn't a well defined set of people.

Core Rust developers and maintainers + covering expenses of running the server.

That's overly simplistic. Running an organisation and bookkeeping incurs a base cost. You need to do taxes and accepting money from organisation can be a pain. Someone has to have the time and bandwidth and run all that stuff.

1
kixunil•

Would it be realistically possible to expand the team?

I'd view it mostly as an experiment. We don't fear writing experimental code, so why should we fear trying out some process and see if it works?

And as I said, paid is just an extra idea of lower importance. If it isn't worth it, simply don't implement it.

1
icefoxen•

The problem isn't namespaces, or lack thereof. The problem is the lack of an abuse policy. The goal is to have crates be utterly immutable so it's impossible for old dependencies to vanish. This goal is there for very good reasons but is also inflexible enough to be abused like this.

We can fix this with a policy change; we don't need a technological change. pip and npm, for instance, also don't have namespaces, but are more strictly moderated so people have a recourse if names get squatted, or even just to recover a name if packages die and aren't useful to anyone. The fact that this opportunity exists also discourages squatting in the first place, since people know it won't get them much.

This is a pretty clear-cut case of abuse IMO, and should be easy to handle. I tried contacting the owner of these crates to ask for a crate and see what happens, but I actually can't find any contact info for them through crates.io or github, so I can only assume that this endeavor is still a work in progress. You can tell the Rust team "you should have seen this coming", and basically we as a community did see it coming and didn't come up with a good response to it -- partially because the discussions always turn into bitch-fests about namespaces.

Is this a problem? Yes. Is it easy to solve via policy changes? Also yes. Has any actual damage been done? No. Great, let's fix it and get on with life.

15
ForeverAlot•

NPM has had namespaces for over 3 years:

Naming things is hard. It’s even harder when there are tens of thousands of other people who want to use the same names that you do. With 141,898 modules on npm, it has been getting hard to find a name that isn’t taken. Naming things just got a little bit easier for npm users with the introduction of scopes. We rolled out scopes as part of the release of private modules last week, but scopes can be used for public packages, too.

https://blog.npmjs.org/post/116936804365/solving-npms-hard-problem-naming-packages

April 20, 2015

I agree that the abuse policy is underdeveloped but I disagree that lack of namespaces is a non-issue. It is easy to reduce this discussion to a question of abuse and solve it with process—that creates no new technological challenges by instead making this a people-problem. On the other hand, if we did have namespaces, potential for abuse would be greatly reduced by sheer practicality without creating a human process and we would additionally get disambiguation.

8
icefoxen•

Thanks for the correction. Though it doesn't change my point.

And, well, the Rust team chose no-namespaces for reasons, and those reasons still seem valid to me. I don't find disambiguation to be a particularly compelling argument alone, though there's times when it's useful.

Doesn't change the fact that we could fix this with either a large technical change or a small human change.

5
leitimmel•

So what if someone maliciously attempted to squat all crates? Sure, it will take time, but with a botnet and sufficient dedication one could effectively make crates.io unusable. How would that be handled?

(To clarify, in case my wording made it sound that way: There is no threat attached to this comment, it is purely hypothetical.)

14
binkarus•

I don't think the rust team will even respond to this anymore even though it keeps getting brought up time and time again. They are very much against this. I personally would have gone with namespacing and find their reasoning against it to be weak. Not namespacing creates a game where there is an unstable equilibrium. A single bad actor can do a lot of damage.

14
birkenfeldclippy · rust•

And as is common in these cases, it requires a lot of damage to be done to get a reaction and change. I'll be waiting for the next wave...

3
Perceptesruma•

Sigh. This is why there should have been user namespaces. One of the worst parts of RubyGems and NPM that I'm still amazed was copied for Rust. In general Rust has been good about learning from the mistakes of the past.

12
fgilcherrust-community · rustfest•

People forget that Rubygems once had a host with namespaces and it was terrible. It's not like it wasn't tried.

​

Suddenly, you did not only have to communicate a library name, but also the namespace you meant.

2
orangepantsman•

If people who name squat a lot of crates aren't going to be punished / handled, can we at least get an enabled by default filter on crates.io that hides no release crates?

10
pingveno•

Then they will just do an empty release.

14
SimonSapinservo•

This is already the case, the only way to "register" a crate name is to publish a first release.

5
TotesMessenger•

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 ^(If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads.) ^(Info ^/ ^Contact)

9
artpop•

I find it amusing that there’s all sorts of solutioneering to the problem in this thread but no one has simply decided to reach out to the person responsible to ask them what the deal is.

9
zamadatix•

When a large amount of discussion appears on a topic it usually means the problem space is bigger than it seems at first glance. The problem here is clearly larger than just the swmon example and asking that particular individual why they did it has no effect on the solution or existing discussion.

For instance maybe I make a bot that registers all 4 letter crate names. Does why I made the bot change that we need and come up with a solution to the squatting and/or namespace problem? Should we try to figure out why I created the names and how to resolve that issue or is this actually a recurring issue not related to just the names the bot created?

13
burkadurka•

Contact them how exactly? Despite the inviting (trolling?) descriptions, all but one have no contact info in Cargo.toml (and that one is a fake email). We could try this method (edit: no response yet) though I'd prefer the contact to come from a Rust team member.

Anyway it's not about this person. It'll happen again.

6
sasik520•

Maybe crates.io could require some prefix (e.g. username- or username_ or smthg like this) for all new crates? It would be backward compatible and could solve the problem without huge change

7
breadfag•

https://internals.rust-lang.org/t/crates-io-package-policies/1041

While namespaced packages allow multiple authors to use a single, generic name, they add complexity to how packaged are referenced in Rust code and in human communication about packages. At first glance, they allow multiple authors to claim names like http, but that simply means that people will need to refer to those packages as wycats' http or reem's http, offering little benefit over package names like wycats-http or reem-http.

When we looked at package ecosystems without namespacing, we found that people tended to go with more creative names (like nokogiri instead of “tenderlove’s libxml2”). These creative names tend to be short and memorable, in part because of the lack of any hierarchy. They make it easier to communicate concisely and unambiguously about packages. They create exciting brands. And we’ve seen the success of several 10,000+ package ecosystems like NPM and RubyGems whose communities are prospering within a single namespace.

In short, we don’t think the Cargo ecosystem would be better off if Piston chose a name like bvssvni/game-engine(allowing other users to choose wycats/game-engine) instead of simply piston.

28
ForeverAlot•

"Nokogiri" is a saw. It may be "creative" but I reckon the only reason that has any discoverability today is because the library is so well-established—at least, it doesn't scream XML parsing to me. Rust has stuff like "hyper", which I also think is too creative a name, and "regex", which is a deeply unimaginative name that offers near-perfect discoverability. The top "new crate" on crates.io right now is "abscissa", whose page includes an FAQ, whose only question is, "why the name?", whose answer is incorrect (other new crates: "drug" and "gypsum"). I could even go further and suggest that encouraging special-snowflake names is counter to Rust's underlying idea of explicitness.

22
fgilcherrust-community · rustfest•

Its very popular predecessor "hpricrot" also doesn't shout XML parsing. One could also argue that their success is due to having a very good and recognisable name, instead of being "another thing XML in the name".

counter to Rust's underlying idea of explicitness.

Please don't invoke this idea just on everything. Rust has no policy to library naming and if anything, the community has always had a tendency towards colourful names.

8
slsteele•

Absolutely (regarding Nokogiri). In my experience with people new-ish to Ruby, it adds to the papercut they get when they have trouble installing gems with native extensions that they get an error mentioning Nokogiri that is resolved by installing libxml2. It would make things just a little less disorienting if the gem name mentioned XML.

5
fgilcherrust-community · rustfest•

I don't see how. It's pretty common practice that things have XML dependencies. No one complains when an editor named... say... GIMP, doesn't compile because libxml doesn't compile.

For these things, I'd like to see proper research, not individual opinions.

2
sasik520•

I totally disagree with the reason from the link. "Creative" name is workaround, and this reasoning forces us to use workarounds instead of real solutions. Could you imagine the mess if names like 'http', 'regex', 'libc', 'log', 'time', 'gcc' etc. etc. were taken and contained some random code?

​

Maybe there is better solution than namespaces, but this reasoning is definitely one of the very, very few things that are explicitly wrong in rust ecosystem.

9
fgilcherrust-community · rustfest•

Crative names are also a marketing instrument, and calling yet another http client "http" doesn't help you there.

2
sasik520•

sasik520

There is slight difference between the possibility and the necessity to be creative. There is no evidence that users who are not forced to be creative will not be creative.

3
klapply•

This is an incredibly stupid reason. I want to name my packages how I want and not how someone enforces me. What I like about Golang is that it uses namespaces, so it's really easy to find a library that you use in your project on GitHub or elsewhere.

8
8igg7e5•

IMO Java had it right here - domains as the convention for package namespaces. Any package manager can then define their tie-break policy as 'prove you have the domain'.

The cumbersome nature of packages is not a problem with namespaces but Java's lack a way to alias them. If a package becomes dominant, the community tends to recognise that and refer to them well-known shorter names. And if someone tries to co-opt that branding then there's a clear way to distinguish them.

'Creative' names seem to require too many creative solutions to the problem and that tends to result in the opposite of discoverable and add pronunciation and transcription challenges. These in turn encourage typo squatting without the added barrier of domain registration.

At 'use' time you almost certainly want to alias but you're usually only using one crate covering a particular problem domain at a time so you're not likely to find it hard to choose obvious short aliases. Indeed the crate mechanism could suggest an alias - but at least there's a clear way to untangle collisions.

The lack of namespaces seems to require creative solutions with non-obvious outcomes or just hope that there aren't bad people with the desire to exploit or inconvenience us.

7
policjant•

Damn. My first thought was to namespace all the packages but this is a really good argument against that. I really don't see a solution to this issue now. Though, with this guy, anyone trying to add a package will have to get really creative 😂

6
FG_Regulus•

Just because my package would be namespaced doesn't mean I would start using boring names, though. And the couldn't the explicit namespacing could be optional for when the package name conflicts. Is it more complex? Yes. But it allows for first-class crate forking, prevents squatting, etc.

14
ForeverAlot•

Optional namespacing for unambiguous crates wouldn't work, somebody could maliciously create an ambiguity that would cause build failures and consequently confusion. Instead, though, I believe if a crate had the same name as its namespace you could refer to it by create name and automatically disambiguate: serde => serde/serde—and this might even be possible to do in a backwards compatible manner.

10
mitsuhikoredis-rs•

For what it's worth we have a popular open source project and the fact that we own the prefix on npm made life much nicer. No longer do we have to deal with community packages picking up the better package names.

7
jackie_pwn_asses•

At first glance, they allow multiple authors to claim names like http, but that simply means that people will need to refer to those packages as wycats' http or reem's http, offering little benefit over package names like wycats-http or reem-http.

I disagree. Prefixes differ from namespaces in the important respect that I can own a namespace, but I can't own a prefix.

2
swmon_akdf•

Hi everyone. I'm sincerely sorry for the mess I have caused. I gathered and published many un-registered crate names. I thought that there is no rule against squatting, so I just registered name for a project that I'm working on and many ideas that I may do in the future.

So if I really violated the Rules and someone from Rust team is here, can you remove my account with all associated crates ? Because I can't find any good way to completely remove the crates.

5
ejaszewski•

You haven’t broken the rules, but I think the problem most people have is with the principle of what you’ve done. While not technically disallowed, you’ve reserved a huge number of crate names which someone might want to use tomorrow for a crate they are actively developing when you might not develop them for months, years, or ever.

If I were you, I would contact a Rust team member and ask them to remove these crates from your account. You can always re-register them later if you decide to develop them, but there’s no reason for you to have reserved these now.

5
burkadurka•

Thanks for coming forward. But it's a bit hard to believe you did this innocently or by mistake, because as someone pointed out, you'd have to go around cargo to make crates with these names. And you wrote in the descriptions "contact me", while not providing any contact information (edit: except for one where you provided a fake email address -- wtf?). I tried the only way I could think of but you didn't answer. For that matter, you haven't provided any evidence that this reddit account is associated with the crates or the Github account.

Normally there's no way to remove crates from the index, but I recommend contacting the developers directly. Probably one of the Cargo team members, by IRC or email. They seem to have avoided this thread (which is off the front page now anyway).

At the very least, if the crates stay up, you need to clean up your own mess by adding contact information to each of them, and being responsive when someone asks for a name. It might be worth reaching out to folks who spoke up in this thread so you can add owners to the crates who could respond to name requests if you get busy with other things.

3
orium_•

It wouldn't solve the whole problem, but at least to prevent people from running bots that register a huge number of crate names: we could require a CAPTCHA when the crate is created on crates.io.

It could either be cargo publish that presents a textual captcha to the user (generated and checked by crates.io, of course), or we could require new crates to be registered through the browser and have a classic visual CAPTCHA.

2