unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: 35588@debbugs.gnu.org
Subject: bug#35588: [PATCH] ui: Search matches additional package outputs.
Date: Mon, 06 May 2019 11:32:12 +0200	[thread overview]
Message-ID: <87muk0kjxf.fsf@gnu.org> (raw)
In-Reply-To: <87bm0g6jbp.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> (Chris Marusich's message of "Mon, 06 May 2019 02:08:58 -0700")

Hello,

Chris Marusich <cmmarusich@gmail.com> skribis:

> Tobias Geerinckx-Rice <me@tobias.gr> writes:
>
>> Here's a patch to match package outputs (except ‘out’, since it can't affect the relative score) in ‘guix search’.
>
> Wow, thank you for the quick patch!  Indeed, it works as advertised.
>
> That said, I see that your patch only omits the "out" output, and it
> also changes the way the regular expression matching works for all
> fields.

Yeah, how does this regexp/newline related to matching outputs, Tobias?

> What do you think of this solution?  I think it's a little more drastic,
> but it feels cleaner to me.  If I'm bike shedding, feel free to call me
> out on that!  ;-)

FWIW I find it a bit too drastic.  :-)  It leads to much verbosity and
I’m not sure this is warranted.

>  (define %package-metrics
>    ;; Metrics used to compute the "relevance score" of a package against a set
>    ;; of regexps.
> -  `((,package-name . 4)
> -
> +  `((,(lambda (package)
> +        (list (package-name package)))
> +     . 4)
> +    ;; Match against uncommon outputs.
> +    (,(lambda (package)
> +        (filter (lambda (output)
> +                  (not (member output
> +                               ;; Some common outpus shared by many packages.
> +                               '("out" "debug" "doc" "static"))))
> +                (package-outputs package)))
> +     . 1)

Could we have just this hunk or is there something I’m missing that
would make it insufficient?

Thank you,
Ludo’.

  reply	other threads:[~2019-05-06  9:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-05 19:39 bug#35588: guix package --search does not search output names Chris Marusich
2019-05-05 21:41 ` bug#35588: [PATCH] ui: Search matches additional package outputs Tobias Geerinckx-Rice
2019-05-06  9:08   ` Chris Marusich
2019-05-06  9:32     ` Ludovic Courtès [this message]
2019-05-07  0:57       ` Chris Marusich
2019-05-07  8:25         ` Ludovic Courtès
2019-05-08  6:50           ` bug#35588: [PATCH] ui: Search matches additional package outputs., " Chris Marusich
2019-05-08 10:39             ` Ludovic Courtès
2019-05-09  7:22               ` Chris Marusich
2019-05-07 22:24         ` swedebugia

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=87muk0kjxf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=35588@debbugs.gnu.org \
    --cc=cmmarusich@gmail.com \
    /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).