Ruiqi Yang <csshmhpd2008@gmail.com>
07:39 (6分钟前)
发送至 ~eliasnaur/gio
HI,
when i use the example, gio-example, version 0.3.0, then in my vscode,
i got following problem, how could i solve this?
thank you
--- go get "gioui.org/x/component"
---- gioui.org/x/component imports
gioui.org/x/outlay imports
slices: package slices is not in GOROOT (D:\go-workspace\src\slices)
I would say it's the new package from Go 1.21.
If you update your Go version to 1.21, this should work.
9 sept. 2023 01:47:29 Ruiqi Yang <csshmhpd2008@gmail.com>:
> Ruiqi Yang <csshmhpd2008@gmail.com>> 07:39 (6分钟前)> 发送至 ~eliasnaur/gio> > HI,> > when i use the example, gio-example, version 0.3.0, then in my vscode,> i got following problem, how could i solve this?> > thank you> > --- go get "gioui.org/x/component"> ---- gioui.org/x/component imports> gioui.org/x/outlay imports> slices: package slices is not in GOROOT (D:\go-workspace\src\slices)
This was a mistake on my part. I accidentally imported the wrong
version of the slices package. It exists as golang.org/x/exp/slices
and as the stdlib "slices" package from Go 1.21 onwards. I intended to
use the package that was compatible with Go 1.20. I've pushed a fix,
so now Go 1.20 will work if you run:
go get gioui.org/x@f859e99
Cheers,
Chris
On Mon, Sep 18, 2023 at 7:50 AM Chris Waldon
<christopher.waldon.dev@gmail.com> wrote:
>> This was a mistake on my part. I accidentally imported the wrong> version of the slices package. It exists as golang.org/x/exp/slices> and as the stdlib "slices" package from Go 1.21 onwards. I intended to> use the package that was compatible with Go 1.20. I've pushed a fix,> so now Go 1.20 will work if you run:
Correction, update to:
go get gioui.org/x@3246478