Enabling java community to have easier access to jbang "friendly" java projects #1733
Replies: 2 comments 15 replies
-
So the first part of this is clear to me and seems like a good idea. It's the second proposal that I'm somewhat leery about. Messing about with (even more) magic symbols just seems very unintuitive. Personally I'm already not extremely happy with what we currently have (and I designed it) and this just seems to complicate it even more. I understand it would be very easy to just be able to do We can already name catalogs, you can for example say We can already add catalogs to catalogs (I'm actually not really sure how we're using that or if we're even using that as of today, so perhaps that's an opportunity) so imagine something like this:
(Btw, right now you can't add catalogs this way, that would need to be implemented) This would allow for short aliases in daily use and still leave open the possibility that at some point the sqlline devs decide to support JBang directly, and a simple |
Beta Was this translation helpful? Give feedback.
-
As an experiment I started to add content to https://github.com/jbanghub. Thoughts made from chatting with @quintesse was that we would default import this catalog so all its catalogs would be available to users. Kinda felt like how we would have done appstore from the start if we knew then what we know today... Idea was to make it so sqlline@sqlline would end up resoling to sqlline@jbanghub/sqlline and if sqlline one day made their own we could just point to it. But after adding content to jbanghub I've kinda pulled back from it - because its hard to name things :) i.e. sqlline is actually not in github.com/sqlline but in github.com/julianhyde/sqlline - so sqlline catalog name is kinda globally namesquatting sqlline....but also it removes julianhyde...and maybe julianhyde likes that is how to refer to...so we could add julianhyde/sqlline alias - but then it starts looking like its him who manages it ... of course julianhyde here is just used as an example, it could be same with orgs/corporations like apple, microsoft, eclipse etc. Thus for now I've gone with NOT having jbanghub use its power of default imported and instead added things that are in jbanghub/* org as This means there is actual value for people to add their own jbang-catalog even if jbanghub has something that maps to it, if they do that there shorthand name wins automatically. For example, I added jbanghub/eclipse - it has ecj and transformer cli in it at this stage. ...and if we do this - we could still add the notion of no catalog means jbanghub...so This gives consistency and control to the original authors but jbang community can also easily add commands and have them visible. wdyt - am I overthinking it ? and should we do the shorthand form or just stay with enabling jbanghub as a "thing"? |
Beta Was this translation helpful? Give feedback.
-
For the last few years I've been proposing various projects I saw could benefit from having a jbang-catalog.
Often the project is inside an org and I then propose to make a org wide jbang-catalog to shorten the name.
Sometime this succeeds http://github.com/microsoft/jbang-catalog (thanks @brunoborges), other times, it gets discouraged and sometimes even having any jbang-catalog gets rejected.
Most of the discouragement or rejection falls into one of two categories:
A) having a jbang-catalog in org or repo is felt like an overhead/unclear who maintain it
B) "no one asked for it"
Its a classical chicken-egg situation - if jbang was well-known and fully understood this would not be a problem but to become well-known and fully understood need to have it more used.
I fully get the resistance and sometime it just wont happen...but even if others don't use jbang-catalog in their project I really would like to make it easy for anyone to use other peoples great software.
I've resisted adding various commands to jbangdev central catalog as I much rather prefer each project to own their tooling experience; but I also see that for some projects its just not going to happen...so can we make a community driven approach that does not hurt or offend project owners and encourage them to adopt owning their jbang catalogs?
In a conversation with @parttimenerd he had some ideas and suggestions that made think if we could find a way to improve this.
jbangapp/jbang-catalog
One way of doing this would be to add aliases to a central jbang catalog. It can't be jbangdev/jbang-catalog as it is automatically blessed and I don't want to accidentally expose jbang users to a security issue; but it could be i.e. jbangapp/jbang-catalog making
jbangapp
the key name. (I'm not married to jbangapp but so far all my other ideas (jtool, javaapp, jbox, ..) was taken or had trademark issues)Idea is that in that org we or anyone else can submit PR's to add their favorite set of tools.
i.e.
sqlline
who don't want a catalog would then be made available to anyone by usingjbang sqlline@jbangapp
or ap-profiler could shorten theirjbang jfr2flame@jvm-profiling-tools/ap-profiler
tojbang jfr2flame@jbangapp
.The advantages of this are that:
The downsides are:
...those downsides and in particular the latter two is what has kept me away from doing it until now - but I'm also feeling we've tried for a few years now to get project owners to adopt it so something has to give.
Thus I'm inclined to say - lets go make jbangapp a thing. Yes, it won't be most efficient, it wont give stable versioning but it will make every awesome tool available more or less instantly.
For the latter part of possibly offending/discouraging @parttimenerd gave an idea...and i think maybe @quintesse proposed similar in the past:
global aliases for catalogs
(sorry - need a better name)
This idea is that on top of jbang's ability to resolve catalogs available on github/gitlab/bitbucket (
jbang playwright@microsoft
) and DNS names (i.e.jbang [email protected]
refers to https://xam.dk/jbang-catalog.json) we would have a new mechanism that jbang to have aliases looked up in another catalog.ie.
jbang sqlline@@sqlline@
orjbang jfr2flame@@ap-loader@
would be "expanded" according to a file bundled in jbang or even from github.com/jbangdev/jbang-catalog somewhere that defines whatever@ap-loader@
shuold get expanded to.It could be
jvm-profiling-tools/ap-loader
or it could bejbangapp/jbang-catalog
...and it could change over time.This keeps the association to the project name (i.e. ap-loader) and makes it possible to make even shorter.
This global alias would be truly global - if users want custom aliases just use the existing alias mechanism; but with this we have the ability to offer an approach to spread the awesomeness of jbang while still recognizing project owners names/repo.
It could also backfire and many will be upset it does not make it clear jbangapp is the "owner" of it.
@parttimenerd suggested this could be alleviated by having jbang print out when it resolves @ap-line@ so its visible it comes from jbangapp or jvm-profiling-tools/ap-profiler.
WDYT ? Do one or the other or both?
p.s. I grabbed https://github.com/jbangapp already :)
Beta Was this translation helpful? Give feedback.
All reactions