jbang icon indicating copy to clipboard operation
jbang copied to clipboard

change to use user|org-jbang-catalog

Open maxandersen opened this issue 3 years ago • 10 comments

at the moment we lookup jbang-catalog in orgs/users when searching for implicit catalog.

works great but when forking a repo the name is no longer unique and it becomes jbang-catalog-n.

should we instead look for user|org-jbang-catalog first, just jbang-catalog second.

i.e. jbang myapp@maxandersen would look for https://github.com/maxandersen/maxandersen-jbang-catalog before looking for https://github.com/jbang-catalog

maxandersen avatar Feb 10 '22 16:02 maxandersen

I'm not sure what problem you're trying to solve? In what case does a fork result in a different name? And even if the name would be jbang-catalog-n why could you not simply rename it to jbang-catalog?

quintesse avatar Feb 10 '22 17:02 quintesse

Try fork maxandersen/jbang-catalog and you'll see :)

maxandersen avatar Feb 10 '22 18:02 maxandersen

Well sure, but that's because I already have a jbang-catalog, it doesn't make sense to have more than one.

Edit: Tried it with a different org that doesn't have a catalog and it created it with the jbang-catalog name, as expected

quintesse avatar Feb 10 '22 18:02 quintesse

When you are contributing to multiple jbang catalogs it is useful

maxandersen avatar Feb 10 '22 18:02 maxandersen

Well sure, but why would we make that especially easy in Jbang? If I'm contributing to your repo it wouldn't be that hard to type jbang myapp@quintesse/maxandersen-jbang-catalog a couple of times, right? In fact it would surprise me greatly if after forking that repo jbang would suddenly, and silently, decide to use that instead of the original. And what if I do want to use the original again? Do I delete my fork? Do we add an option to override that behaviour? Dunno, for now at least I only see downsides to this.

quintesse avatar Feb 10 '22 19:02 quintesse

as it is today you would need to type: jbang myapp@quintesse/jbang-catalog-1 ..is that somehow better than the explicit name ?

maxandersen avatar Feb 10 '22 21:02 maxandersen

Well, whatever the name is that was given/you give to the fork.

I just don't see the advantage, but perhaps I'm blind :-) Can you show how the current way would be improved by this issue without at the same time making other things worse?

quintesse avatar Feb 10 '22 21:02 quintesse

I see that it creates jbang-catalog-1 if I do it in my own org that already has a jbang-catalog. But then I'd simply use jbang myapp@quintesse/jbang-catalog-1, right? That's not so bad. Now if I'm managing half a dozen of repos like that all named jbang-catalog-N then I'd of course rename them to something easier to remember.

quintesse avatar Feb 10 '22 21:02 quintesse

yeah, you would probably rename them to maxandersen-jbang-catalog, jbang-jbang-catalog, quarkusio-jbang-catalog and so forth :)

maxandersen avatar Feb 10 '22 23:02 maxandersen

heheh, too long, way too long :-)

quintesse avatar Feb 10 '22 23:02 quintesse