zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Daniel Shahaf <d.s@daniel.shahaf.name>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: A serious bug in execution – where to debug?
Date: Wed, 31 Jul 2019 15:34:20 +0200	[thread overview]
Message-ID: <CAN=4vMp86TbNcBh3qRKcCEvagqVvEf4kjBmORmNFhPYqAoY0FA@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVCeNC=OE87QECJM=YsnRHbUn4prrYFFFnXqpeoa3gjVbQ@mail.gmail.com>

On Wed, Jul 31, 2019 at 3:10 PM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> This particular case will be solved if the plugin will use
> add-zle-hook-widget instead of wrapping (support for this isn't yet in
> zplugin, but it'll be there soon).

Unfortunately, using add-zle-hook-widget is no-no. If you use it while
other plugins are still wrapping widgets old-school, you can cause
infinite loops. All plugins have to be switched to add-zle-hook-widget
at the same time, which is pretty much impossible. Hopefully someone
will care enough to fix add-zle-hook-widget but the benefits are
difficult to see. Wrapping widgets works fine. It breaks zplugin's
unloading code but the same can be said about pretty much everything.

> To sum up, your opinion is a mathematical-like proof that:
>
> * You cannot implement an unloading that just works as expected.
>
> While my opinion is a practical-view -like point that:
>
> * You can often get good results with unloading, just try & test it
> first with the plugin that you need to unload.

Both statements are true.

What I don't like is the implication of offering a
maybe-works-maybe-doesn't unloading mechanism. It creates an
expectation that plugins must be unloadable not via their public APIs
but through brutal and unceremonious deletion of their internal
parameters, widgets and so on. If something breaks during unloading,
users may not even realize they've grown to rely on hacks and that
their shell configuration is unsupported. They can reasonably reach
out to the "malfunctioning" plugin's developers and ask them to fix
the "issue". It's like selling rocks as a tool to turn off TV sets.
Just throw a rock at the TV and it'll turn off! If it breaks your TV,
please don't complain to your TV manufacturer.

I also have intense emotional reaction to this kind of unloading. It
just feels rude to modify internal implementation details of software.
It's one thing to do it with code that only you yourself use, or to
apply this sort of dirty patching to a product you are intimately
familiar with, but it's quite another to distribute this crude tool as
a feature. It's disrespectful to the developers whose code is
brutalized, and it causes extra strain on them due to bug reports by
the affected users.

Roman.

  reply	other threads:[~2019-07-31 13:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 17:00 Sebastian Gniazdowski
2019-07-30 17:05 ` Sebastian Gniazdowski
2019-07-30 17:41 ` Roman Perepelitsa
2019-07-30 17:55   ` Sebastian Gniazdowski
2019-07-30 18:12     ` Roman Perepelitsa
2019-07-30 18:16       ` Sebastian Gniazdowski
2019-07-30 18:22         ` Roman Perepelitsa
2019-07-30 18:53           ` Sebastian Gniazdowski
2019-07-30 19:23             ` Roman Perepelitsa
2019-07-30 19:34               ` Sebastian Gniazdowski
2019-07-30 19:41                 ` Roman Perepelitsa
2019-07-30 19:59                   ` Sebastian Gniazdowski
2019-07-30 20:08                     ` Roman Perepelitsa
2019-07-30 20:38                       ` Sebastian Gniazdowski
2019-07-30 18:27 ` Bart Schaefer
2019-07-30 18:46   ` Sebastian Gniazdowski
2019-07-30 21:02     ` Roman Perepelitsa
2019-07-30 21:38       ` Sebastian Gniazdowski
2019-07-30 21:45         ` Roman Perepelitsa
2019-07-30 21:54           ` Sebastian Gniazdowski
2019-07-30 22:11             ` Roman Perepelitsa
2019-07-30 22:18           ` Daniel Shahaf
2019-07-30 22:32             ` Roman Perepelitsa
2019-07-31  1:30               ` Sebastian Gniazdowski
2019-07-31  7:23                 ` Roman Perepelitsa
2019-07-31 11:41                   ` Sebastian Gniazdowski
2019-07-31 12:40                     ` Roman Perepelitsa
2019-07-31 13:10                       ` Sebastian Gniazdowski
2019-07-31 13:34                         ` Roman Perepelitsa [this message]
2019-07-31 13:40                           ` Sebastian Gniazdowski
2019-07-31 14:11                             ` Roman Perepelitsa
2019-07-31 17:56                               ` Sebastian Gniazdowski
2019-07-31  1:42               ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN=4vMp86TbNcBh3qRKcCEvagqVvEf4kjBmORmNFhPYqAoY0FA@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).