karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie G." <jamie.goody...@gmail.com>
Subject Re: [DISCUSS] Karaf 2.x and aliases for 3.x commands
Date Tue, 02 Oct 2012 12:01:01 GMT
+1, and yes the aliases are backwards - karaf 3 should support old namings.

On Tue, Oct 2, 2012 at 9:24 AM, Guillaume Nodet <gnodet@gmail.com> wrote:
> If we add a method to add all those aliases, it's easy to document and it
> still provides compatibility for code snippets.  It's not very difficult to
> add a warning "For karaf 2.x users, make sure you call enable-3x-aliases
> before running those scripts".
> I think it would really make the user experience better, as the whole goal
> of completion is screwed in 2.x, which is what all our users use daily.
> Btw, releasing 2.3.x with aliases to commands in 3.0.x which hasn't been
> released is not really a good idea in theory, since 3.0.x could still
> change.
> In fact, I think aliases should be the opposite.  We should have added
> backward compatible aliases in 3.0.x instead of adding forward compatible
> aliases in 2.x.  That's usually how compatibility is done.
> On Tue, Oct 2, 2012 at 1:08 PM, Christian Schneider <chris@die-schneider.net
>> wrote:
>> I think we should keep the aliases. The reason is that with the aliases we
>> can describe commands for 2.x and 3.x in the same way. (For example in
>> tutorials).
>> So people starting with a fresh karaf can see the same behaviour for 2.x
>> like for 3.x.
>> Instead I propose to provide a way to switch the aliases off. This allows
>> advanced users to switch the aliases off if they dont want them.
>> Christian
>> On 10/02/2012 10:26 AM, Guillaume Nodet wrote:
>>> I want to start this discussion because I really find the aliases
>>> annoying.
>>> In karaf 2.2.x, we added a few aliases for bundle:xx, package:xx and
>>> feature:xx commands and we are adding more into 2.3.x
>>> I dislike them because they break the whole completion system we have.
>>> If you type bun<tab>, it will complete to bundle and then stop because
>>> have bundle:xx and bundles:xx commands.
>>> If you then hit ':' as proposed, the command completion is not available
>>> anymore because the completion system can't know about aliases arguments
>>> (aliases are just functions, and no metadata is available for those).
>>> So I'd like to disable aliases by default, and instead, define a single
>>> function that could be called from the shell, or by default in
>>> etc/shell.init.script, that would enable all the aliases.
>>> So users could call this function (let's call it 'enable-3x-aliases') and
>>> that would register all the aliases instead of having them enabled by
>>> default.
>>> Thoughts ?
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> FuseSource, Integration everywhere
> http://fusesource.com

View raw message