From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: patch-shebang and Rust - Change on core-updates? Date: Sat, 25 Jan 2020 18:26:17 +0100 Message-ID: <87ftg3a1mu.fsf@gnu.org> References: <20200120202814.3ad015d0@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39810) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivPCQ-0007Tl-RX for guix-devel@gnu.org; Sat, 25 Jan 2020 12:26:24 -0500 In-Reply-To: <20200120202814.3ad015d0@scratchpost.org> (Danny Milosavljevic's message of "Mon, 20 Jan 2020 20:28:14 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org Hi, Danny Milosavljevic skribis: > Rust uses #![...] for something that is definitely not a shebang > (file-wide feature tests). > > Currently, our patch-shebang[1] emits a lot of warnings because of those. > > Should we change patch-shebang to ignore lines starting with "#![" ? > > If so, how? There's some get-char* magic that I don't understand. > > The easiest way would be to add peek-char after the two calls to get-char= *, > but not sure if that would work. > > Alternatively, we could adapt the regexp. > >>(define patch-shebang >> (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*= ([[:graph:]]*)(.*)$"))) > > The [[:graph:]]+ would have to change to something like=20 > > [[:graph-without-opening-bracket:]][[:graph:]]+ Or rather: /[[:graph:]]+ ? A real shebang has to be an absolute file name so it must start with a slash. If that works for you, I=E2=80=99d say it=E2=80=99s OK to do that on =E2=80= =98core-updates=E2=80=99. Thanks, Ludo=E2=80=99.