guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add rubygems updater.


From: Ludovic Courtès
Subject: Re: [PATCH] Add rubygems updater.
Date: Sun, 03 Jan 2016 15:06:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ben Woodcroft <address@hidden> skribis:

> On 03/01/16 06:54, Ludovic Courtès wrote:
>> Ben Woodcroft <address@hidden> skribis:
>>
>>> On 02/01/16 04:17, Ludovic Courtès wrote:
>>>> Ben Woodcroft <address@hidden> skribis:

[...]

>>>>> +     `(#:phases
>>>>> +       (modify-phases %standard-phases
>>>>> +         (replace 'check
>>>>> +           (lambda _
>>>>> +             (zero? (system* "ruby" "-Ilib" "-r" "ansi")))))))
>>>> The only case where this would make a difference is for leaf packages,
>>>> no?  In all the other cases, building dependent packages will ensure
>>>> that the package at hand works as expected.
>>> Sure, but even in the case where they aren't leaf packages at least
>>> the build error gets thrown when building the package at
>>> fault. There's also the important difference that it makes the
>>> packager feel less bad about the disappointing lack of tests or the
>>> necessity of disabling them because of circular dependencies.
>> Right.  The only downside I can think of is if packagers have to copy
>> the above 4 lines in each and every package.  Can you think of a way
>> that would avoid that?
> I have only been adding these in cases where testing is impossible,
> but we could make it a wider policy.
>
> We could bake it into the build system, by adding an optional argument
> #:import so that you could do
>
>     (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?

> Probably in that case makes sense to have a new phase 'check-import so
> that more complex cases can be handled, rather than replacing
> 'check.

Agreed.

> There's no way to run this phase with the native-inputs disappeared is
> there so it more closely mirrors a user's experience?

Not easily.  The phase would have to recompute the RUBYPATH (or whatever
it’s called.)

> 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?

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]