all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ben Woodcroft <b.woodcroft@uq.edu.au>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: [PATCH] Add rubygems updater.
Date: Fri, 08 Jan 2016 19:18:37 +0100	[thread overview]
Message-ID: <87bn8wdjeq.fsf@gnu.org> (raw)
In-Reply-To: <568BCBDB.1010308@uq.edu.au> (Ben Woodcroft's message of "Tue, 5 Jan 2016 23:57:47 +1000")

Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:

> On 04/01/16 00:06, Ludovic Courtès wrote:
>> Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:
>>
>>> On 03/01/16 06:54, Ludovic Courtès wrote:
>>>> Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:
>>>>
>>>>> On 02/01/16 04:17, Ludovic Courtès wrote:
>>>>>> Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:
>> [...]
>>
>>>>>>> +     `(#:phases
>>>>>>> +       (modify-phases %standard-phases
>>>>>>> +         (replace 'check
>>>>>>> +           (lambda _
>>>>>>> +             (zero? (system* "ruby" "-Ilib" "-r" "ansi")))))))

[...]

>>>      (build-system ruby-build-system)
>>>      (arguments
>>>       `(#:import "ansi"
>>>         #:tests? #f)) ; tests require circular dependencies
>> The problem is that the “-Ilib” in the command above cannot be guessed,
>> can it?
> My understanding is that the the "-Ilib" is almost invariant because
> putting imported code in the lib subdirectory is a convention that
> most gems adhere to. In those cases where it fails, the 'check-import
> phase can be replaced or removed.

OK.  My point is that, since we’re talking about saving 4 lines of code,
we have to make sure that the default thing works for the vast majority
of Ruby packages.

> [..]
>>> We could even default this to the expected name of the library guessed
>>> from the name of the package when #:import is not given. However, this
>>> would unfortunately break packages that have been written outside of
>>> Guix, so I imagine you don't feel this is a good idea.
>> We could choose the package name as a default value, but often that’s
>> not going to work, notably because of the “ruby-” prefix.
>>
>> WDYT?
> Removing the "ruby-" from the package name sounds like a reasonable
> default, but won't work every time because some imports use
> underscores where some use dashes e.g. "minitest-pretty_diff".
>
> I'm keen to make sure you understand what I'm attempting to say
> though. By "default" I mean when the #:import flag is missing from
> arguments, "ruby -Ilib -r <guessed_package_name>" will be run. So if I
> have previously packaged a rubygem outside Guix and it is working
> fine, implementing the default might break my package making me
> unhappy. If you instead interpreted "default" as the guessed value
> that "guix import" generates, then that is less likely to end in
> unhappiness.

I was thinking of the #:import default value in ‘ruby-build-system’.

Using properties as Ricardo suggests woudln’t be any more concise than
using #:import "the-right-name".

Thanks,
Ludo’.

  parent reply	other threads:[~2016-01-08 18:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01  8:27 [PATCH] Add rubygems updater Ben Woodcroft
2016-01-01  9:28 ` Pjotr Prins
2016-01-01 11:18   ` Ben Woodcroft
2016-01-01 11:42     ` Pjotr Prins
2016-01-01 18:17     ` Ludovic Courtès
2016-01-02  0:11       ` Ben Woodcroft
2016-01-02 20:54         ` Ludovic Courtès
2016-01-03  0:50           ` Ben Woodcroft
2016-01-03 14:06             ` Ludovic Courtès
2016-01-05 13:57               ` Ben Woodcroft
2016-01-05 14:56                 ` Ricardo Wurmus
2016-01-08 18:18                 ` Ludovic Courtès [this message]
2016-01-02  3:43       ` Pjotr Prins

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=87bn8wdjeq.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=b.woodcroft@uq.edu.au \
    --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.