Closed FroMage closed 11 years ago
Done.
Sorry I think this is too strict for Java modules, see my comments inline.
I did it by specification. Chapter 8.2.1 ...
A module name is a period-separated list of lowercase identifiers, for example:
and
A module version identifier is a character string containing digits, periods, and lowercase letters
Well, perhaps the spec is not up to date then, see https://github.com/ceylon/ceylon-spec/blob/master/Ceylon.g#L3658
So module names confirm to package names, which are sequences of LIDENTIFIER
which means that _foo89.bar23._a_
is legal, even including '\u00c0'..'\ufffe'
.
As for module versions, it appears to be just any CHAR_LITERAL
https://github.com/ceylon/ceylon-spec/blob/master/Ceylon.g#L78
In any case, these restrictions don't apply to Java modules we would upload.
@thradec this section of the spec is talking about the names of Ceylon modules. The spec does not really define interoperation with legacy module archives, but it mentions the idea in section 8.2.10.
According to our conversation, check is applied only on car
and js
, and regex pattern should allow same names like grammar.
Looks good to me, thanks!
To see if they are legal.