From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21839 invoked by alias); 27 Sep 2015 15:28:43 -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: X-Seq: 36657 Received: (qmail 18467 invoked from network); 27 Sep 2015 15:28:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=MJad45tl c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=njW0-ZWh-xgBJBjIUkwA:9 a=CjuIK1q_8ugA:10 Date: Sun, 27 Sep 2015 16:28:35 +0100 From: Peter Stephenson To: Sebastian Gniazdowski Cc: zsh-workers@zsh.org Subject: Re: Static link of curses module Message-ID: <20150927162835.4297b94c@ntlworld.com> In-Reply-To: References: X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 27 Sep 2015 15:16:10 +0200 Sebastian Gniazdowski wrote: > Hello > Editing Src/Modules/curses.mdd, putting: > name=zsh/curses > link=static > load=yes > > to the beginning there (the script that's there by default doesn't > work) doesn't result in availability of the module (in the produced > zsh). (the above emended as in the follow-up). The infrastrcture for handling modules doesn't get much love and attention and is inadequate in many respects. (In constrast, so far as I know. the module code within the shell to deal with modules after the build system has done its job is generally effective.) Typically, you'd do this by editing config.modules rather than the .mdd file, but I think the result is the same. The module is correctly linked in statically, but isn't actually loaded until you use zmodload, or mark something for autoload and then use it. I'm not sure how this is supposed to work. I can see the module being registered automatically, but I don't see any evidence that there was ever a mechanism for running the request "load_module" based on load=yes. zsh/main is specially handled, as is zsh/zle and completion, and the autoload mechanism means that you can cause the module to be loaded based on configuration, but that looks like it. I may be looking in the wrong place. This isn't generally a problem --- you're generating a variant of the shell that has expectations about the availability of commands incompatible with standard builds, i.e. you can run zcurses without any preliminaries --- but is typical of the problems facing module developers. I don't see why bltinmods.list shouldn't be able to do the load_module() after the register_module() if load=yes, but I don't know why it doesn't. pws