all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Rottmann <mail@r0tty.org>
To: guix-devel@gnu.org
Subject: Re: patch-shebang and Rust - Change on core-updates?
Date: Tue, 21 Jan 2020 00:24:30 +0100	[thread overview]
Message-ID: <87lfq1zp75.fsf@londo.h.r0tty.org> (raw)
In-Reply-To: 20200120202814.3ad015d0@scratchpost.org


[ Note that this is my first post on this list, and I'm posting via
  gmane, so if I'm messing something up, please let me know, either
  on-list, or in private, whichever you deem more appropriate ]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi,
>
> Rust uses #![...] for something that is definitely not a shebang
> (file-wide feature tests).
>
Just some background info regarding Rust syntax:

These are attributes applied to the enclosing file, common examples
including #![feature(...)] to enable nightly-only features,
#![deny(unsafe_code)], to deny the use of `unsafe` in the codebase
(crate), and more. As those need to be placed before any actual code,
and it is common for Rust files to not have preceding comments,
encountering those at the very start of the file, where a shebang could
occur, is indeed bound to be (and stay) a common occurence.

> Currently, our patch-shebang[1] emits a lot of warnings because of those.
>
> Should we change patch-shebang to ignore lines starting with "#![" ?
>
Note that Rust is not the only language that has a construct conflicting
with the sheebang pattern as described, e.g. #!r6rs or #!case-fold in
Scheme; there might be others as well. Wouldn't "#!/" work to detect
sheebangs reliably? Are there legitimate sheebangs that do not use an
absolute file name?

Regards, Rotty

  reply	other threads:[~2020-01-24 23:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 19:28 patch-shebang and Rust - Change on core-updates? Danny Milosavljevic
2020-01-20 23:24 ` Andreas Rottmann [this message]
2020-01-25 17:26 ` Ludovic Courtès
2020-02-17 15:55   ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfq1zp75.fsf@londo.h.r0tty.org \
    --to=mail@r0tty.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.