-
Notifications
You must be signed in to change notification settings - Fork 8
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
ambiguous on disk names for component and configurations vs packages with -
in their name
#79
Comments
The more I think about it the more I like option 3, since it has the added benefit of simplifying searching for "core" cps files as well as simplifying searching for fragments. |
Correct. More to the point, your package name is your namespace name, and
I'm not sure what is being clarified. Are you looking for something like, "For example, while you may think of your package as (On second though, I am trying to remember the rationale for allowing
...But how often is this likely to happen in practice? You can already keep your |
The only place I could find that was in the component name section, it would seem like it could be explained or cross-referenced under the searching section, or more prominently in its own section?
You'll load it as a fragment, and then have to have code hanlding to reject it as not a fragment. zlib-ng would be particularly problematic in this case, because they need to provide both a If you ship multiple fragments of zlib-ng, there could be a worse confusion, merging a
and the user asks for zlib in a debug configuration, |
Yes, but that code is a) trivial (exactly one check), and b) a sanity check that should be present regardless. It's also the same early sanity check that should be applied to the "root" CPS file (in this example,
Uh... no? Your implication is that (I'll ignore that you probably meant
Why not follow Option 1? |
I'm sorry, I wrote up a reply yesterday, and apparently never posted it! I thought about Option 1, and don't think it actually helps, consider the following:
vs
There's zero ambiguity here. We know right away that I see two problems with the current approach:
So what I'd propose is:
|
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 calledcode::blocks
would be invalid, it would need to be called something else, likecode_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:
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 ofzlib
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:zlib/*.cps
andzlib-ng/*.cps
cannot be confused-
as a fragment separator, such that only:
and@
are valid. This means that we need a replacement for windows, since:
isn't valid?.cpf
The text was updated successfully, but these errors were encountered: