[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package autoload
From: |
Juan Pablo Carbajal |
Subject: |
Re: package autoload |
Date: |
Fri, 15 Apr 2016 13:47:53 +0200 |
On Fri, Apr 15, 2016 at 11:28 AM, Olaf Till <address@hidden> wrote:
> Let me first say that I'm sorry to speak up so late, now that pkg
> autoload support recently has been removed. My excuse is that I think
> such things should be discussed thoroughly at the mailing list -- not
> only at OctConf or privately -- and I waited for this discussion,
> thinking it would happen before such a change will be made. Maybe I
> have just missed it, then it is wholly my fault.
>
> There are two effects of this change:
>
> 1. A package can't force itself to be automatically loaded.
>
> Most OF packages already complied to the policy not to do this, and
> there was no considerable additional effort caused by this, so no
> real objection from me here.
>
> 2. The user has to change a startup file if he wants a package to be
> always loaded.
>
> I think this is awkward, and I'd like to explain why.
>
> Consider the case that a user installs a package with the intention
> to have it always loaded. Then he has to make changes at two
> different places: installing with 'pkg' and changing a startup
> file. Having to make changes at two different places for something
> which is intentionally an entity is not perfect design.
>
> If a user uninstalls a package which was always loaded, he has to
> remove a line from the startup file. Otherwise he'll get an error
> at next startup, when pkg tries to load the package though it isn't
> installed anymore.
>
> If one often installs and uninstalls packages (assuming one wants
> them to be always loaded if installed), the necessary changes in
> a startup file are a nuisance.
>
> The things I mentioned as awkward could be avoided if there were a pkg
> command to permanently note that a package should be always loaded: At
> install, there'd be two different pkg commands necessary, or even only
> one pkg command with an additional option, not changes in the
> seemingly unrelated startup file. At uninstall, nothing additional
> would be necessary at all, since pkg would automatically forget the
> order to always load the package at package deinstallation.
>
> So at install, instead of:
>
> install package with pkg --- change startup file
>
> you would have:
>
> install package with pkg --- note package as autoload with pkg.
>
> These are effectively the same schemes, only the latter is cleaner and
> faster.
>
> At uninstall, instead of:
>
> uninstall package with pkg --- change startup file
>
> you would just have:
>
> uninstall package with pkg,
>
> of which the latter "scheme" is clearly shorter.
>
>
> Olaf
>
> --
> public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
Olaf, wasn't you who recently argued in favor of following matlab
behavior regarding packages?
Toolboxes in matlab do not autoload (nor in any other language that I
know) without one modifying some startup file or including the toolbox
every time.
I might be wrong regarding the latest matlab versions. But if I am not
wrong, I must say that supporting opposing policies for similar Octave
behaviors is not helping us converge to a consensus.
- package autoload, Olaf Till, 2016/04/15
- Re: package autoload,
Juan Pablo Carbajal <=
- Re: package autoload, Ben Abbott, 2016/04/15
- Re: package autoload, LachlanA, 2016/04/15
- Re: package autoload, oheim, 2016/04/15
- Re: package autoload, Olaf Till, 2016/04/15
- Re: package autoload, LachlanA, 2016/04/16
- Re: package autoload, Olaf Till, 2016/04/16
- Re: package autoload, PhilipNienhuis, 2016/04/16
- Re: package autoload, Oliver Heimlich, 2016/04/16
- Re: package autoload, PhilipNienhuis, 2016/04/17
- Re: package autoload, Ben Abbott, 2016/04/15