~eliasnaur/gio

3 2

why i got package slices is not in GOROOT

Details
Message ID
<CAARamNcqougfWL90xbdREhco_CxZFNTL8f0=VJ6HuSdgQB+CRg@mail.gmail.com>
DKIM signature
pass
Download raw message
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)
Tanguy ⧓ Herrmann <tanguy@tuxago.com>
Details
Message ID
<2960eb42-353c-4e4e-9935-d75b8438262a@tuxago.com>
In-Reply-To
<CAARamNcqougfWL90xbdREhco_CxZFNTL8f0=VJ6HuSdgQB+CRg@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
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)
Details
Message ID
<CAFcc3FSgSUfQ-+wM9uuq4Rcwhq3zhAxn07JXAOuT7CuyVTrhDw@mail.gmail.com>
In-Reply-To
<2960eb42-353c-4e4e-9935-d75b8438262a@tuxago.com> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<CAFcc3FT-mKaRkVDmf=LZB87_oQmHaHops5K8o6CDb0oN3d9AKw@mail.gmail.com>
In-Reply-To
<CAFcc3FSgSUfQ-+wM9uuq4Rcwhq3zhAxn07JXAOuT7CuyVTrhDw@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
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
Reply to thread Export thread (mbox)