ambiguous on disk names for component and configurations vs packages with `-` in their name
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- documentation
Research direction
Start with the configuration-merging specification and the package-name documentation linked in the issue. Compare the documented separators and package-name rules with the listed on-disk examples, then resolve the ambiguity and update the specification so component fragments and packages with hyphens cannot collide.
Written by the indexing model from the issue text.
Description
Looking at the spec for configuration merging it specifies that once a package <name>.cps is found, then the following packages in the sibling directory should be loaded and merged:
<name>:*.cps(except on Windows)<name>-*.cps<name>@*.cps<name>:*@*.cps(except on Windows)<name>-*@*.cps
Per the documentation of package names (https://cps-org.github.io/cps/components.html), it appears that @ and : are invalid in the package name, so should be invalid in the on-disk name as well? So a package called code::blocks would be invalid, it would need to be called something else, like code_blocks. So that seems like maybe a chance to clarify the spec?
The bigger concern I have is that - is allowed in package names, which means for a cps file installed directly in a cps prefix root, like /usr/lib/cps/ there is a potential for ambiguous names to cause collisions, where a - is used to name a third party component, rather than a configuration or component fragment. (I will refer to these component and configuration .cps files as fragments)
Imagine:
/usr/lib/cps/zlib.cps
/usr/lib/cps/zlib-ng.cps
these are two separate projects, with two separate implementations, and should not be combined, but it's impossible to tell that without opening and reading both of them to determine that zlib-ng is not a fragment of zlib
I really don't like the idea that we have to fully parse zlib-ng.cps in order to reject it, it makes for longer search times and more disk i/o. A few possible solutions:
- require that all .cps files be installed in a subfolder such that
zlib/*.cpsandzlib-ng/*.cpscannot be confused - drop
-as a fragment separator, such that only:and@are valid. This means that we need a replacement for windows, since:isn't valid? - give fragments a different extension, like
.cpf - Something else?
- Dominant language
- Python
- Stars
- 191
- Forks
- 13
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cps-org/cps
-
Spec: `c-runtime-vendor` field also should document the "musl" typical value and "bionic"Possibly taken @leha-bot claimed this 10 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 40/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
intake mcp-intake needs-ac needs-human-review priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Ikalus1988/MisakaNet#3848 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
521xueweihan/HelloGitHub#4105 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
igormcsouza/bookloud#54 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
aws-samples/sample-per-model-bedrock#526 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ok-oldking/ok-wuthering-waves#1802 ·
Maintainers usually reply within 2 days