driusan / de

A Programmer's Text Editor
MIT License
428 stars 26 forks source link

Help needed regarding shiny #43

Closed abhi18av closed 7 years ago

abhi18av commented 7 years ago

Hello @driusan

I'm sorry to file the issue here, it's not regarding the de editor but rather about shiny.

I've been trying to install the shiny gui lib but when I run go get github.com/golang/exp/shiny/... it throws up the following error.

❯ go get github.com/golang/exp/shiny/...
can't load package: package github.com/golang/exp/shiny/driver: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver expects import "golang.org/x/exp/shiny/driver"
can't load package: package github.com/golang/exp/shiny/driver/gldriver: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/gldriver expects import "golang.org/x/exp/shiny/driver/gldriver"
can't load package: package github.com/golang/exp/shiny/driver/internal/drawer: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/internal/drawer expects import "golang.org/x/exp/shiny/driver/internal/drawer"
can't load package: package github.com/golang/exp/shiny/driver/internal/errscreen: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/internal/errscreen expects import "golang.org/x/exp/shiny/driver/internal/errscreen"
can't load package: package github.com/golang/exp/shiny/driver/internal/event: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/internal/event expects import "golang.org/x/exp/shiny/driver/internal/event"
can't load package: package github.com/golang/exp/shiny/driver/internal/lifecycler: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/internal/lifecycler expects import "golang.org/x/exp/shiny/driver/internal/lifecycler"
can't load package: package github.com/golang/exp/shiny/driver/internal/swizzle: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/internal/swizzle expects import "golang.org/x/exp/shiny/driver/internal/swizzle"
can't load package: package github.com/golang/exp/shiny/driver/internal/x11key: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/internal/x11key expects import "golang.org/x/exp/shiny/driver/internal/x11key"
can't load package: package github.com/golang/exp/shiny/driver/windriver: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/windriver expects import "golang.org/x/exp/shiny/driver/windriver"
can't load package: package github.com/golang/exp/shiny/driver/x11driver: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/driver/x11driver expects import "golang.org/x/exp/shiny/driver/x11driver"
/Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/iconvg/rasterizer.go:13:2: use of internal package not allowed
can't load package: package github.com/golang/exp/shiny/screen: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/screen expects import "golang.org/x/exp/shiny/screen"
can't load package: package github.com/golang/exp/shiny/text: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/text expects import "golang.org/x/exp/shiny/text"
can't load package: package github.com/golang/exp/shiny/widget: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/widget expects import "golang.org/x/exp/shiny/widget"
can't load package: package github.com/golang/exp/shiny/widget/node: code in directory /Users/eklavya/.gvm/pkgsets/go1.8/global/src/github.com/golang/exp/shiny/widget/node expects import "golang.org/x/exp/shiny/widget/node"

Still further, when I try to run the sample basic example from the shiny repo it just fails and prints out an obscure

❯ go run main.go
signal: killed

Could you please help me out a bit :)

driusan commented 7 years ago

You need to use the golang.org import path, not github.com for anything in the x repositories:

go get golang.org/x/exp/shiny/...

As far as the signal: killed goes, are you using the latest version of Go? I just tried your go run main.go on the basic example, and get that problem on my Mac with go 1.7.3 but not with go 1.8.1. (If memory serves, 1.8.1 fixed some errors in macOS Sierra where Apple changed some details of syscalls after 1.8.0 was released, but I may be mistaken and can't find the issue in the Go issue tracker..)

Go should never really segfault like that, so if you can reproduce the problem with the latest Go release, the place to report shiny bugs is in the Go issue tracker at github.com/golang/go

abhi18av commented 7 years ago

That did the trick - upgrading, I mean. Thanks @driusan

But then again, upgrading go-version is somewhat painful for me right now. I end up doing go get every single global package that I need.

Right now, the amateurish solution would be to keep a list of packages and then automate the go get ... with a script.

As someone experienced do you have a solution regarding this problem, I'd love to have some advice regarding this, there ought to be a better way :)

I use gvm to manage my go versions.