-
Notifications
You must be signed in to change notification settings - Fork 365
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
[bug] Name containing '-' issues a discouraged warning #3086
Comments
Hi @offa Thanks for your report. This is the reason why |
Thanks, that's fine to me and I'm replace it with It should be mention in the docs though, especially if it may cause trouble. |
Definitely. But most people won't read the docs, specially if there is not an issue. So the warning in the output is the thing that works way better than the docs. |
Perfect! :-) |
We are finally removing this warning in conan-io/conan#15920 for 2.3, there are too many packages in ConanCenter with "-", this would be too much to migrate. |
@memsharded - I'd like to advocate for adding the rationale to the docs, as I do read the docs and find the discrepancy between valid package names and "best-practice" package names to be frustrating. As I migrate my org towards conan I'd prefer to align with best practices but have accidentally fallen into the discouraged package names category. I found my way to the rationale by:
Proper docs would have been helpful. Regarding my use of special characters in package names, my org has existing package namespaces that I'd like to leverage, basically org.area.name, is there an alternate/more preferred method of managing package namespaces? |
Some part of the rationale is historic reasons, things were allowed in the past and cannot really be forbidded/enforced, so warnings is the only effective way to move away from these for future Conan versions. We have found that docs are like an order of magnitude less read than those warnings, so this is why typically the warnings precede proper docs rationale.
Mostly using underscore
|
Thanks for your replies on this and the other related thread. At this time, I think the plan is to put our namespace into the package name field, using underscores. This will provide our teams with the confidence that they are not duplicating a package name, which could cause frustrating debug sessions in the future, and enable usage of public packages that do have the same shortname. This will make package names less readable since our areas and names already contain underscores and hyphens. |
Sounds reasonable, thanks for the feedback.
Yes, we understand that tradeoff, similar to the one in other languages and systems, as java. On the other hand we know that it reduces other issues later down the road, when some application that uses some tool or build system crashes when it tries to use packages with special characters in the names, because they don't manage those correctly, and at that time, the pain is much much higher, because it is not simple to rename the package anymore as it is already used by others. |
Packages coning a
-
in the name cause a warning:-
is a valid character according to docs.Environment details
Steps to reproduce
-
(eg.name = "warning-repro"
)conan create
conan new cmake_lib -d name=warning-repro -d version=0.1 conan create .
Logs
The text was updated successfully, but these errors were encountered: