-
Notifications
You must be signed in to change notification settings - Fork 159
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
cant add xam.dk nor apache/camel to a catalog #1746
Comments
i just realised you also can't add apache/camel ...nor jbanghub/eclipse using the CLI but you can do it when editing the json directly. its quite nice being able to list catalogs this way....should we lift the restriction on the cli or you consider this a bug and thus shouldn't be able to list these names ? |
Well, in the JSON you can of course put whatever you like, it's supposed to be "safe". Just never thought about EvilMax trying to edit his way out of CLI restrictions :-) The reason for the limit has more to do with the fact that if you allow a bunch of special characters in alias names you run the risk of ambiguities: things that look like URLs or implicit catalog references, or Maven GAVs etc, and that right now get flagged as such, and things that are supposed to be aliases. But it's not as if I've listed all the possible ambiguities, it was more of a "safe bet". |
I know we treat names with . as then it must be a http url - but that afaik is after alias resolution (haven't double checkked) so if thats true it should be fine..? and even if we dont do it for hostnames - it feels to aliases with /'s in it should be allowed if not for anything but you can make catalog that lists other implictly named catalogs...could even consider adding criteria that the catalog alias is equivalent to the implicit alias if wanna be on safe side? |
I don't think that makes any sense, I could imagine being able to use implicit catalog names as the value of a catalog ref but not as it's name. I mean, what's the point? Isn't What's the specific use-case of allowing alias names with slashes (or .s for that matter)? After all an alias is just a name that you give to something more complex that you don't want to type each time. But I have the feeling you want to use it for "fakery" (pretending to be something, like an implicit catalog or a URL, when you're really an alias) |
Btw, I just remembered that JBang, internally, does make use of the fact that we can give aliases names with special chars. Heck we even store entire URLs it seems (although I have no idea why). This is done so we don't need to go look up the value of So to be honest I just don't know what's right or wrong anymore :-) |
The usecase is to have jbang catalog list show list of aliases using their implicit aliases. |
not sure if this is a bug or not....but I can do:
jbang catalog add --name xam.dk xam.dk
even though I can dojbang catalog list xam.dk
shouldn't we allow aliases with .'s or is that going too far to be able to list https://... based catalogs?
The text was updated successfully, but these errors were encountered: