all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies
@ 2020-11-26 10:02 Tomás Ortín Fernández via Guix-patches via
  2020-11-28  8:53 ` [bug#44882] Dependencies issues Tomás Ortín Fernández via Guix-patches via
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Tomás Ortín Fernández via Guix-patches via @ 2020-11-26 10:02 UTC (permalink / raw)
  To: 44882

* gnu/packages/ruby.scm (ruby-solargraph): Update to 0.39.17.
* gnu/packages/ruby.scm (ruby-e2mmap): New variable.
* gnu/packages/ruby.scm (ruby-benchmark): New variable.
---
gnu/packages/ruby.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 47 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 2753403834..71a970e2b8 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -11587,19 +11588,20 @@ application.")
 (define-public ruby-solargraph
   (package
     (name "ruby-solargraph")
-    (version "0.36.0")
+    (version "0.39.17")
     (source
      (origin
        (method url-fetch)
        (uri (rubygems-uri "solargraph" version))
        (sha256
         (base32
-         "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
+         "06fby6dpq1jcq30x8ladig4dvz8j2pxd08mkrad3d41jx33zd2hg"))))
     (build-system ruby-build-system)
     (propagated-inputs
      `(("ruby-backport" ,ruby-backport)
        ("bundler" ,bundler)
-       ("ruby-htmlentities" ,ruby-htmlentities)
+       ("ruby-benchmark" ,ruby-benchmark)
+       ("ruby-e2mmap" ,ruby-e2mmap)
        ("ruby-jaro-winkler" ,ruby-jaro-winkler)
        ("ruby-maruku" ,ruby-maruku)
        ("ruby-nokogiri" ,ruby-nokogiri)
@@ -11638,6 +11640,48 @@ checking.")
     (home-page "https://solargraph.org/")
     (license license:expat)))
 
+(define-public ruby-e2mmap
+  (package
+    (name "ruby-e2mmap")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "e2mmap" version))
+       (sha256
+        (base32
+         "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
+    (build-system ruby-build-system)
+    (propagated-inputs
+     `(("bundler" ,bundler)))
+    (arguments
+     `(#:tests? #f)) ;; There is a rakefile but no tests
+    (synopsis
+     "Module for defining custom exceptions with specific messages")
+    (description
+     "Module for defining custom exceptions with specific messages.")
+    (home-page "https://github.com/ruby/e2mmap")
+    (license license:bsd-2)))
+
+(define-public ruby-benchmark
+  (package
+    (name "ruby-benchmark")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "benchmark" version))
+       (sha256
+        (base32
+         "0jadlpsl504ql436a6bx8ihp0bkg3rvxg7fbi4r1bmra3cqz0h88"))))
+    (build-system ruby-build-system)
+    (synopsis "Performance benchmarking library")
+    (description
+     "Provides methods for benchmarking Ruby code, giving detailed reports on
+the time taken for each task.")
+    (home-page "https://github.com/ruby/benchmark")
+    (license license:bsd-2)))
+
 (define-public ruby-wayback-machine-downloader
   (package
     (name "ruby-wayback-machine-downloader")




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#44882] Dependencies issues
  2020-11-26 10:02 [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Tomás Ortín Fernández via Guix-patches via
@ 2020-11-28  8:53 ` Tomás Ortín Fernández via Guix-patches via
  2020-12-04 19:56   ` Leo Famulari
  2020-12-28  1:17   ` Björn Höfling
  2020-12-04 19:44 ` [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Leo Famulari
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 7+ messages in thread
From: Tomás Ortín Fernández via Guix-patches via @ 2020-11-28  8:53 UTC (permalink / raw)
  To: 44882

Hello,

I have realized this patch isn't correct. I hadn't tested it on a clean environment before.
Solargraph requires Rubocop 0.52 (!). In fact, the current version of Solargraph doesn't currently work, either: there are version issues with Rubocop and with ruby-thor.

I need a more-or-less current Solargraph and Rubocop, that's why I have been updating some packages, but I realize now I wasn't doing it properly and that I'm getting tangled into a web of dependencies issues.

How should I proceed? Clearly Rubocop should be updated, but I don't know how to keep Solargraph working and how to figure out which packages will need to be updated or checked in case they need an older version of Rubocop.

I'm quite new to all of this, so sorry if I'm not doing things how I'm supposed to!

Tomás




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies
  2020-11-26 10:02 [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Tomás Ortín Fernández via Guix-patches via
  2020-11-28  8:53 ` [bug#44882] Dependencies issues Tomás Ortín Fernández via Guix-patches via
@ 2020-12-04 19:44 ` Leo Famulari
  2021-02-25 22:47 ` Björn Höfling
  2021-02-25 22:47 ` Björn Höfling
  3 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2020-12-04 19:44 UTC (permalink / raw)
  To: 44882

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

On Thu, Nov 26, 2020 at 11:02:11AM +0100, Tomás Ortín Fernández via Guix-patches via wrote:
> * gnu/packages/ruby.scm (ruby-solargraph): Update to 0.39.17.
> * gnu/packages/ruby.scm (ruby-e2mmap): New variable.
> * gnu/packages/ruby.scm (ruby-benchmark): New variable.

Thanks! I read your followup email but I'm also replying with some
advice about this patch.

First, this patch should be split into 3 patches. Each new package
should be added in its own patch, and then the solargraph update should
be the third patch.

> +(define-public ruby-e2mmap
> +  (package
> +    (name "ruby-e2mmap")
> +    (version "0.1.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "e2mmap" version))
> +       (sha256
> +        (base32
> +         "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
> +    (build-system ruby-build-system)
> +    (propagated-inputs
> +     `(("bundler" ,bundler)))

Is this 'bundler' really used? If so, is it used only at build time? In
that case, it would be a native input.

I checked that the built ruby-e2mmap doesn't keep a reference to
bundler, and thus wouldn't be able to find it at run-time:

------
$ guix gc --references $(./pre-inst-env guix build --no-grafts ruby-e2mmap)          
/gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5
/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16
------

> +    (description
> +     "Module for defining custom exceptions with specific messages.")

Descriptions should be "complete sentences". For example, this could be
written as "This package provides a Ruby module for defining custom
exceptions with specific messages."

I've attached a revised patchset to show what I mean. I was going to
push these revised patches until I read your followup message.

[-- Attachment #2: solargraph-patches --]
[-- Type: text/plain, Size: 4597 bytes --]

From 50a2b025fade3fc2a305cd78d1611c516fe47510 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1s=20Ort=C3=ADn=20Fern=C3=A1ndez?=
 <tomasortin@mailbox.org>
Date: Fri, 4 Dec 2020 14:16:15 -0500
Subject: [PATCH 1/3] gnu: Add ruby-e2mmap.

* gnu/packages/ruby.scm (ruby-e2mmap): New variable.
---
 gnu/packages/ruby.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 8fc228f6ed..939a686114 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -11637,6 +11638,26 @@ checking.")
     (home-page "https://solargraph.org/")
     (license license:expat)))
 
+(define-public ruby-e2mmap
+  (package
+    (name "ruby-e2mmap")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "e2mmap" version))
+       (sha256
+        (base32
+         "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:tests? #f)) ;; There is a rakefile but no tests
+    (synopsis "Define custom exceptions for Ruby")
+    (description "This package provides a Ruby module for defining custom
+exceptions with specific messages.")
+    (home-page "https://github.com/ruby/e2mmap")
+    (license license:bsd-2)))
+
 (define-public ruby-wayback-machine-downloader
   (package
     (name "ruby-wayback-machine-downloader")
-- 
2.29.2


From d1868eddf03ae24fc7ffbeb920e95a06838f6a8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1s=20Ort=C3=ADn=20Fern=C3=A1ndez?=
 <tomasortin@mailbox.org>
Date: Fri, 4 Dec 2020 14:16:49 -0500
Subject: [PATCH 2/3] gnu: Add ruby-benchmark.

* gnu/packages/ruby.scm (ruby-benchmark): New variable.
---
 gnu/packages/ruby.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 939a686114..bc1ca15d67 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -11658,6 +11658,24 @@ exceptions with specific messages.")
     (home-page "https://github.com/ruby/e2mmap")
     (license license:bsd-2)))
 
+(define-public ruby-benchmark
+  (package
+    (name "ruby-benchmark")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "benchmark" version))
+       (sha256
+        (base32
+         "0jadlpsl504ql436a6bx8ihp0bkg3rvxg7fbi4r1bmra3cqz0h88"))))
+    (build-system ruby-build-system)
+    (synopsis "Performance benchmarking for Ruby")
+    (description "This package provides methods for benchmarking Ruby code,
+giving detailed reports on the time taken for each task.")
+    (home-page "https://github.com/ruby/benchmark")
+    (license license:bsd-2)))
+
 (define-public ruby-wayback-machine-downloader
   (package
     (name "ruby-wayback-machine-downloader")
-- 
2.29.2


From 9c8dd05ef67013b4599be78e21976b618b4d7e97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1s=20Ort=C3=ADn=20Fern=C3=A1ndez?=
 <tomasortin@mailbox.org>
Date: Fri, 4 Dec 2020 14:17:09 -0500
Subject: [PATCH 3/3] gnu: ruby-solargraph: Update to 0.39.17.

* gnu/packages/ruby.scm (ruby-solargraph): Update to 0.39.17.
[propagated-inputs]: Add ruby-benchmark and ruby-e2mmap.
---
 gnu/packages/ruby.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index bc1ca15d67..146263e0af 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -11587,19 +11587,20 @@ application.")
 (define-public ruby-solargraph
   (package
     (name "ruby-solargraph")
-    (version "0.36.0")
+    (version "0.39.17")
     (source
      (origin
        (method url-fetch)
        (uri (rubygems-uri "solargraph" version))
        (sha256
         (base32
-         "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
+         "06fby6dpq1jcq30x8ladig4dvz8j2pxd08mkrad3d41jx33zd2hg"))))
     (build-system ruby-build-system)
     (propagated-inputs
      `(("ruby-backport" ,ruby-backport)
        ("bundler" ,bundler)
-       ("ruby-htmlentities" ,ruby-htmlentities)
+       ("ruby-benchmark" ,ruby-benchmark)
+       ("ruby-e2mmap" ,ruby-e2mmap)
        ("ruby-jaro-winkler" ,ruby-jaro-winkler)
        ("ruby-maruku" ,ruby-maruku)
        ("ruby-nokogiri" ,ruby-nokogiri)
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#44882] Dependencies issues
  2020-11-28  8:53 ` [bug#44882] Dependencies issues Tomás Ortín Fernández via Guix-patches via
@ 2020-12-04 19:56   ` Leo Famulari
  2020-12-28  1:17   ` Björn Höfling
  1 sibling, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2020-12-04 19:56 UTC (permalink / raw)
  To: 44882

On Sat, Nov 28, 2020 at 09:53:20AM +0100, Tomás Ortín Fernández via Guix-patches via wrote:
> I have realized this patch isn't correct. I hadn't tested it on a clean environment before.
> Solargraph requires Rubocop 0.52 (!). In fact, the current version of Solargraph doesn't currently work, either: there are version issues with Rubocop and with ruby-thor.

Okay, thanks for the followup email.

> I need a more-or-less current Solargraph and Rubocop, that's why I have been updating some packages, but I realize now I wasn't doing it properly and that I'm getting tangled into a web of dependencies issues.
> 
> How should I proceed? Clearly Rubocop should be updated, but I don't know how to keep Solargraph working and how to figure out which packages will need to be updated or checked in case they need an older version of Rubocop.

It's not clear to me exactly what is wrong, so I can't give specific
advice. If Solargraph is not currently working, you don't need to "keep
it working" while doing other work, right?

To check what packages will be rebuilt if the Rubocop package changes,
you can use `guix refresh --list-dependents ruby-rubocop`. Building and
testing the packages listed by that command will allow you to test the
impact of any changes to ruby-rubocop.

Currently, our ruby-rubocop package is at version 0.88.0. We don't
usually downgrade packages, but you can add another package based on the
earlier version 0.52. For example, something like this (untested!):

------
(define-public ruby-rubocop-0.52
  (package
    (inherit ruby-rubocop)
    (version "0.52")
    (source (origin [...]))))
------

... then use ruby-rubocop-0.52 as an input to the Solargraph package.

In general, dealing with complex dependency graphs while updating
packages is hard, but Guix makes it easier. I would start at the top of
the graph: try building the new Solargraph, see which dependencies are
too old, update them, repeat. Once Solargraph is working, you can use
`guix refresh --list-dependents` for each changed package, fix any
breakage, and so on.

Does that make sense? Please don't hesitate to keep asking for advice,
here or on our Freenode IRC channel #guix




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44882] Dependencies issues
  2020-11-28  8:53 ` [bug#44882] Dependencies issues Tomás Ortín Fernández via Guix-patches via
  2020-12-04 19:56   ` Leo Famulari
@ 2020-12-28  1:17   ` Björn Höfling
  1 sibling, 0 replies; 7+ messages in thread
From: Björn Höfling @ 2020-12-28  1:17 UTC (permalink / raw)
  To: 44882; +Cc: tomasortin

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

Hi Tomás,

On Sat, 28 Nov 2020
09:53:20 +0100 Tomás Ortín Fernández via Guix-patches via
<guix-patches@gnu.org> wrote:

> I have realized this patch isn't correct. I hadn't tested it on a
> clean environment before. Solargraph requires Rubocop 0.52 (!). In
> fact, the current version of Solargraph doesn't currently work,
> either: there are version issues with Rubocop and with ruby-thor.

Can you explain what you mean by that? What problems do you see?

When I look at the Gem's page at

https://rubygems.org/gems/solargraph/versions/0.40.0

I see that Solargraph needs rubocop >= 0.52 (NOT specific to 0.52). For
thor, it needs ~>1.0. As we have 1.0.1, that should be fine.

I tried to build the 0.40.0 version of Solargraph (had to add the
kramdown-parser-gfm and kramdown-parser dependencies) and at least I
was able to start it with the command:

solargraph socket

I'm not using an editor/IDE that makes use of Solargraph, so I don't
see any problems here. Do you see more?

@Leo: I'm fine with your updated patches, except with this question and
that there are newer versions of ruby-benchmark and ruby-solargraph.


Thanks,

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies
  2020-11-26 10:02 [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Tomás Ortín Fernández via Guix-patches via
  2020-11-28  8:53 ` [bug#44882] Dependencies issues Tomás Ortín Fernández via Guix-patches via
  2020-12-04 19:44 ` [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Leo Famulari
@ 2021-02-25 22:47 ` Björn Höfling
  2021-02-25 22:47 ` Björn Höfling
  3 siblings, 0 replies; 7+ messages in thread
From: Björn Höfling @ 2021-02-25 22:47 UTC (permalink / raw)
  To: 44882; +Cc: Tomás Ortín Fernández, Leo Famulari

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

Hi Tomás,

On Thu, 26 Nov 2020 11:02:11 +0100
Tomás Ortín Fernández via Guix-patches via <guix-patches@gnu.org> wrote:

> * gnu/packages/ruby.scm (ruby-solargraph): Update to 0.39.17.
> * gnu/packages/ruby.scm (ruby-e2mmap): New variable.
> * gnu/packages/ruby.scm (ruby-benchmark): New variable.

Pushed with some slight modifications and an update to 0.40.3 as

cc628f255248777225b4fe4e4a011f6bb503632b

Thanks,

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies
  2020-11-26 10:02 [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Tomás Ortín Fernández via Guix-patches via
                   ` (2 preceding siblings ...)
  2021-02-25 22:47 ` Björn Höfling
@ 2021-02-25 22:47 ` Björn Höfling
  3 siblings, 0 replies; 7+ messages in thread
From: Björn Höfling @ 2021-02-25 22:47 UTC (permalink / raw)
  To: 44882; +Cc: Tomás Ortín Fernández, Leo Famulari, 44882-done

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

... and closing.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-25 22:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 10:02 [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Tomás Ortín Fernández via Guix-patches via
2020-11-28  8:53 ` [bug#44882] Dependencies issues Tomás Ortín Fernández via Guix-patches via
2020-12-04 19:56   ` Leo Famulari
2020-12-28  1:17   ` Björn Höfling
2020-12-04 19:44 ` [bug#44882] [PATCH] gnu: ruby-solargraph: Update to 0.39.17 and add two dependencies Leo Famulari
2021-02-25 22:47 ` Björn Höfling
2021-02-25 22:47 ` Björn Höfling

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.