From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: More reliable byte compilation, take 45 Date: Tue, 05 Oct 2021 09:06:01 -0500 Message-ID: <87sfxfva5y.fsf@alphapapa.net> References: <87sfxhm5aw.fsf@gnus.org> <9bffb61b-c948-c431-4fb0-bbc74e91dfe2@gmail.com> <837des6479.fsf@gnu.org> <831r506025.fsf@gnu.org> <83r1cz4rjl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30145"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 05 16:07:29 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXl6O-0007c0-CJ for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 16:07:28 +0200 Original-Received: from localhost ([::1]:54200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXl6N-0002tL-9a for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 10:07:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXl5B-00027l-2M for emacs-devel@gnu.org; Tue, 05 Oct 2021 10:06:13 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:56806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXl59-0003k8-6d for emacs-devel@gnu.org; Tue, 05 Oct 2021 10:06:12 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mXl56-0005fY-Nn for emacs-devel@gnu.org; Tue, 05 Oct 2021 16:06:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:276332 Archived-At: Stefan Monnier writes: >> And that's all? Then why not fix that problem right away, it sounds >> like something that should be easy to fix. (Though I'm not sure I >> understand why "some other ELisp file was not loaded beforehand" -- is >> that a case of a missing 'require' or 'eval-when-compile' or somesuch?) > > Often the problem is with packages where you basically have to load > all/most the files before you can call any of its functions (because of > mutual dependencies between the files) and where the authors never > compile the code or only ever compile the code from a running session > where the files have already been loaded. > > Fixing those can be a pain in the rear, not only because of the amount > of code you need to move between files to disentangle the dependencies, > but also because it requires educating the authors about it (they may > not see the value/importance). > >> Ah, so the problem is with buggy *.el files, and only with them? > > Yes, tho the authors may disagree about the characterization of "buggy", > in the sense that it works reliably *if* you compile the code by running > their Makefile. FWIW, I mostly solved this kind of problem in my own packages by using makem.sh to lint compilation, which now compiles each file separately: https://github.com/alphapapa/makem.sh It detects project Elisp files automatically, so it doesn't require writing a Makefile or other configuration, which makes it easier for package authors to use.