From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 9ca4e826 for ; Tue, 30 Jul 2019 20:59:34 +0000 (UTC) Received: (qmail 28884 invoked by alias); 30 Jul 2019 20:09:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44607 Received: (qmail 1104 invoked by uid 1010); 30 Jul 2019 20:09:44 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25524. spamassassin: 3.4.2. Clear:RC:0(209.85.166.41):SA:0(-2.0/5.0):. Processed in 0.830994 secs); 30 Jul 2019 20:09:44 -0000 X-Envelope-From: roman.perepelitsa@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=EOYr0wnUWCEKBo/3nEErWuMcyUkGv8V9DgKSOz4T+QA=; b=W2qk5x28TDmHVpre9Gbw/EZ1GRRJCaSkafFRL3jb7xkVm0fAEpJOb8I+DHiTrzAYhA Y69BrAlbstLhsPdBfuMBuBugxmt3Ey0wg0Xl69IqwvxtktoMzh/gD/zN0wF44gVfhtWc Bo9WIFJOW8U+OaL3HpqW5ivkRWz5YkNZu/YzLOVLWr0t4s7hJSroBpOMYC0iubXDAVuY tG1vIBrnc6EIS8zqZnewM/5ywdyU0QUQ2JUO4Lqm38CAFIAZ9DQboYHsdC9lv5YR9mrH wSOciUDehV6w8ifnyFp9DySkkkpdi+1C9BqzB8z1EGe88jy/TtbMOcvsvOTp4/1IDwzr 9R5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EOYr0wnUWCEKBo/3nEErWuMcyUkGv8V9DgKSOz4T+QA=; b=SKcMSmnq+VguNK4eN5Qpd98Re01MFpenToN0DBLcUkVR9Xu4zKxKRRyVCjJJiHP/H0 U8Lak9bVLZI/RM0hJV8M+8x7242Z4nKd14bDcz2T8Hu4jwiNwRZBBUtwDvG3j/fUrLeh LU9EBY0rOyybVwZ2RcDhBYxjC8jxK9QDBj7pvc7QWw49wr4A7CJKcDKklo2Z/lsymwPc QaOW3w5f6SVUO3xTvKYrCjIyPtkTTx8kutR2UjUBWR9K6vPLAGE4vkjrhEhHS9sriJLl Xv4jGGQ9W7aYrEuuCDpzv0bYdFlquZyQbdRCfPHw9tW4lJWaFEBBm64gnTUj2n+4Zbeo jlSg== X-Gm-Message-State: APjAAAWz7k/kHGyWnGbFsM7O0Fx95TxqdxllbLA69JE/5q7zM6tsIs6b 2bCY45sR00KEbybcWgUQ4tSZvZqiQO4dKU4RVHCX0pKCmdw= X-Google-Smtp-Source: APXvYqx9p7dxVj+yzjizi154Kt/OJiuioN4u66Rb6c9JDvzdAjJaglH7U9ceRDsnYF3yQ+y5VUFPgBuwyctg3KcZuFc= X-Received: by 2002:a6b:e30a:: with SMTP id u10mr129189ioc.39.1564517350431; Tue, 30 Jul 2019 13:09:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Tue, 30 Jul 2019 22:08:58 +0200 Message-ID: Subject: =?UTF-8?Q?Re=3A_A_serious_bug_in_execution_=E2=80=93_where_to_debug=3F?= To: Sebastian Gniazdowski Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2019 at 9:59 PM Sebastian Gniazdowski wrote: > > On Tue, 30 Jul 2019 at 21:42, Roman Perepelitsa > wrote: > > > > On Tue, Jul 30, 2019 at 9:34 PM Sebastian Gniazdowski wrote: > >> > >> On Tue, 30 Jul 2019 at 21:24, Roman Perepelitsa > >> wrote: > > I think we are in agreement. If there is a public function to unload, y= ou can call it. If there isn't, it's a missing feature that cannot be provi= ded by anyone other than the code's author. it's not possible to safely unl= oad 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=3D1..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 l= eak resources. That is, as long as you don't unset any of their internal va= riables. They do leave a handful of global parameters after unloading; with= out 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.