Recent activity

Re: [PATCH] [WIP] _endtoend: add the first test for js via chrome 5 days ago

From Daniel Martí to ~eliasnaur/gio

On Mon, Sep 16, 2019 at 01:16:05 +0200, Elias Naur wrote:
> For the desktop platforms, you just run `go test` as usual.
> `gio test` will cover the difficult platforms, including wasm.
> 
> Now, TestRed itself will probably end up in gioui.org/ui/app, but the actual
> invoking of `gio test -target js gioui.org/ui/app` belongs in some CI script.
> I'm not sure.

I honestly don't see how this would work in the long run :) But if you
have a plan and it involves automation, then yeah, it would share most
of the dependencies with the e2e tests.

> Yes, but with API like Screenshot, writing end-to-end tests is as easy as any
> other kind of test and could be placed anywhere.

Re: [PATCH] [WIP] _endtoend: add the first test for js via chrome 6 days ago

From Daniel Martí to ~eliasnaur/gio

> All good points, but I'm wondering whether a separate module is worth the
> trouble.
> 
> If the gio tool ever grows a `test` or `run` subcommand, it would need the same
> dependencies as this end to end test, right? Moreover, your test depends on
> cmd/gio for building the test, so stuffing it somewhere in the cmd module
> doesn't seem that wrong to me.
> 
> In fact, if we have `gio test` and gioui.org/ui/app had the ability to
> run in headless mode, your test would morph into something similar to
> 
> 	$ gio test -target js gioui.org/cmd/testdata/red.go

I can imagine a 'gio run' command in the future, sure. But it would

[PATCH] [WIP] _endtoend: add the first test for js via chrome 7 days ago

From Daniel Martí to ~eliasnaur/gio

This commit adds the first fully end-to-end test. It builds a very
simple Gio app, loads it on Chrome, and checks that it works.

To control Chrome, we use chromedp, a library in pure Go that takes care
of starting the browser and talking to it via the devtools protocol.

We start a new module for multiple reasons. First, the endtoend tests
already depend on two of the existing modules, so they don't belong in
either of them. Second, we don't want to unnecessarily add endtoend test
dependencies to widely used modules such as gioui.org/cmd.

To ensure that this module isn't go-gettable or importable by third
parties, we name the directory _endtoend. Due to a bug in Go that is
still present in 1.13 (golang.org/issues/28481), it's buggy to have a
[message trimmed]

[PATCH] cmd/gio: avoid a trailing newline in -target errors 8 days ago

From Daniel Martí to ~eliasnaur/gio

I was seeing an extra newline when some errors were printed, like:

	$ gio foo
	please specify target

	$

The source of the little bug was a trailing newline in the error
messages. Printing the messages already adds a newline.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
 cmd/gio/gio.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
[message trimmed]

[PATCH] all: update go.mod files to target Go 1.13 15 days ago

From Daniel Martí to ~eliasnaur/gio

Since the main README recommends Go 1.13 or later, let's make the go.mod
files reflect that. This will enable starting to use new language
features.

Modules that still build on 1.12 will continue to work on that version
just fine; this line is just a hint to enable new language features for
versions of Go new enough.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
 apps/go.mod    | 2 +-
 cmd/go.mod     | 2 +-
 ui/go.mod      | 2 +-
 website/go.mod | 2 +-
[message trimmed]

[PATCH v2] all: remove a couple of unused parameters 27 days ago

From Daniel Martí to ~eliasnaur/gio

Both from unexported functions, to keep the change low-risk. Found via
unparam.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
Forgot to rebase.

 apps/gophers/ui.go  | 4 ++--
 cmd/gio/iosbuild.go | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/gophers/ui.go b/apps/gophers/ui.go
index 046f2d3..304e93e 100644
--- a/apps/gophers/ui.go
[message trimmed]

[PATCH] all: remove a couple of unused parameters 27 days ago

From Daniel Martí to ~eliasnaur/gio

Both from unexported functions, to keep the change low-risk. Found via
unparam.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
 apps/gophers/ui.go  | 4 ++--
 cmd/gio/iosbuild.go | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/gophers/ui.go b/apps/gophers/ui.go
index 046f2d3..304e93e 100644
--- a/apps/gophers/ui.go
+++ b/apps/gophers/ui.go
@@ -330,7 +330,7 @@ func (a *ActionButton) Layout(c ui.Config, q input.Queue, ops *ui.Ops, cs layout
[message trimmed]

[PATCH] all: fix some issues spotted by static analysis 27 days ago

From Daniel Martí to ~eliasnaur/gio

First, vet was upset by two incorrect fmt verbs. One was an extra %x,
when there was just one argument, so remove it. Another was a %p with a
non-pointer. It's a struct, so for now simply use %#v.

Second, staticcheck found some unused or unnecessary bits of code;
remove the obvious ones.

Finally, staticcheck also complained about some error strings which were
capitalized or had periods. Adjust those, which also makes all error
messages more consistent.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
This time the patch should actually work! Apologies everyone for the noise.
[message trimmed]

[PATCH] all: fix some issues spotted by static analysis 27 days ago

From Daniel Martí to ~eliasnaur/test

First, vet was upset by two incorrect fmt verbs. One was an extra %x,
when there was just one argument, so remove it. Another was a %p with a
non-pointer. It's a struct, so for now simply use %#v.

Second, staticcheck found some unused or unnecessary bits of code;
remove the obvious ones.

Finally, staticcheck also complained about some error strings which were
capitalized or had periods. Adjust those, which also makes all error
messages more consistent.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
---
Last try, promise.
[message trimmed]

[PATCH] all: fix some issues spotted by static analysis 27 days ago

From Daniel Martí to ~eliasnaur/test

First, vet was upset by two incorrect fmt verbs. One was an extra %x,
when there was just one argument, so remove it. Another was a %p with a
non-pointer. It's a struct, so for now simply use %#v.

Second, staticcheck found some unused or unnecessary bits of code;
remove the obvious ones.

Finally, staticcheck also complained about some error strings which were
capitalized or had periods. Adjust those, which also makes all error
messages more consistent.
---
 apps/gophers/ui.go            |  1 -
 cmd/gio/androidbuild.go       | 10 +++++-----
 ui/app/egl.go                 |  2 +-
[message trimmed]