docs icon indicating copy to clipboard operation
docs copied to clipboard

Clarify usage of underscores in package IDs on the Community Repository

Open TheCakeIsNaOH opened this issue 3 years ago • 2 comments

What New Or Updated Would You Like To See?

Explicit instructions about when underscores (_) are allowed in package IDs for packages uploaded to the Community Repository. I see two places where this should be updated: https://github.com/chocolatey/docs/blob/master/input/en-us/community-repository/moderation/package-validator/rules/cpmr0070.md https://github.com/chocolatey/docs/blob/master/input/en-us/create/create-packages.md#naming-your-package

Why Is It Needed?

There is no documentation about when underscores may be used for package ID's.

Additional Context?

Going by the package validator rule, underscores are acceptable when they are part of a pre-existing package ID.

However, what about for new packages?

  1. Should they never be acceptable?
  2. Should they be acceptable only when the software name has an underscore?
  3. Should they be acceptable only when the package for the software on another package manager has an underscore?
  4. Should they be acceptable if the software name has an underscore and the package on another manager has an underscore?

This should be decided before the documentation is updated. I personally don't care which option is picked, as they all have upsides and downsides.

TheCakeIsNaOH avatar Jul 15 '22 18:07 TheCakeIsNaOH

Underscores, in my opinion, shouldn't be used in new packages. The only exception would be this one:

  1. Should they be acceptable if the software name has an underscore and the package on another manager has an underscore?

pauby avatar Oct 13 '22 11:10 pauby

I agree with @pauby that understores should not be allowed in new packages, except for when:

  1. Should they be acceptable only when the software name has an underscore?

While there could be a case being made if a different package manager uses underscores for the package id, i would still say in general the only exception is if the software itself uses an underscore for its name.

AdmiringWorm avatar Oct 13 '22 13:10 AdmiringWorm