From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Safety of elisp-flymake-byte-compile (Was Re: [Emacs-diffs] scratch/allow-custom-load-paths) Date: Fri, 14 Dec 2018 07:15:42 -0500 Message-ID: References: <20181204233600.7907.75252@vcs0.savannah.gnu.org> <20181204233601.273DD209DC@vcs0.savannah.gnu.org> <87sgz89mpu.fsf_-_@gmail.com> <87mupe9qqw.fsf@gmail.com> <87in019dle.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544789645 8800 195.159.176.226 (14 Dec 2018 12:14:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2018 12:14:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 14 13:14:00 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXmLu-000299-Vg for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2018 13:13:59 +0100 Original-Received: from localhost ([::1]:33026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXmO1-00060z-HJ for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2018 07:16:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXmNo-00060h-Be for emacs-devel@gnu.org; Fri, 14 Dec 2018 07:16:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXmNi-0005Td-TB for emacs-devel@gnu.org; Fri, 14 Dec 2018 07:15:56 -0500 Original-Received: from [195.159.176.226] (port=46734 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXmNi-0005T0-JQ for emacs-devel@gnu.org; Fri, 14 Dec 2018 07:15:50 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gXmLZ-0001df-4q for emacs-devel@gnu.org; Fri, 14 Dec 2018 13:13:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:iFRUX7F2P8rGi7brOeNO0v/6AOo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231827 Archived-At: > This is orthonogal to the question right? I think for the time being we > can write some 'moderately-trusted-p (file)' function to hide that can > of worms. Indeed. Cute worms, by the way. >>> So as soon as I load eglot.el, or eglot.elc in the host Emacs, it would >>> start working? >> Right, or even as soon as eglot is in your load-path. > Hmmm, there appears to be a contradiction here, or maybe I'm missing > something. Can you explain exactly what will happen if I C-u M-x > byte-compile-file the eglot.el file? That's the way I normally load .el > files: I usually don't put their directories in my load path unless they > have complicated dependencies, or I plan on keeping them in my config. If it is in your load-history, then it also qualifies to be "trusted", even if it's not in your load-path. >>> At least, the way I understand your solution for the "safe/unsafe" macro >>> problem it still doesn't seem to fix the fact that as soon as I type >>> "(launch-nuke)" into some already loaded macro in eglot.el, nukes are >>> potentially going to be launched by some unsuspecting macro-expansion >>> down below. >> Yup. That's the problem with the use of trust as a proxy for safety. > Yup x 2. With Flymake and macro expansions it's like you trust someone It's particularly serious when that someone is yourself, because when you mess up you can't even point fingers. Stefan