unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fwd: Re: [Patch] ruby-byebug@9.0.5
       [not found] <57580FE8.7070800@uq.edu.au>
@ 2016-06-08 22:57 ` Ben Woodcroft
  0 siblings, 0 replies; only message in thread
From: Ben Woodcroft @ 2016-06-08 22:57 UTC (permalink / raw)
  To: guix-devel@gnu.org, Matthew Jordan

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]


This got bounced from the list for being over the attachment size limit, 
so sending again with gzipped build.log

On 06/06/16 07:22, Matthew Jordan wrote:
> Good Day Ben Woodcroft,
>
> This is what I have so far, although I'm not that familiar with byebug
> though. I'll try to dig a bit deeper to get a better understanding of
> what's going on.

Thanks for looking into it.

[..]
>> I had a go at re-enabling tests which were disabled in the original
>> package - see the attached patch. Unfortunately it is still failing a
>> few tests. Would you like to take a look into why this might be?
> Here a summary of test info. The test
> "Byebug::SaveTest#test_save_shows_a_success_message" seems to fail cause
> it's looking for a file in a home directory that doesn't exist. Setting
> the HOME variable seems to solve that.

Good plan. I'm not sure how you set HOME in your package, but setting it
to /tmp seems to give less errors, though there is still 4 of them.

The first one seems to be due to "File.realpath" returning a form the
test isn't expecting:

e.g. expected;
   "--> #0 Byebug::ByebugTest201606081021q3p5qfClass.to_int(str#String)
at
/tmp/nix-build-ruby-byebug-9.0.5.drv-0/byebug_test20160608-102-1q3p5qf.rb:16
observed
   "--> #0 Byebug::ByebugTest201606081021q3p5qfClass.to_int(str#String)
at
.../tmp/nix-build-ruby-byebug-9.0.5.drv-0/byebug_test20160608-102-1q3p5qf.rb:16",

This might be fixable by patching line 76 of this file:
https://github.com/deivid-rodriguez/byebug/blob/24ad09b8f84531a7d5b112e6e7932bbc13fb7086/test/support/test_case.rb

I've not had time to look at the other tests, some are the same as the
errors you found. Are you able to take a look please?

Thanks,
ben




[-- Attachment #2: 0001-gnu-ruby-byebug-Update-to-9.0.5.patch --]
[-- Type: text/x-patch, Size: 2795 bytes --]

From c323ab6c9d1e9d8cfa7f6b879e17826f7e1ef62e Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Thu, 2 Jun 2016 22:06:46 +1000
Subject: [PATCH] gnu: ruby-byebug: Update to 9.0.5.

* gnu/packages/ruby.scm (ruby-byebug): Update to 9.0.5.
[source]: Use 'GitHub' source.
[arguments]: Enable tests.
[native-inputs]: Add dependencies for tests.
---
 gnu/packages/ruby.scm | 40 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 36 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 527f76b..327a6a4 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -2757,17 +2757,49 @@ with PostgreSQL 8.4 and later.")
 (define-public ruby-byebug
   (package
     (name "ruby-byebug")
-    (version "6.0.2")
+    (version "9.0.5")
     (source
      (origin
        (method url-fetch)
-       (uri (rubygems-uri "byebug" version))
+       (uri (string-append
+             "https://github.com/deivid-rodriguez/byebug/archive/v" version
+             ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0537h9qbhr6csahmzyn4lk1g5b2lcligbzd21gfy93nx9lbfdnzc"))))
+         "0apgk5d2s68rzmzli09ryqigbk2nx7k5r01qw0iz51pp7m7hm34l"))))
     (build-system ruby-build-system)
     (arguments
-     '(#:tests? #f)) ; no tests
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Most of the dependencies are not needed for building and testing,
+         ;; so remove them.
+         (add-before 'build 'remove-dependencies
+           (lambda _
+             (substitute* "Gemfile"
+               (("gem .*") ""))
+             (substitute* "Rakefile"
+               (("require 'chandler/tasks'") ""))
+             #t))
+         ;; Tests require an installed gem, so run tests after install phase.
+         (delete 'check)
+         (add-after 'install 'check-after-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (setenv "HOME" "/tmp")
+             (setenv "GEM_PATH"
+                     (string-append
+                      (getenv "GEM_PATH")
+                      ":"
+                      (gem-home (assoc-ref outputs "out")
+                                ,(package-version ruby))))
+             (and (system* "rake" "compile")
+                  (zero? (system* "rake" "test"))))))))
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-yard" ,ruby-yard)
+       ("ruby-rake-compiler" ,ruby-rake-compiler)
+       ("ruby-simplecov" ,ruby-simplecov)
+       ("ruby-pry" ,ruby-pry)))
     (synopsis "Debugger for Ruby 2")
     (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
 TracePoint C API for execution control and the Debug Inspector C API for call
-- 
2.7.4



[-- Attachment #3: build.log.gz --]
[-- Type: application/gzip, Size: 61930 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-08 22:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <57580FE8.7070800@uq.edu.au>
2016-06-08 22:57 ` Fwd: Re: [Patch] ruby-byebug@9.0.5 Ben Woodcroft

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).