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

Package name specification needs refinement #68

Open
mwoehlke opened this issue Jun 13, 2024 · 4 comments
Open

Package name specification needs refinement #68

mwoehlke opened this issue Jun 13, 2024 · 4 comments
Labels
enhancement The issue asks for an improvement to the specification. scheduled The maintainers have flagged this issue as something to be addressed.

Comments

@mwoehlke
Copy link
Member

Right now, the specification says that "package [...] names may consist of ASCII letters, numbers, hyphens (-), and underscores (_), and may not contain forward-stroke (/) or at-sign (@)." This is both too restrictive and too liberal; we should probably also explicitly exclude all characters not allowed in FAT file names (<, >, :, ", \, |, ?, *), and we should add + and . to the set of officially blessed characters, as these are used in existing package names. (As a bonus, this also makes the naming schema nearly identical to what CMake considers acceptable target names.)

@mwoehlke mwoehlke added enhancement The issue asks for an improvement to the specification. scheduled The maintainers have flagged this issue as something to be addressed. labels Jun 13, 2024
@bruxisma
Copy link
Contributor

When you say package name do you mean the canonical name (e.g., my.library) do you mean package filename? I am also unaware of any filesystem that does not currently allow the @ sign, build systems like meson do use it last I checked for hash info (e.g., target@some-hash).

@mwoehlke
Copy link
Member Author

When you say package name do you mean the canonical name (e.g., my.library) [or] do you mean package filename?

Both? The only allowed difference between the package name and the CPS file name is that the latter can be lower-cased relative to the canonical spelling of the package name. (Possibly this could be relaxed a bit, in case of extremely restrictive file systems, but right now I'm not aware of any need to do so. Also, technically, things get weird on case-insensitive file systems since I believe FOO.cps will be found if looking for Foo, but I consider that UB. Practically speaking, having names that differ only by case won't end well.)

I am also unaware of any filesystem that does not currently allow the @ sign

...which is fortunate because CPS file names may contain @. It's not allowed in package names, however, as it is reserved for the configuration specifier.

Would "hash information" show up in consumer-visible names? I would think "no"...

@mwoehlke
Copy link
Member Author

Note: There exist .pc files that use all of _, -, . and +. There also exist CMake packages that use -. One additional rationale for supporting additional characters is so that existing packages can "recycle" the name they already use. (This might be especially relevant if primarily-CPS ecosystems need to be able to express dependencies on things that only ship .pc files.)

@bruxisma
Copy link
Contributor

Would "hash information" show up in consumer-visible names? I would think "no"...

It shows up for docker images and other OCI based artifacts that allow pinning to a particular hash/instance (separate from the version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue asks for an improvement to the specification. scheduled The maintainers have flagged this issue as something to be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants