[PATCH 0/6] Ruby related fixes in preparation for Ruby 2.5

  • Done
  • quality assurance status badge
Details
2 participants
  • Julien Lepiller
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 6 years ago
(address . guix-patches@gnu.org)
87ftxs7fii.fsf@cbaines.net
These patches are to support the use of Ruby 2.5 in Guix. All the
packages and dependant packages build with these changes with Ruby 2.4,
so I think these can be merged before Ruby 2.5 is added.

Christopher Baines (6):
gnu: bioruby: Update to 1.5.2.
gnu: ruby-shindo: Remove -rubygems flags.
gnu: ruby-term-ansicolor: Fix test for Ruby 2.5.
gnu: ruby-sass-spec: Fix spec expectation.
gnu: Add ruby-mathn.
gnu: ruby-sass: Update to 3.6.0.

gnu/packages/bioinformatics.scm | 4 +--
gnu/packages/ruby.scm | 59 +++++++++++++++++++++++++++------
2 files changed, 51 insertions(+), 12 deletions(-)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAluvVrVfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xc70Q//Uhba5O2f8jEjNiI7a4B2T7pkwwK4YfgfTtCj59wE5OT7nVBF1Kei6819
Bny0s3ZTdUdqgTawo/XMZNLzlnBHhBUGqlzUGmSEXuRA9Mf2bSYDnwhVtqwoKvdR
DFRkrc1S1xfSW4F+oA2vMmpTgF7NRGLMTEveKxNcJ6xMsbFgOGi8UlbdeMnJFt8J
l8IJySzKKgmfotF/DLazt8TKuvB6JTYjCjCNXYiTiP9rMKPHKDomN/+MhKRwQMeh
QKFNSo6G7AoDJhjOCFMfo4iEaIs8gUmrkYpgKFq4Kn79etQVxO+gK12qLZAde8yn
B4MGPAnAf9RLHBDZEZ3exZ6yOXewXWrKyBIsBgj0kX8sYNjCXNDtRtv9LrU5X/3h
+eJybGWs7cLdYE4QAKbsZYfj6sllbfwPR0dt079Xbq0BGtTg9+urFuytygbs7mqh
fcCRRLYwS8/lz5KH/if/t2NoeV1+c4F60IYcj7UggtuPTBO+BLM9u/3DGg3gTGQb
vmqXsawU0Vzj284IwB5GJo1e2ksgDyLA9PDW3+2ygwDPylaNQDzQj1jvX4XvvXCS
A0bJvKL8Y1vouCDdFxmQCzVP4hj6q1vSOMgFpwBApECNhxoQZ1gIemwYdxUJ6M50
wQDojSI2OAFWz8PTglgEjbyDPFwWI0jndzL2dvySpG1Rs8JO6v4=
=gcIF
-----END PGP SIGNATURE-----

Christopher Baines wrote 6 years ago
[PATCH 1/6] gnu: bioruby: Update to 1.5.2.
(address . 32870@debbugs.gnu.org)
20180929104502.8536-1-mail@cbaines.net
This works with Ruby 2.5.

* gnu/packages/bioinformatics.scm (bioruby): Update to 1.5.2.
---
gnu/packages/bioinformatics.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e74abf005f..be8731e5aa 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -6858,14 +6858,14 @@ generate FASTA, JSON, YAML, RDF, JSON-LD, HTML, CSV, tabular output etc.")
(define-public bioruby
(package
(name "bioruby")
- (version "1.5.1")
+ (version "1.5.2")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "bio" version))
(sha256
(base32
- "0hdl0789c9n4mprnx5pgd46bfwl8d000rqpamj5h6kkjgspijv49"))))
+ "1d56amdsjv1mag7m6gv2w0xij8hqx1v5xbdjsix8sp3yp36m7938"))))
(build-system ruby-build-system)
(propagated-inputs
`(("ruby-libxml" ,ruby-libxml)))
--
2.18.0
Christopher Baines wrote 6 years ago
[PATCH 2/6] gnu: ruby-shindo: Remove -rubygems flags.
(address . 32870@debbugs.gnu.org)
20180929104502.8536-2-mail@cbaines.net
These have been removed in Ruby 2.5.

* gnu/packages/ruby.scm (ruby-shindo)[arguments]: Change fix-tests phase to
also remove the -rubygems flags.
---
gnu/packages/ruby.scm | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 3673bf2346..b216f3f48b 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1211,12 +1211,15 @@ standard output stream.")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-tests
- (lambda _
- (substitute* "Rakefile"
- (("system \"shindo") "system \"./bin/shindo")
- ;; This test doesn't work, so we disable it.
- (("fail \"The build_error test should fail") "#"))
- #t)))))
+ (lambda _
+ (substitute* "tests/tests_helper.rb"
+ (("-rubygems") ""))
+ (substitute* "Rakefile"
+ (("system \"shindo") "system \"./bin/shindo")
+ ;; This test doesn't work, so we disable it.
+ (("fail \"The build_error test should fail") "#")
+ ((" -rubygems") ""))
+ #t)))))
(propagated-inputs
`(("ruby-formatador" ,ruby-formatador)))
(synopsis "Simple depth first Ruby testing")
--
2.18.0
Christopher Baines wrote 6 years ago
[PATCH 3/6] gnu: ruby-term-ansicolor: Fix test for Ruby 2.5.
(address . 32870@debbugs.gnu.org)
20180929104502.8536-3-mail@cbaines.net
* gnu/packages/ruby.scm (ruby-term-ansicolor)[arguments]: Add new fix-test
phase to fix a test that fails under Ruby 2.5.
---
gnu/packages/ruby.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (18 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index b216f3f48b..c039df1559 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -2914,6 +2914,11 @@ Ruby's large and slower test/unit.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-test
+ (lambda -
+ (substitute* "tests/hsl_triple_test.rb"
+ (("0\\\\\\.0%")
+ "0\\.?0?%"))))
(replace 'build
(lambda _
(invoke "gem" "build" "term-ansicolor.gemspec"))))))
--
2.18.0
Christopher Baines wrote 6 years ago
[PATCH 4/6] gnu: ruby-sass-spec: Fix spec expectation.
(address . 32870@debbugs.gnu.org)
20180929104502.8536-4-mail@cbaines.net
This fixes building ruby-sass with Ruby 2.5.

* gnu/packages/ruby.scm (ruby-sass-spec)[arguments]: Add patch-test phase to
fix the expectation of one of the tests.
---
gnu/packages/ruby.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index c039df1559..a7dd82cf02 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5457,7 +5457,14 @@ strings or files.")
("ruby-terminfo" ,ruby-terminfo)))
(arguments
;; No Rakefile
- `(#:tests? #f))
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-test
+ (lambda _
+ (delete-file "spec/values/colors/alpha_hex-3.5/error")
+ (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
+ (("string") "color")))))))
(home-page "https://github.com/sass/sass-spec")
(synopsis "Test suite for Sass")
(description "Sass Spec is a test suite for Sass. Test cases are all in
--
2.18.0
Christopher Baines wrote 6 years ago
[PATCH 5/6] gnu: Add ruby-mathn.
(address . 32870@debbugs.gnu.org)
20180929104502.8536-5-mail@cbaines.net
* gnu/packages/ruby.scm (ruby-mathn): New variable.
---
gnu/packages/ruby.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index a7dd82cf02..8fa13d8143 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5108,6 +5108,29 @@ are doing, you can fiddle with every last bit of your email directly.")
(home-page "https://github.com/mikel/mail")
(license license:expat)))
+(define-public ruby-mathn
+ (package
+ (name "ruby-mathn")
+ (version "0.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "mathn" version))
+ (sha256
+ (base32
+ "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
+ (build-system ruby-build-system)
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rake-compiler" ,ruby-rake-compiler)))
+ (synopsis "Extends math operations for increased precision")
+ (description
+ "This gem makes mathematical operations more precise in Ruby and
+integrates other mathematical standard libraries. Prior to Ruby 2.5,
+@code{mathn} was part of the Ruby standard library.")
+ (home-page "https://github.com/ruby/mathn")
+ (license license:bsd-2)))
+
(define-public ruby-code-statistics
(package
(name "ruby-code-statistics")
--
2.18.0
Christopher Baines wrote 6 years ago
[PATCH 6/6] gnu: ruby-sass: Update to 3.6.0.
(address . 32870@debbugs.gnu.org)
20180929104502.8536-6-mail@cbaines.net
* gnu/packages/ruby.scm (ruby-sass)[version]: Update to 3.6.0.
[source]: Update sha256.
[native-inputs]: Add ruby-mathn, as this is needed when using Ruby 2.5.
---
gnu/packages/ruby.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 8fa13d8143..874bab8ae3 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5497,18 +5497,19 @@ the @file{spec} directory.")
(define-public ruby-sass
(package
(name "ruby-sass")
- (version "3.5.7")
+ (version "3.6.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "sass" version))
(sha256
(base32
- "1sy7xsbgpcy90j5ynbq967yplffp74pvph3r8ivn2sv2b44q6i61"))))
+ "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
(build-system ruby-build-system)
(propagated-inputs
`(("ruby-sass-listen" ,ruby-sass-listen)))
(native-inputs
- `(("ruby-sass-spec" ,ruby-sass-spec)))
+ `(("ruby-sass-spec" ,ruby-sass-spec)
+ ("ruby-mathn" ,ruby-mathn)))
(home-page "http://sass-lang.com/")
(synopsis "CSS extension language")
(description "Sass is a CSS extension language. It extends CSS with
--
2.18.0
Julien Lepiller wrote 6 years ago
Re: [bug#32870] [PATCH 4/6] gnu: ruby-sass-spec: Fix spec expectation.
(address . guix-patches@gnu.org)
20180929141509.769b45d6@lepiller.eu
Le Sat, 29 Sep 2018 11:45:00 +0100,
Christopher Baines <mail@cbaines.net> a écrit :

Toggle quote (31 lines)
> This fixes building ruby-sass with Ruby 2.5.
>
> * gnu/packages/ruby.scm (ruby-sass-spec)[arguments]: Add patch-test
> phase to fix the expectation of one of the tests.
> ---
> gnu/packages/ruby.scm | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index c039df1559..a7dd82cf02 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -5457,7 +5457,14 @@ strings or files.")
> ("ruby-terminfo" ,ruby-terminfo)))
> (arguments
> ;; No Rakefile
> - `(#:tests? #f))
> + `(#:tests? #f
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'patch-test
> + (lambda _
> + (delete-file "spec/values/colors/alpha_hex-3.5/error")
> + (substitute*
> "spec/values/colors/alpha_hex-3.5/expected_output.css"
> + (("string") "color")))))))
> (home-page "https://github.com/sass/sass-spec")
> (synopsis "Test suite for Sass")
> (description "Sass Spec is a test suite for Sass. Test cases
> are all in

If you don't enable tests, why bother fixing them?
Christopher Baines wrote 6 years ago
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 32870@debbugs.gnu.org)
87efdc6ovm.fsf@cbaines.net
Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (36 lines)
> Le Sat, 29 Sep 2018 11:45:00 +0100,
> Christopher Baines <mail@cbaines.net> a écrit :
>
>> This fixes building ruby-sass with Ruby 2.5.
>>
>> * gnu/packages/ruby.scm (ruby-sass-spec)[arguments]: Add patch-test
>> phase to fix the expectation of one of the tests.
>> ---
>> gnu/packages/ruby.scm | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
>> index c039df1559..a7dd82cf02 100644
>> --- a/gnu/packages/ruby.scm
>> +++ b/gnu/packages/ruby.scm
>> @@ -5457,7 +5457,14 @@ strings or files.")
>> ("ruby-terminfo" ,ruby-terminfo)))
>> (arguments
>> ;; No Rakefile
>> - `(#:tests? #f))
>> + `(#:tests? #f
>> + #:phases
>> + (modify-phases %standard-phases
>> + (add-after 'unpack 'patch-test
>> + (lambda _
>> + (delete-file "spec/values/colors/alpha_hex-3.5/error")
>> + (substitute*
>> "spec/values/colors/alpha_hex-3.5/expected_output.css"
>> + (("string") "color")))))))
>> (home-page "https://github.com/sass/sass-spec")
>> (synopsis "Test suite for Sass")
>> (description "Sass Spec is a test suite for Sass. Test cases
>> are all in
>
> If you don't enable tests, why bother fixing them?

Good question, maybe the comment could be improved. The tests are for a
implementation of Sass, so in this case, the motivation is allowing
upgrading the ruby-sass package in Guix (which runs these tests) and the
general Ruby 2.5 upgrade.

Running the tests here would be a bit difficult with Guix, as you'd need
to avoid a circular dependency problem, but I think just running them
when build ruby-sass is fine.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAluv3Y1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcUCRAAgBcV19WgUExaRdkGu2DHL2Pujcc41+UFt3MNhJET/ZKUfmg2ntbQBo4Z
gVfsMGK0ME3+UxyWf7vi6baWk+cp1/NdKJc70NPdnkvaNkWkt0fkRO1UOyMokIbj
xV+znlBOpxW71405Z0nPj/qXn04divhvD62izLERfFU2sNhxi3LU32OyASszTKPI
PUH9mCAKU57ZK0ALqfIYdVBR2S7uvMuWOSxhyMozfSPP1F7JOryLVqUNG6hzy+rC
96qatPTx7ICvVObU9qomgXpN00EtuJ/Udy9eLAx682+m/4ppTau31DjYwNQcQMPE
MbsYmptaVDdZoVvSD4eptzEVOSKxQkQ9swP2ZKRkLNs1GFi7E6o9bvSsXzfd4zKr
H3SvbX/qZIGDU+ZWpnF+no1v1DXyVDsq1GksbY8PdC0keklO1ptPeyEwA7zSFgXt
ZisiPutUDgDOF9d06bCyzwd6oDHe9EmC/VPwbfUWstQ5dhxc5+ohkDN4dDsBBWai
exqLgmNyLUCs1EfoHspKupMs19p+tSGtoi/FXWCV+VmE5SCmxZMXG9sjhhF9FBFE
dz4GN4DyrTDYkR7WUWW5rT5e9RIR12Xk2TWVL08oNMFyDcvX8kMkXUP36SQVmwWa
WZgAPs/dX3A8gkx2yiY3qe+vLjkmnsfPgj7qs3NBtXAjQh2gm0E=
=BKp0
-----END PGP SIGNATURE-----

Christopher Baines wrote 6 years ago
(address . 32870-done@debbugs.gnu.org)
87h8i00zf4.fsf@cbaines.net
I've pushed these patches to master now, with hopefully an improved
comment about the ruby-sass-spec tests.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlu37a9fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdJchAAnjui9H/CZT3oiYjisMekOvzpyajjcECfCnlikRDUuLUFjAVyovK+Xfpt
EISlSUHgWT21BA+r0fPdNq4vCewozC4bY9T23zHhIgBJ4raPyMmX7Gl8Y48wVnUo
wUpu9DY5aEjYaUixfLTFGUDaWpx41GR5ZU1XS1PIm+zAnrZuBok4rZofTVH2Q66P
Swc9e5yNtF5Lq8EFmN1X+yj3aHDHJ0/5fEEGr/urwStmebAyF2xE93E10tAkUFZ2
bO2Q5Wbpp1LWZoBGvRR6O2a2y8SvHXi3Vd+bz73ZCryFkhPIYZ78UyZriB/ULx1U
jqX1SLTNMblrI7g0XXmNmgsJp97AyF6Y/WcDaolZfUnX7FMATyeLutEf4/OAED5H
bS+4C/tq4rrTI+AZ3Rv7acB2etUUSKCvQQBysKJqnu2/AN0q/Rtc5IDJuRkMOGPq
LLDpZS+XaHYapX1xs4wsOcE/LuunfxrDgRfIbFdqsKLTZYFJtB/rWgEequE4wELP
dsX2RXpbmc5qjXniLLp7bykjJI+2Cs+tBziYsjhIr+Aw8KFKXq684XpS+IvBNkDA
LRy93Zgt6c4kfm0BviPEDvCVcwaVj5wvvb/3wgecuW7/lr5qcA+SdeL4+xQVDdqW
cn0O+EwJKvEy8uCsMRr956xdlwWpjcXtCBLCp62wLrVtcvXSxl0=
=eq3W
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 32870@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 32870
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help