From: paul <goodoldpaul@autistici.org>
To: Jelle Licht <jlicht@fsfe.org>, 41219@debbugs.gnu.org
Subject: [bug#41219] [PATCH 2/2] guix: Enforce package.json "files" directive.
Date: Tue, 22 Sep 2020 17:47:23 +0200 [thread overview]
Message-ID: <6730d1d5-38c7-22ee-ab4e-56430cd1b134@autistici.org> (raw)
In-Reply-To: <7bea951c-c8c8-cca9-4bfe-8d8f5c83e2ab@autistici.org>
Hi Jelle,
just a quick follow up that I forgot yesterday.
>>> + (map (lambda (path)
>>> + (string-drop path 2))
>> ^
>> If this is meant to drop the "./" prefix, you
>> should be able to leave it out.
>>
This seems to be necessary because given the way glob-match? is
implemented a string matches a pattern iif either they start with the
same character or the pattern starts with a wildcard. So for example:
scheme@(guix-user)> ,use (guix glob)
scheme@(guix-user)> (string->compiled-sglob "*.json")
$1 = (* ".json")
scheme@(guix-user)> (string->compiled-sglob "package.json")
$2 = "package.json"
scheme@(guix-user)> (glob-match? $1 "./package.json")
$3 = #t
scheme@(guix-user)> (glob-match? $2 "./package.json")
$4 = #f
Thank you again for your help,
Cheers
Giacomo
next prev parent reply other threads:[~2020-09-22 15:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 21:26 [bug#41219] Enforce "files" directive in node build system goodoldpaul
2020-05-12 21:30 ` goodoldpaul
2020-05-12 21:31 ` [bug#41219] [PATCH 1/2] guix: Add globstar support Giacomo Leidi
2020-05-12 21:31 ` [bug#41219] [PATCH 2/2] guix: Enforce package.json "files" directive Giacomo Leidi
2020-06-05 23:09 ` goodoldpaul
2020-09-19 15:15 ` paul
2020-09-20 19:51 ` Jelle Licht
2020-09-21 20:33 ` paul
2020-09-22 15:47 ` paul [this message]
2020-09-22 18:09 ` Jelle Licht
2020-10-18 23:32 ` paul
2020-10-19 13:44 ` paul
2020-10-24 13:23 ` Jelle Licht
2020-10-24 17:07 ` paul
2020-11-30 23:30 ` paul
2020-12-09 21:45 ` bug#41219: " Jelle Licht
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6730d1d5-38c7-22ee-ab4e-56430cd1b134@autistici.org \
--to=goodoldpaul@autistici.org \
--cc=41219@debbugs.gnu.org \
--cc=jlicht@fsfe.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).