Skip to content

x/exp/shiny: better examples UX #15062

@sbinet

Description

@sbinet

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go-1.6
  2. What operating system and processor architecture are you using (go env)?
    linux/amd64
  3. What did you do?
$> mkdir /tmp/gopath
$> cd /tmp/gopath
$> export GOPATH=/tmp/gopath
$> go get -u golang.org/x/exp/shiny/screen/...
$> cd $GOPATH/src/golang.org/x/exp/shiny/example/basic
$> go run ./main.go
${GOPATH}/golang.org/x/exp/shiny/driver/internal/x11key/x11key.go:9:2: cannot find package "golang.org/x/mobile/event/key" in any of:

${GOPATH}/src/golang.org/x/exp/shiny/vendor/golang.org/x/mobile/event/key (vendor tree)
        /usr/local/go/src/golang.org/x/mobile/event/key (from $GOROOT)

${GOPATH}/src/golang.org/x/mobile/event/key (from $GOPATH)
${GOPATH}/src/golang.org/x/exp/shiny/driver/x11driver/window.go:25:2: cannot find package "golang.org/x/mobile/event/lifecycle" in any of:

${GOPATH}/src/golang.org/x/exp/shiny/vendor/golang.org/x/mobile/event/lifecycle (vendor tree)
        /usr/local/go/src/golang.org/x/mobile/event/lifecycle (from $GOROOT)

${GOPATH}/src/golang.org/x/mobile/event/lifecycle (from $GOPATH)
${GOPATH}/src/golang.org/x/exp/shiny/driver/x11driver/screen.go:20:2: cannot find package "golang.org/x/mobile/event/mouse" in any of:

[...etc...]
  1. What did you expect to see?
    A nicer way to run the example(s)

I would propose to:

$> cd $GOPATH/src/golang.org/x/exp/shiny
$> git mv example _examples

and remove all the // +build ignore build tags from the examples,
so one could at least do:

$> cd _examples/basic
$> go get -d .

to download all the dependencies in one go.

(I can send a CL)

-s

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions