ceylon / ceylon-spec

DEPRECATED
Apache License 2.0
108 stars 34 forks source link

format of module versions #1369

Open gavinking opened 9 years ago

gavinking commented 9 years ago

The spec, in §9.3.1 says:

A module version identifier is a character string containing digits, periods, and lowercase letters

But the typechecker does not enforce this.

What are the real restrictions on version identifiers? I suppose we need to at least accept everything that Maven accepts.

luolong commented 9 years ago

Which is basically "allow anything"?

I think we should also look at what Jigsaw has to say about versions...

gavinking commented 9 years ago

Well I think we should at least disallow whitespace. It looks like we don't quote version numbers on the command line.

ghost commented 9 years ago

I feel like it should be restricted only to lower and uppercase english letters, numbers, dots, dashes, plus signs, forward and backward slashes, asterisks, and underscores...

lucaswerkmeister commented 9 years ago

Note that JBoss also currently restricts the allowed version numbers: ceylon/ceylon-runtime#59.

lucaswerkmeister commented 9 years ago

lower and uppercase english letters

Screw you! If you get to name your module “Vivit Vervet”, I get to name mine „Maßlose Mücke“ :P

I’d vote for Unicode letters and punctuation. Probably throw in one of the normalizations, too.

jvasileff commented 9 years ago

@lucaswerkmeister you forgot emoji. Surely 💩 is a reasonable version identifier.

luolong commented 9 years ago

If we forego semantic versioning and allow arbitrary strings in versions, then I see no problem in accepting any unicode in there.

Just can't wait for someone submitting this module to Herd:

module ima.smartass '\{PILE OF POO}' {}
gavinking commented 9 years ago

I have disallowed ws. Any further restrictions are not for 1.2.