From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#48452: 28.0.50; flymake for elisp does not respect `load-path` Date: Thu, 14 Jul 2022 21:29:32 +0100 Message-ID: <87cze7780j.fsf@gmail.com> References: <8735unafob.fsf@gmail.com> <877d4hs084.fsf@gnus.org> <87v8s1untg.fsf@gmail.com> <874jzlp12v.fsf@gnus.org> <87wnchc75r.fsf@gmail.com> <87ilnzaa49.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Max Brieiev , 48452@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 14 22:29:10 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oC5SP-00069S-3x for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 22:29:09 +0200 Original-Received: from localhost ([::1]:53082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oC5SN-0000hz-N7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 16:29:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oC5SI-0000hd-1a for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 16:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oC5SH-0007zc-Pl for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 16:29:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oC5SH-00054b-Kw for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 16:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2022 20:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 48452-submit@debbugs.gnu.org id=B48452.165783050719464 (code B ref 48452); Thu, 14 Jul 2022 20:29:01 +0000 Original-Received: (at 48452) by debbugs.gnu.org; 14 Jul 2022 20:28:27 +0000 Original-Received: from localhost ([127.0.0.1]:38986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC5Ri-00053q-GS for submit@debbugs.gnu.org; Thu, 14 Jul 2022 16:28:26 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:33326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC5Rf-00053Z-Mi for 48452@debbugs.gnu.org; Thu, 14 Jul 2022 16:28:25 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id h17so4121977wrx.0 for <48452@debbugs.gnu.org>; Thu, 14 Jul 2022 13:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=trqLTpkbkGPDrDXN+QNO7I17dknYAaW2KSKYn9as4a8=; b=BEqOygPiGIanYklweeZvBuu8ZlY8cPe4n3dm3nKmO4IhPGEcKTSlG0+3MwQV0YCbep UIxgALWMCmkj4ee/xcDNZiXgVrzNEl7xt0A/WeIDd+czOvvWgvd9jgm5PxGhAYKbZHi3 2EMBfXPE2FFBtm+MylgNM4t40ZM5x+HgK0ytf39P7MaUpO+Msr9ci1iiqnbykyJwl0wt 4Dk1HIgtMxr4n1ysUXrG1ftBGeN1r9JZNfv2fck/mmPIt3LFHQi9CK/VBiS/SUGex3c5 iXPub5wcxa5ibsusnY8hjGYpV6HpEshiDSuZ0zlwbaPJWw/DjLR8pgyd8hE30l131zLP cRSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=trqLTpkbkGPDrDXN+QNO7I17dknYAaW2KSKYn9as4a8=; b=F52SYp6P74SU2BeMp/hDHKi0CP5X8t7xU2Eyg0VgxxIafuL0KXl7ybxI15m1wZ4OhZ 47MbrZsAv3dJtpf7FnmZtc63BbthG+Z5R3zLNBdGi7pUkGiMoUiyLpQKcrYGCv9qTM0J JpJHtlpC0VV6HgwkYFeg+HDfqP8a0BK7ILgR6nfQFCWMYPIMA8mlvaS/gI6fBq5Tj4ru nDGos3sZpjoEdMFb5E2bve+fMBgX2Du1SYWeSphbI4yJ/a84rMK77SYbsGeV+01uHMvN Woqt102AvH+nAcRIrVpxWtYTPe9a8ngbvOORDVty1lOENKszZumIWc7ET+K9higJ7+Y+ sIZQ== X-Gm-Message-State: AJIora+6Vx+vTJsEjL/FAh0XzQ6MqTcOTmiUvxvVBo915OJ/TvK2h/Fn ABej7RTBaV0DNz4nQ6gkFze0pZzVdag= X-Google-Smtp-Source: AGRyM1tK93ltzjPOdyf8KO1C4WTflaw2ms1GmN2hB9lS3TZBq4X6iaRD/T3ud3w4g1zM/dnqDVnl2A== X-Received: by 2002:a05:6000:12c8:b0:21d:6913:89af with SMTP id l8-20020a05600012c800b0021d691389afmr9704541wrx.546.1657830497295; Thu, 14 Jul 2022 13:28:17 -0700 (PDT) Original-Received: from krug ([87.196.72.111]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b003a04722d745sm7198259wmq.23.2022.07.14.13.28.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 13:28:16 -0700 (PDT) In-Reply-To: <87ilnzaa49.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 14 Jul 2022 19:15:50 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237040 Archived-At: Lars Ingebrigtsen writes: > Max Brieiev writes: > >> I think this issue can not be reproduced with emacs -Q, because in this >> case Elpa packages are not added to load-path. With emacs -Q, flymake >> will rightfully complain "No such file or directory", when you `(require >> 'any-elpa-package)` > > OK; so a way to reproduce this is to say (with "emacs -Q"): > > M-: (push (expand-file-name "~/.emacs.d/elpa/compat-28.1.1.1/") load-path) > M-x flymake-mode > > and then notice that there's a warning on > > (require 'subr-x) > (require 'compat) > > even though it can be required fine. > > I've added Jo=C3=A3o to the CCs; perhaps he has some comments. I think elisp-flymake-byte-compile-load-path is relevant here. elisp-flymake-byte-compile-load-path is a variable defined in `elisp-mod= e.el'. =20=20=20=20 Its value is ("./") =20=20=20=20 Like `load-path' but used by `elisp-flymake-byte-compile'. The default value contains just "./" which includes the default directory of the buffer being compiled, and nothing else. =20=20=20=20 This variable is safe as a file local variable if its value satisfies the predicate which is a byte-compiled expression. I don't usually develop packages in ~/.emacs.d/elpa, in fact developing packages there is kind of questionable IMHO, as they are normally not git checkouts. This is, AFAIK, straight.el's main raison d'etre, although I don't use that either. But it could make sense to add ~/.emacs.d/elpa/* to the variable, if the package you're developing somewhere else has a dependency on other Elpa packages. Although it's a safety hazard I guess (don't forget that the elisp-flymake-byte-compile backend runs compile-time code!). Or maybe add a `package-initialize` call in the Emacs -Q that elisp-flymake-byte-compile runs. But that'll probably slow checking down a bit, so i'd like to see some timings for the slowdown before&after. Or maybe, Max, you can just set this variable it in your file-local variables or the dir-locals.el of the package you're developing. Jo=C3=A3o