-
Notifications
You must be signed in to change notification settings - Fork 12
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?