Subject: Re: [bug#34222] [PATCH 11/15] gnu: Add ruby-cliver.

From: Christopher Baines <[email-masked]>
Date: Sun, 27 Jan 2019 18:48:34 +0000

Ricardo Wurmus <[email-masked]> writes:

> Christopher Baines <[email-masked]> writes:
>
>> Requirement of ruby-parser.
>>
>> * gnu/packages/ruby.scm (ruby-cliver): New variable.
> […]
>
>> +    (arguments
>> +     '(#:phases
>> +       (modify-phases %standard-phases
>> +         ;; Avoid this issue with rspec@2
>> +         ;; NoMethodError: undefined method `last_comment'
>> +         (replace 'check
>> +           (lambda* (#:key tests? #:allow-other-keys)
>> +             (when tests?
>> +               (invoke "rspec"))
>> +             #t)))))
>> +    (native-inputs
>> +     `(("bundler" ,bundler)
>> +       ("ruby-rspec" ,ruby-rspec-2)))
>
> Is this a problem that would disappear when using a later version of
> Rspec?

I don't think so, I get a different exception which looks to me like an
incompatibility between the tests and rspec@3 in Guix. This
`last_comment' related error is a issue between Rspec 2 and more recent
versions of Rake, and I've updated the comment as below to try and
explain this.

+    (Build-system ruby-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
+         ;; would be nice, but the tests look to be incompatible:
+         ;;
+         ;; NoMethodError: undefined method `last_comment'
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "rspec"))
+             #t)))))