diff mbox series

[bug#69234] gnu: go-github-com-shirou-gopsutil: Update to 3.24.1.

Message ID 87cysvbby7.fsf@troyfigiel.com
State New
Headers show
Series [bug#69234] gnu: go-github-com-shirou-gopsutil: Update to 3.24.1. | expand

Commit Message

Troy Figiel Feb. 17, 2024, 10:50 a.m. UTC
* gnu/packages/golang.scm (go-github-com-shirou-gopsutil): Update to 3.24.1.
---
 gnu/packages/golang.scm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)


base-commit: 91d80460296e2d5a01704d0f34fb966a45a165ae

Comments

Sharlatan Hellseher Feb. 18, 2024, 10:42 p.m. UTC | #1
Hi Troy,

The version 3.24.1 of gopsutil introduces new module name
github.com/shirou/gopsutil/v3 and requires some more inputs which are
not available in Guix.

https://github.com/shirou/gopsutil/blob/v3.24.1/go.mod
--8<---------------cut here---------------start------------->8---
module github.com/shirou/gopsutil/v3

go 1.15

require (
	github.com/google/go-cmp v0.6.0
	github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0
	github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c
	github.com/shoenig/go-m1cpu v0.1.6
	github.com/stretchr/testify v1.8.4
	github.com/tklauser/go-sysconf v0.3.12
	github.com/yusufpapurcu/wmi v1.2.3
	golang.org/x/sys v0.16.0
)

retract v3.22.11
--8<---------------cut here---------------end--------------->8---

Present:
+ golang.org/x/sys
+ github.com/stretchr/testify
+ github.com/google/go-cmp

Missing:
- github.com/yusufpapurcu/wmi
- github.com/tklauser/go-sysconf
- github.com/shoenig/go-m1cpu
- github.com/power-devops/perfstat
- github.com/lufia/plan9stats

I see the package is not in use by any others, but maybe it's planned for
the update you planned. Would like to pack missing inputs for the
v3.24.1 and rename it to go-github-com-shirou-gopsutil-v3?

Status: WAIT

--
Oleg
Troy Figiel Feb. 19, 2024, 8:35 a.m. UTC | #2
Hi Oleg,

On 2024-02-18 23:42, Sharlatan Hellseher wrote:
> go 1.15
> 
> require (
> 	github.com/google/go-cmp v0.6.0
> 	github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0
> 	github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c
> 	github.com/shoenig/go-m1cpu v0.1.6
> 	github.com/stretchr/testify v1.8.4
> 	github.com/tklauser/go-sysconf v0.3.12
> 	github.com/yusufpapurcu/wmi v1.2.3
> 	golang.org/x/sys v0.16.0
> )
> 

Currently the following modules are included in the propagated inputs:
- github.com/tklauser/go-sysconf
- golang.org/x/sys

And only one module is included in the native inputs:
- github.com/stretchr/testify

These are in fact all the modules we need, because the others are hidden
behind build tags that are unsupported by Guix:

//go:build plan9
- github.com/google/go-cmp/cmp
- github.com/lufia/plan9stats

//go:build aix && cgo
- github.com/power-devops/perfstat

//go:build darwin
- github.com/shoenig/go-m1cpu

//go:build windows
- github.com/yusufpapurcu/wmi

> I see the package is not in use by any others, but maybe it's planned for
> the update you planned. Would like to pack missing inputs for the
> v3.24.1 and rename it to go-github-com-shirou-gopsutil-v3?
> 

I can rename it to v3 if that would be preferable. I still need to fix
v2 of gopsutil since it failed to build with the "/..." fix. I will
split the fix and the addition of v3 into, and add both of them to this
issue as a second version of the patch series.

Best wishes,

Troy
Sharlatan Hellseher Feb. 19, 2024, 1:13 p.m. UTC | #3
Hi Troy,

Naming to *-v3 would follow rest of the golang packages.

Thanks,
Oleg
Troy Figiel Feb. 25, 2024, 11:35 a.m. UTC | #4
Hi Oleg,

When I first created this issue, I wrongly assumed
go-github-com-tklauser-go-sysconf was already part of master. It turns
out I had already written a half-finished local package definition,
which is why I needed to add go-github-com-tklauser-go-sysconf as a TODO
in the propagated-inputs of go-github-com-shirou-gopsutil-v2 in patch
series v3.

However, I just sent a patch series for
go-github-com-tklauser-go-sysconf (see issue #69379), so we could also
wait to commit that series first and then I can immediately resolve the
TODO in another patch series. It would reduce the number of unnecessary
commits on master.

What do you think?

Best wishes,

Troy
Sharlatan Hellseher March 6, 2024, 11:56 p.m. UTC | #5
Hi Troy,

I've kept name of 2.21.11 on go-github-com-shirou-gopsutil as there is
no such module for "github.com/shirou/gopsutil/v2" like for v3
https://github.com/shirou/gopsutil/blob/v3.24.2/go.mod
https://pkg.go.dev/github.com/shirou/gopsutil/v3

Pushed as 8468c55565..12b8b129b3 to master.

--
Oleg
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 527b63d160..5305137287 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6309,20 +6309,18 @@  (define-public go-github-com-robfig-cron
     (license license:expat)))
 
 (define-public go-github-com-shirou-gopsutil
-  (let ((commit "47ef3260b6bf6ead847e7c8fc4101b33c365e399")
-        (revision "0"))
     (package
       (name "go-github-com-shirou-gopsutil")
-      (version (git-version "v2.19.7" revision commit))
+      (version "3.24.1")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
                        (url "https://github.com/shirou/gopsutil")
-                       (commit commit))) ; XXX
+                       (commit (string-append "v" version))))
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "0x1g4r32q4201nr2b754xnrrndmwsrhfr7zg37spya86qrmijnws"))))
+                  "0mnlxfmssd15la95c64rsfds92fwp5yx4b2kb8madbj21qi813jf"))))
       (build-system go-build-system)
       (arguments
        '(#:import-path "github.com/shirou/gopsutil"))
@@ -6331,7 +6329,7 @@  (define-public go-github-com-shirou-gopsutil
 on running processes and system utilization (CPU, memory, disks, network,
 sensors).")
       (home-page "https://github.com/shirou/gopsutil")
-      (license license:bsd-3))))
+      (license license:bsd-3)))
 
 (define-public go-github-com-danwakefield-fnmatch
   (let ((commit "cbb64ac3d964b81592e64f957ad53df015803288")