~eliasnaur

~eliasnaur/gio

Last active 10 hours ago

~eliasnaur/test

Last active 4 months ago
View more

Recent activity

Re: [PATCH] all: fix some issues spotted by static analysis 10 hours ago

From Elias Naur to ~eliasnaur/gio

On Sat, Aug 24, 2019 at 6:09 PM Elias Naur <mail@eliasnaur.com> wrote:
>
> This path is also rejected by git am :(
>
>
> > @@ -38,7 +38,7 @@ type errWriter struct {
> >  func buildAndroid(tmpDir string, bi *buildInfo) error {
> >         sdk := os.Getenv("ANDROID_HOME")
> >         if sdk == "" {
> > -               return errors.New("Please set ANDROID_HOME to the Android SDK path")
> > +               return errors.New("please set ANDROID_HOME to the Android SDK path")
>
> I'd rather not change this and below. The errors messages are
> displayed verbatim to the

Re: [PATCH] all: fix some issues spotted by static analysis 13 hours ago

From Elias Naur to ~eliasnaur/gio

This path is also rejected by git am :(


> @@ -38,7 +38,7 @@ type errWriter struct {
>  func buildAndroid(tmpDir string, bi *buildInfo) error {
>         sdk := os.Getenv("ANDROID_HOME")
>         if sdk == "" {
> -               return errors.New("Please set ANDROID_HOME to the Android SDK path")
> +               return errors.New("please set ANDROID_HOME to the Android SDK path")

I'd rather not change this and below. The errors messages are
displayed verbatim to the
user and should form valid sentences. I don't know how other projects
handle these kinds

Re: [PATCH] all: remove a couple of unused parameters 14 hours ago

From Elias Naur to ~eliasnaur/gio

Did you send this patch manually instead of with git send-email? `git
am` reports:

$ curl 'https://lists.sr.ht/~eliasnaur/gio/%3C20190824133919.16683-1-mvdan%40mvdan.cc%3E/raw'
|git am -3
Applying: all: remove a couple of unused parameters
error: corrupt patch at line 49
error: could not build fake ancestor
Patch failed at 0001 all: remove a couple of unused parameters
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Re: [PATCH] cmd/gio: Generate appID if not specified. 14 hours ago

From Elias Naur to ~eliasnaur/gio

> > Use the Go source path to create an appID based on the domain name
> > plus the last directory location in the source path.
>
> Use the Go convention for patch titles, prefix with the package name(s)
> and start with a lower case:
>
> cmd/gio: derive a default appid from the Go package name
>

It turns out I can't even figure out my own tools. Your title,
"cmd/gio: Generate appID if not specified.", is fine except that you should
drop the final full stop and start the sentence with a lower case G:

cmd/gio: generate appID if not specified.

Re: [PATCH] cmd/gio: Generate appID if not specified. 14 hours ago

From Elias Naur to ~eliasnaur/gio

Thank you. If we're going to do this, please delete the check for the
empty appID
in exeAndroid:

      if *appID == "" {
          return errors.New("app id is empty; use -appid to set it")
      }

Can you add a simple test that verifies the package name code does what we
expect it to? In particular, test edge cases such as "nodotindomain/pkg" or
simply "fmt" (invalid Gio program, but shouldn't crash the gio tool).

Finally, please go fmt your changes.

Re: Flex layout: collect children internally? 15 hours ago

From Elias Naur to ~eliasnaur/gio

On Fri, Aug 23, 2019 at 1:55 PM Larry Clapp <larry@theclapp.org> wrote:
>
> Flex.End() returns a FlexChild.  And then you pass a set of
> FlexChild(ren) to Flex.Layout().  Is there any reason End() shouldn't
> just collect the children internally, leaving Layout() with 0 args?
>
> Maybe you can do something with a FlexChild that I'm unaware of?  Or
> maybe wouldn't *necessarily* want to pass all the children to
> Layout()???  But in that case, End() could return the child *and
> still* keep it internally, and then if you give Layout() 0 args, use
> the internal list.
>

The reason is that you might want Flexible children before Rigid children.

Re: new Grid layout 2 days ago

From Elias Naur to ~eliasnaur/gio

On Thu, Aug 22, 2019 at 8:18 PM Gregory Pomerantz <gmp.gio@wow.st> wrote:
>
>
> >> By the
> >> way I tweaked cmd/gio to create a unique package name from the go
> >> package path and write this into the Android manifest XML so that you
> >> can have more than one Gio app installed on Android at once. Let me know
> >> if you would like a patch.
> > Isn't that what the -appid flag does?
> Yes, just an automated version of that.

Sure, that sounds like a good change. I look forward to the patch. If you can,
please make the change to iosbuild.go as well. I'll test it if you don't have a
device handy.

Re: new Grid layout 2 days ago

From Elias Naur to ~eliasnaur/gio

> By the
> way I tweaked cmd/gio to create a unique package name from the go
> package path and write this into the Android manifest XML so that you
> can have more than one Gio app installed on Android at once. Let me know
> if you would like a patch.

Isn't that what the -appid flag does?

 - elias

Re: new Grid layout 2 days ago

From Elias Naur to ~eliasnaur/gio

On Thu, Aug 22, 2019 at 6:05 PM Gregory Pomerantz <gmp.gio@wow.st> wrote:
>
> I built a Grid layout based on the code in layout/flex.go.
>

Interesting! I'm in London for Gophercon UK until sometime next week, where I
will have the bandwidth to look over your Grid layout in more detail.
I will also
take a closer look at your wrapper stuff and see if Gio can do better
in the core.

 - elias

Re: Q: Report panics by Crashlytics 3 days ago

From Elias Naur to ~eliasnaur/gio

> Would it be possible to report panics by Crashlytics on Android/iOS
> app with Gio? It looks like `gio` command doesn't provide a way to add
> Java/Objective-C files, edit gradle/Xcode files and dependencies on
> third party libraries.
>

Perhaps you're looking for the -buildmode=archive flag? See

https://man.sr.ht/~eliasnaur/gio/integrate.md

for more information.

 - elias