zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: A serious bug in execution – where to debug?
Date: Tue, 30 Jul 2019 22:08:58 +0200	[thread overview]
Message-ID: <CAN=4vMrfqHtuF70Z7Gra3swhqxtxq=p90zAjep-_o6uQCre73w@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVBpobEpDRN7Hd-QBixDkOv+G_ORdQCtrU4MGqQoxmHCtw@mail.gmail.com>

On Tue, Jul 30, 2019 at 9:59 PM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> On Tue, 30 Jul 2019 at 21:42, Roman Perepelitsa
> <roman.perepelitsa@gmail.com> wrote:
> >
> > On Tue, Jul 30, 2019 at 9:34 PM Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> >>
> >> On Tue, 30 Jul 2019 at 21:24, Roman Perepelitsa
> >> <roman.perepelitsa@gmail.com> wrote:
> > I think we are in agreement. If there is a public function to unload, you can call it. If there isn't, it's a missing feature that cannot be provided by anyone other than the code's author. it's not possible to safely unload code as a blackbox without knowing all of its implementation details.
>
> Yes, but that's in general. I have very positive experiences with
> unloading of prompts. Currently in my setup by setting parameter
> MYPROMPT=1..8 I can choose the prompt that's active, as described in:
> http://zdharma.org/zplugin/site/Multiple-prompts/. In general it is
> like you've said, e.g. syntax-highlighting plugin's won't unload
> correctly, but only due to a final glitch and as I tested now, it
> *did* unload correctly (due to changes in my setup, most probably).
> But in general yes, plugins often do not unload fully clean, so I
> think that we are in agreement.

I'm not above some dirty hacks myself but you have to be clear with
your messaging if you are inviting others to use your code. If your
code may or may not work, can leak resources and corrupt files
(corrupting .git is pretty bad), can work today and stop working
tomorrow after an update, -- you might want to mention it.

>
> > Both gitstatusd and p10k do provide public functions for unloading. You are welcome to call them. They guarantee that repeated load+unload won't leak resources. That is, as long as you don't unset any of their internal variables. They do leave a handful of global parameters after unloading; without them they cannot be loaded correctly again.
>
> Could the function powerlevel10k_unload_plugin() be provided? I could
> deduce it from the plugin's name and call it in a general manner.

I have no objections against your providing this function, although I
would prefer that you didn't use "powerlevel10k" prefix to avoid
potential name clashes in the future. As long as it calls only the
public functions of p10k, it won't break when p10k evolves.

Roman.

  reply	other threads:[~2019-07-30 20:59 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 [this message]
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
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=4vMrfqHtuF70Z7Gra3swhqxtxq=p90zAjep-_o6uQCre73w@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --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).