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 unsafe.Slice so no special check is needed.
>
> Turns out it does matter. On our CI system, Ubuntu 20.04 has Go
> 1.13.8 installed, and without this feature test, it compiled just fine
> (it wasn't until later versions of Go that go.mod's version request
> causes a compile failure if not satisfied).
>
How does it compile when unsafe.Slice is undefined?
Quick test with unrelated test app:
$ go build; echo $?
# cobra-test
./main.go:10:6: undefined: cmd.NoSuchMethod
1
Or you mean the compile test for configure works and we want to make
the configure test fail to compile?
It turns out the real problem was a missing && in the configure script
(see commit b089d3f7). It doesn't matter if 'go run .' fails if 'go
mod tidy' is still allowed to succeed right after. With that fixed, I
got a few more green lines in the CI (before turning back to a bunch
of red now that I added Rust into the CI...)
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:
qemu.org |
libguestfs.org