~eliasnaur/gio#20:
consider another binary name

gio is taken by glib2 on Arch Linux, for example. So it's extremely unlikely that it could ever be packaged on that distro, or probably any other major Linux distros.

I understand that it's mainly a development tool, so it's fine if Go developers simply 'go get' it. However, in the long term I assume we want the tool to become more mainstream. Imagine if desktop apps are packaged in Linux distros, and then gio itself needs to be packaged.

I got the idea from https://github.com/golang/go/issues/33468, which says:

Avoids binary name clashes. It just so happens that gio already exists on my system (I believe it is a Gnome tool).

Status
RESOLVED FIXED
Submitter
~mvdan
Assigned to
No-one
Submitted
2 months ago
Updated
29 days ago
Labels
No labels applied.

~eliasnaur 2 months ago

The name clash is indeed unfortunate, in particular because the glib2 tool appears to be installed by default on Linux distributions.

On the other hand gio is short and is memorable, the same way the go tool is for Go. It is also generic, which is important if/when gio grows the ability to run programs and tests on the difficult platforms (mobile, browser).

~mvdan 2 months ago

I think 'go' was a bit different, because it was a bit of a power play. I'm not sure if you can pull off the same, when glib2 is in the way :)

Are there any alternative or related names you can think of?

Another option would be for 'gio' to be the recommended name/alias, and distros/systems could package it as 'gioui' by default only.

~dennwc a month ago

Also agree that name change may be necessary. The package name is not affected by this, of course, but the tool name should be changed.

Some alternative names to consider: gg (graphical go?), ggo, ggio.

~mvdan a month ago

I'm afraid gg is far too common, and already taken in the space of Go tools: https://myitcv.io/cmd/gg

I think ggo is a bit too close to 'go', and could confuse some people.

ggio could work. Almost like forcing people to pronounce the tool in one way :)

~myitcv a month ago

I actually gave up the name gg to Michael Jones' new command:

https://github.com/MichaelTJones/gg

I had not announced my tool so that seemed fair.

Naming is hard but I would definitely avoid clashes where possible, especially with well established projects.

~myitcv a month ago

Continuing to paint the bike shed: gogio?

~rogpeppe a month ago

Not only is gio taken as a command name, it is also used as a command when you open any file from the command line. The xdg-open command uses the xdf-mime script, which contains the following shell function:

info_gnome()
{
    if gio help info 2>/dev/null 1>&2; then
        DEBUG 1 "Running gio info \"$1\""
        gio info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
    elif gvfs-info --help 2>/dev/null 1>&2; then
        DEBUG 1 "Running gvfs-info \"$1\""
        gvfs-info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
    elif gnomevfs-info --help 2>/dev/null 1>&2; then
        DEBUG 1 "Running gnomevfs-info \"$1\""
        gnomevfs-info --slow-mime "$1" 2> /dev/null | grep "^MIME" | cut -d ":" -f 2 | sed s/"^ "//
    fi

    if [ $? -eq 0 ]; then
        exit_success
    else
        exit_failure_operation_failed
    fi
}

If you have the wrong gio in your path, then the script just succeeds silently and the wrong application is opened. So installing the Go gio command breaks opening files from the command line under Ubuntu Linux.

As an alternative name, how about go-gio ? Fundamentally, the command builds Go graphics programs, so the go prefix seems like it might be appropriate to me.

~eliasnaur a month ago

Regardless of its eventual name, I'm not sure packaging gio in Linux distributions is a win. The gio tool depends on the go tool anyway, so I prefer users fetch it directly with go install or run it with go run.

How about a name that doesn't include gio? Thinking about it, there is actually very little knowledge of the gio packages built in to the gio tool. In other words, gio the tool could conceivably become a tool for building and running any Go program on mobile, browsers and other difficult platforms. So what name would be good if we keep the gio's purpose in mind, and not its project?

~mvdan a month ago

Note that the same name clashes (such as Roger's issue) happen with 'go install' too, so I don't think this issue is about Linux distro packaging per se.

What's special about your build tool, compared to 'GOOS=android GOARCH=arm64 go build'? Perhaps that's going to help us come to a reasonable name.

~eliasnaur a month ago

On Wed Sep 11, 2019 at 8:57 AM ~mvdan wrote:

Note that the same name clashes (such as Roger's issue) happen with 'go install' too, so I don't think this issue is about Linux distro packaging per se.

I agree. My comment was about distributions, not the name change.

What's special about your build tool, compared to 'GOOS=android GOARCH=arm64 go build'? Perhaps that's going to help us come to a reasonable name.

Interesting. A hypothetical gio -target window would run

GOOS=window GOARCH=amd64 go build -ldflags='-h windowsgui'

which is very close to the go tool with a slant towards GUI programs.

That leads to names such as 'ggo' from above (the GUI go tool) or gog (go tool for GUI).

Even though I'm not a big fan of the word, app might be more precise for the kind of programs the gio tool is for, leading to names such as ago, goa.

~rogpeppe a month ago

One plea: please at least consider a slightly longer name. The command name space is global, and there are many thousands names there already (I've got ~6000 commands in my path currently). When I see three-character command names, I know that I'll see them in a year and have no idea what that command is doing; likewise if I'm trying to remember the name, a name like ago isn't going to be easy to remember. Given that most people have command-line completion, I doubt there's a real need for a short name. Starting the name with go will at least make the completion suggestions decent for those that can't remember the specific command name.

gomobile didn't seem too long to me (is gio much different from the immediate-mode version of that command in fact?). Given that, perhaps gobuildapp? Or gogui?

~mvdan a month ago

which is very close to the go tool with a slant towards GUI programs.

I'm confused. I assume plain 'go build' for Android produces a binary, while I assume that the current gio produces an APK.

To continue the bikeshedding: goport, gopack, gopherapp.

~eliasnaur a month ago

One plea: please at least consider a slightly longer name. The command name space is global, and there are many thousands names there already (I've got ~6000 commands in my path currently). When I see three-character command names, I know that I'll see them in a year and have no idea what that command is doing; likewise if I'm trying to remember the name, a name like ago isn't going to be easy to remember. Given that most people have command-line completion, I doubt there's a real need for a short name. Starting the name with go will at least make the completion suggestions decent for those that can't remember the specific command name.

Good point, thank you. I'll try to avoid names that are too clever to be useful.

gomobile didn't seem too long to me (is gio much different from the immediate-mode version of that command in fact?). Given that, perhaps gobuildapp? Or gogui?

gobuildapp is too specific for when the tool will be able to run, test or install programs.

However, I like gogui as well as gobuildapp's sibling, goapp. Since goapp already exists as a (deprecated) tool in the App Engine SDK, and since app is also used for web-apps, I suppose gogui has an edge here.

I also like ~myitcv's gogio because it seems slightly easier to remember and has even less a chance of clashing with other commands, such as GUI programs for Go the board game:

https://aur.archlinux.org/packages/gogui/

On Wed Sep 11, 2019 at 11:59 AM ~mvdan wrote:

which is very close to the go tool with a slant towards GUI programs.

I'm confused. I assume plain 'go build' for Android produces a binary, while I assume that the current gio produces an APK.

An apk is still just sugar coating around the go build binary. My intention with the Windows example was to clarify your comparison of the go and gio tools.

-- elias

~eliasnaur REPORTED FIXED 29 days ago

Renamed to gogio. Thank you for your input, everyone.

Register here or Log in to comment, or comment via email.