Re: [Libguestfs] [libnbd PATCH] golang: Bump minimum Go version to 1.17

2023-08-17 Thread Eric Blake
On Thu, Aug 17, 2023 at 08:38:48PM +0300, Nir Soffer wrote: > > > > I'm not sure what is the purpose of this test - requiring the Go > > version is > > > > good > > > > enough since the code will not compile with an older version. EVen if > > it > > > > would, > > > > it will not compile without un

Re: [Libguestfs] [libnbd PATCH] golang: Bump minimum Go version to 1.17

2023-08-17 Thread Nir Soffer
On Tue, Aug 15, 2023 at 9:53 PM Eric Blake wrote: > On Mon, Aug 14, 2023 at 01:43:37PM -0500, Eric Blake wrote: > > > > +++ b/golang/configure/test.go > > > > @@ -25,8 +25,19 @@ > > > > import ( > > > > "fmt" > > > > "runtime" > > > > + "unsafe" > > > > ) > > > > > > > > +

Re: [Libguestfs] [libnbd PATCH] golang: Bump minimum Go version to 1.17

2023-08-15 Thread Eric Blake
On Mon, Aug 14, 2023 at 01:43:37PM -0500, Eric Blake wrote: > > > +++ b/golang/configure/test.go > > > @@ -25,8 +25,19 @@ > > > import ( > > > "fmt" > > > "runtime" > > > + "unsafe" > > > ) > > > > > > +func check_slice(arr *uint32, cnt int) []uint32 { > > > + /* We re

Re: [Libguestfs] [libnbd PATCH] golang: Bump minimum Go version to 1.17

2023-08-14 Thread Eric Blake
On Sun, Aug 13, 2023 at 08:38:23PM +0300, Nir Soffer wrote: > On Sat, Aug 12, 2023 at 12:18 AM Eric Blake wrote: > > > Go 1.17 or newer is required to use unsafe.Slice(), which in turn > > allows us to write a simpler conversion from a C array to a Go object > > during callbacks. > > > > +++ b/g

Re: [Libguestfs] [libnbd PATCH] golang: Bump minimum Go version to 1.17

2023-08-14 Thread Richard W.M. Jones
On Fri, Aug 11, 2023 at 04:16:09PM -0500, Eric Blake wrote: > Go 1.17 or newer is required to use unsafe.Slice(), which in turn > allows us to write a simpler conversion from a C array to a Go object > during callbacks. > > To check if this makes sense, look at > https://repology.org/project/go/ve

Re: [Libguestfs] [libnbd PATCH] golang: Bump minimum Go version to 1.17

2023-08-13 Thread Nir Soffer
On Sat, Aug 12, 2023 at 12:18 AM Eric Blake wrote: > Go 1.17 or newer is required to use unsafe.Slice(), which in turn > allows us to write a simpler conversion from a C array to a Go object > during callbacks. > > To check if this makes sense, look at > https://repology.org/project/go/versions c