-
Notifications
You must be signed in to change notification settings - Fork 165
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
pkg create --build-type ament_python
should warn about hyphens in pkg-name
#715
Comments
I agree that a warning about the hyphen would be informative here! |
For what it is worth, while using underscore is our best practice, I don't think hyphens should fail. I would prefer we figure out why hyphens are having problems. |
I think what's happening is that when you invoke This thread touches on something tangentially related: https://stackoverflow.com/a/54599368 |
Oh, I see! Thanks for the explanation. OK, in that case I do agree that blocking them completely at (as a side note, I do believe that we can have hyphenated C++ packages, so for now I wouldn't change that semantic) |
Yes agree, C++ works, but for python that's a language limitation afaik. I'll then happily open a PR for that :) |
For what it's worth, it seems the issue you may be facing is not from the package name, but the setupcfg file that get's autogenerated. It seems when the command is run, the setup.cfg file is created like so:
When it should be :
Where the difference is a underscore vs the hyphen. (Should be I hope this is helpful and related to resolving your issue. |
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
When running
ros2 pkg create
with--build-type ament_python
warn about hyphens in the name / or abort pkg creation.Actual behavior
No warning
Additional information
Not really a bug of
ros2cli
but also not really a feature request. I'd expect a warning, thats why I put it as a bug report.I assume the check can easily be added here.
If there is agreement on that, I can open a PR with it. Please let me know :)
For reference: PEP-8: Package and Module Names
The text was updated successfully, but these errors were encountered: