Skip to content
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

Relax the XSD for package format 1, 2, and 3. #400

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clalancette
Copy link
Contributor

Each of them has the same note in their corresponding REPs (https://www.ros.org/reps/rep-0127.html#name,
https://www.ros.org/reps/rep-0140.html#name,
https://www.ros.org/reps/rep-0149.html#name):

"
The package name must start with a letter and contain only lowercase alphabetic, numeric or underscore characters. The package name should be unique within the ROS community. It may differ from the folder name into which it is checked out, but that is not recommended.

The following recommended exemptions apply, which are optional for implementations:

  • Dashes may be permitted in package names. This is to support maintaining a consistent dependency name when transitioning back and forth between a system dependency and in-workspace package, since many rosdep keys contain dashes (inherited from the Debian/Ubuntu name).
  • In support of some legacy packages, capital letters may also be accepted in the package name, with a validation warning. "

The XSD should reflect this entire section, including the optional bits about allowing dashes and allowing capital letters. If we want to disallow them in some circumstances, then the downstream linters should enforce that.

Because of that, this PR relaxes the XSD for each of the package formats to accept the full range.

Note to reviewers: please carefully check the regular expression. In my local testing this seems to do the correct thing, but we want to make really sure that this is correct before we merge and deploy this.

Each of them has the same note in their corresponding REPs
(https://www.ros.org/reps/rep-0127.html#name,
https://www.ros.org/reps/rep-0140.html#name,
https://www.ros.org/reps/rep-0149.html#name):

"
The package name must start with a letter and contain only lowercase
alphabetic, numeric or underscore characters. The package name should
be unique within the ROS community. It may differ from the folder name
into which it is checked out, but that is not recommended.

The following recommended exemptions apply, which are optional for
implementations:

- Dashes may be permitted in package names. This is to support maintaining a
  consistent dependency name when transitioning back and forth between a system
  dependency and in-workspace package, since many rosdep keys contain dashes
  (inherited from the Debian/Ubuntu name).
- In support of some legacy packages, capital letters may also be accepted in the
  package name, with a validation warning.
"

The XSD should reflect this entire section, including the optional
bits about allowing dashes and allowing capital letters.  If we want
to disallow them in some circumstances, then the downstream linters
should enforce that.

Because of that, this PR relaxes the XSD for each of the package formats
to accept the full range.

Signed-off-by: Chris Lalancette <[email protected]>
@azeey azeey mentioned this pull request Apr 9, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant