Replies: 3 comments 11 replies
-
My impression is that we should be case sensitive, but disallow two package names that differ only by case. Thus, we're never throwing away case (which is meaningful, since it renders into source code identifiers differently), just preventing ambiguities or possibly, depending on the casing scheme, collisions. (Maybe the component model should do likewise in its uniqueness...) |
Beta Was this translation helpful? Give feedback.
-
After a lengthy discussion with @esoterra and @lann, we came to agreement that we need to hash ( Since changing the case of a name affects the generated bindgen code, it can change behavior. This does open up a possible typo squatting situation if a registry does not correctly enforce case insensitive uniqueness. The federating registry that imports another registry's namespace should check that this uniqueness is enforced. Registries may choose to adopt a more restrictive policy that only allows lowercase names, for instance. |
Beta Was this translation helpful? Give feedback.
-
Hi, @calvinrp ,Who does For example, if I am the owner of the namespace, do I have permission to require additional checks for the style of the uploaded package? The style must be met for successful publishing. For example, some languages (such as C#) may like upper camel case, and some prefer all lowercase letters. |
Beta Was this translation helpful? Give feedback.
-
From my read of the Component Model spec and the validation code, namespaces just need to validate as the
KebabStr
(see validation code).So
my-NAME
,MY-NAME
,MY-name
andmy-name
are all validKebabStr
. I assume we would want to match case insensitive to prevent confusion.Should namespaces be required to be lowercased to pass validation? Or just match case-insensitive? If not lowercased, do we want to keep the original casing for presentation purposes?
On a similar note, how do we want to handle casing in package names with respect to the registry and
LogId
s? It is possible to hash as lowercase. Currently,PackageId
(soon to bePackageName
) is case sensitive and produces differentLogId
s depending on the case.Beta Was this translation helpful? Give feedback.
All reactions