The shards command is bad.
That can sounds funny, but I always messing with the singular/plurial forms. shards install but shard.yml and shard.lock. There are gem, crate – why adding this s?
I'm not the only one, I asked on Gitter, apparently other people like @vlazar and @kinxer have hard times too :smile:
Please, consider for our sanity to drop this s – renaming the project and the cli command from shards to shard.
Yes, it can be a little bit confusing at times. I know that I have hesitated on that more than once.
But the program is called shards and that plural form is important. An individual package is called shard and the program that manages these dependencies is called shards. Makes totally sense.
Renaming this established name would be a huge endeavour. Just think about all external resources like OS package managers using this name. Even if there was a compelling reason to do so, it would be very difficult and cause a lot of confusion on the way (which is really counter-productive).
But, maybe the configuration file could rather be renamed from shard.yml to shards.yml (and .lock). The rationale for the singular is that it describes a single shard. That makes sense. Using plural shards.yml would also be fine, meaning configuration for the shards dependency manager. That's also acceptable. But shards.yml reduces room for confusion/errors as described in the OP.
If there should be any change at all, it would be the configuration file, not the program name. Renaming the configuration file is obviously by far less complicated than renaming the program since it can mostly be handled internally. Still, there are a also external integrations which would need to adapt as well.
I think I'd personally prefer shards.yml, but I'm not sure if it is worth the effort.
There is a rationale. The shard.yml depicts one shard, hence singular. It can depend on many shards, and thus shards is the program that will resolve and install them, hence plural.
It came naturally as I wrote the SPEC and program, and didn't give it much thought. You're the first in 3 years to tell me about this.
Sadly, I can't rename the configuration for shards.yml: it would either break everything or require a transition phase that will require to lookup both filenames, leading to unrequited more complexity, and more confusion. Same for the program name.
alias shard=shards :)
@RX14 sorry, it's Crystal, so no aliases 😛
@vlazar alas not always true. There are singular aliases for Time::Span, see the :ditto: https://github.com/crystal-lang/crystal/blob/master/src/time/span.cr
@j8r Thanks! Interesting, I've read a couple of issues and pull requests related to aliases and it looks like decision about using some aliases or not using aliases at all was not made yet. Maybe close to 1.0, after more important stuff then :)
Most helpful comment
alias shard=shards:)