-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] Package namespace concerns #17540
Comments
Hi @jmpatri615 Thanks for your question
Yes, packages do collide only by package name.
I am afraid I don't understand the question. What constraints do you refer to? These fields are useful for example to apply some patterns like you can do something like I am not sure how the user and channel are related to compatibility with filesystems, cmake, compilers or anything like that. It is just like a qualifier to the packages names, that can be used or not. You could call your packages Thanks for your feedback! |
Thanks for the reply.
This reply documents how valid conan names continue to generate warnings, and that is desired. I'm asking why special characters in the user and version attribute fields need to have the same constraints applied to them as the name field? The specific comment I'm linking to mentions
Are the user and channel attribute information that gets passed along to cmake, a compiler, or as part of a filename or path on the filesystem? If not, then perhaps having unique validation rules for these fields would allow for more special characters to be used in these fields, such as the dot. |
I understand now, thanks for the clarification. The user and channel fields can and are actually used in a variety of places:
Besides the functional constraints, there are other UX reasons, like for example, these might be identifiers that developers have to type sometimes, like many Conan command takes full references including user and channel. Special characters can be inconvenient, require extra terminal quoting (note I am a bit surprised that not allowing special characters in user/channel is a limitation somehow. Up to my knowledge many other package technologies won't allow special characters in package identifiers either. The channel is not recommended anymore for any dynamic/pipeline quality stages and should be either drop or immutable, and the user name should be something simple like |
What is your question?
I feel constrained by the conan 2.0 naming conventions and would love them to be looser. To be honest, what I really want is robust support for namespaces that doesn't completely clash with pre-existing standards.
Java namespace standards
Organization namespace
File system hierarchy of paths
I understand that the current recommendation is to use user & channel fields for namespaces, which I am currently evaluating.
Concerns that I have with this approach:
The package name is not really the package name. My first impression on interpreting the attributes name, channel, and user are that the name specifies the library, and the channel and user are present to refine upon its "flavor", such as a forked variation of the base package.
For example, the bolded items are now to be considered the packages full name, and it's not even listed consecutively.
name/version@user/channel
Allocating user and / or channel to be a static part of the package name (its namespace) means that these fields are not also usable for other purposes, such as specifying the organization that created the package out-of-source, or the user/team who has forked the package, and probably additional other valid uses of these fields.
Namespace pseudo-collisions. For example, I choose a package name, lib1@org_area. Later, a new package is published to conan center as lib1. These don't collide due to my usage of user, but now this is an awfully confusing situation.
A sorted list of packages is not sorted by namespace.
Question:
Why are the name attribute naming constraints applied to user and channel? From my very basic testing, it looks like these fields don't propagate anywhere outside of conan package identification. If this is the case, can the constraints on user and channel be relaxed because compatibility with filesystems, cmake, compilers, or other build tools isn't required?
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: