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 e625c3e1 for ; Wed, 31 Jul 2019 11:42:15 +0000 (UTC) Received: (qmail 15899 invoked by alias); 31 Jul 2019 11:42:06 -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: 44621 Received: (qmail 21940 invoked by uid 1010); 31 Jul 2019 11:42:06 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua1-f43.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.222.43):SA:0(-2.0/5.0):. Processed in 2.006839 secs); 31 Jul 2019 11:42:06 -0000 X-Envelope-From: sgniazdowski@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.222.43 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=TS9ta/R3DyJyymn0YQx1vgtocZJxG1KNjf8Rk1bLV3s=; b=MZGjPqG8Uk8Uv9hWqV0PQqwq7t/TYr7nhYbKVYQi6x5I/QcRQPnc6IPW8ty1A6DcxU LKu0px0uPPFQpgCOyo4/X1pUhwG3XTCLsTMIJRqb3+KeBLfXBJpDTD5R+5kfa8RfujGz E/8/mm2qs4Swq5rFE+jU7Esl7x4Go0LxXl6J7d+fhcm2C4DxpZqXeLC8XIFC2Z0m5YiU W910nqdfy7dVscX+TzZIwf2T4YuB9jrjWNCRcm7wUb5xOcXKNWXUbdzBBnLQe9FvnB7E F2SdgrX6I46w6vaXXyuOPrIQrZt0fVLafsjHqlrYhrLrJmrXOnltJrwJo+kxoj+4otbz X1uA== 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=TS9ta/R3DyJyymn0YQx1vgtocZJxG1KNjf8Rk1bLV3s=; b=UkCCXfyPSxzmZzO20NZyil0JTf4h8J46myehq7t5uIRlfsL9dREJmiLVbVSX/8QIpU 3luPaIqJTWa1i0MKItw3qKM/kWAKH4+we54Mls4AG5dr7W+98EhssdtvspbpXNFB5Y2P gswFlr2iTCCzqEPuFgTVz2Bem1cgzTNVegUy0kWcbiqhjmXYo2YIUC8IUMYLL9Ts6aJK nKppF4YMIyi55WVVGOZeFXOOAaVXbBC522+3MZS++sk3rVHVdfPVLkJzJlJC52VDKRpR SzAATY1jnLHf5lqg3gaB45SEAlPHSOLyB8mwgpLwAQ/4GXA4BlFl7hXAwrJg1FNkPWwk VYrQ== X-Gm-Message-State: APjAAAX9PDX2iU/SghBBrie/VDiaEk5thj9xQi5j4UoRzYUpuXVoCfQA GpoJax7hqSlqJ22jXBX2cZZMtMqU3i6yqjpWsog= X-Google-Smtp-Source: APXvYqzrr3ua3ndV3XR8eQZZG4OPnmkiCV82HMtbsyp3gw60dYl6jny2S/sYokXP/2hRGTWrDHmexmo34vHZMnGWTwc= X-Received: by 2002:ab0:2650:: with SMTP id q16mr36354476uao.7.1564573289518; Wed, 31 Jul 2019 04:41:29 -0700 (PDT) MIME-Version: 1.0 References: <49013421-774e-4389-a25d-680f1d97a8ef@www.fastmail.com> In-Reply-To: From: Sebastian Gniazdowski Date: Wed, 31 Jul 2019 13:41:17 +0200 Message-ID: Subject: =?UTF-8?Q?Re=3A_A_serious_bug_in_execution_=E2=80=93_where_to_debug=3F?= To: Roman Perepelitsa Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 31 Jul 2019 at 09:23, Roman Perepelitsa wrote: > > On Wed, Jul 31, 2019 at 3:30 AM Sebastian Gniazdowski > wrote: > > > > On Wed, 31 Jul 2019 at 00:39, Roman Perepelitsa > > wrote: > > > > > I'm on the fence on this issue. As long as I don't get too many bug > > > reports because of over-ambitious plugin managers, I'm fine. > > > > So Zplugin is considered an over-ambitious plugin manager by you? :) > > I meant over-ambitious in the specific sense mentioned above -- > advertising features that are not and cannot be implemented. > ... > Features whose > user-observable behavior cannot be described even in theory, and for > which an honest specification is tightly tied to their implementation > details, are over-ambitious. I'm not sure if this will not be "honest specification" (that is) "is tightly tied to their implementation details", but somewhat user-observable effects of zplugin unload procedure "described in theory" are: 1. Withdrawal of any bindkey call, i.e. if a plugin did bindkey ^T widget, then the binding will be deleted (restoring of previous binding is a TODO), including range bindings (bindkey -R). 2. Deletion of created keymaps (bindkey -N) and unlinking of the main keymap (bindkey -A). 3. Withdrawal of any zstyles (again, only deletion). 4. Withdrawal (i.e. deletion) and restoration (i.e. set up of the previous value) of aliases, including suffix and global aliases. 5. Withdrawal of zle created widgets (zle -N) =E2=80=93 restoration and del= etion. 6. Restoration of changed options. 7. Removal of added PATH and FPATH elements (adding of removed element is ready to be implemented, yet it wasn't needed) 8. Deletion of created functions 9. Removal of any added hooks 10. Unset of created global parameters (restoration of previous type's is a niche TODO). > Saying that zplugin can unload arbitrary > code is inaccurate at best and deceptive at worst. Maybe.. I think that it's an untold common truth shared by any user that Zplugin cannot be that smart to withdraw *any* sophisticated effect of a potential plugin. Claiming in an straightforward manner "Zplugin can unload plugins" is like a statement that encourages to acknowledge that *some serious* unloading is possible, that the shell isn't a black hole where things undergo untracked, in one direction only. Didn't you revise your opinion a little on unloading of plugins after reading the list from the previous paragraph? > What the user will actually see is unpredictable. I think that it's actually possible to predict to a large extent by looking at the list of unload-actions. > Spawning long-lived background processes that opt-out of job control > isn't uncommon among zsh themes and plugins. To be clear: I like the sophistication of the theme and see it as the right path. > Powerline, p10k, p9k, > zinc, pure all do it. So does zplugin, I believe. Zplugin forks (if you're talking about the `services' feature) or loads a binary zshell module zplugin.so. > Technical differences > in background process management make it impossible to implement clean > shutdown for these themes/plugins externally but they don't make them > over-ambitious. Ok, agreed. > Powerline does what it claims to do -- give you a > prompt with lots of colors and ornaments. No leaky abstractions, no > deception. I hope that by the second paragraph I've lessen the "deception" argument to a significant degree. > Having said that, I have no illusions about the utility of my public > zsh code. If all zsh plugins and themes would disappear overnight, I > don't know if the world would be better or worse off. This ecosystem > feeds on customization addiction after all. > > Roman. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org