First of all, I need classic confinement for Task. Users will use Task to call basically anything they want: be it a compiler, tool, script, etc. Also, it should be able to read and write to any directory the user want.
I’d like to configure specific -ldflags in the build, like this. It don’t seem it is currently supported by the Go plugin.
IMHO Snapcraft need better error messages. While trying to configure it, I did silly mistakes until I got it right. But instead of an useful error message, Snapcraft just prints an stack trace, and it was hard to know what was wrong.
I usually install Go manually, by downloading it and setuping GOROOT, GOPATH, PATH, etc. Even then, Snapcraft install Go from apt-get and then I get two Go versions installed in my machine. Maybe it should skip it if the go executable is found in PATH?
You should use “snapcraft cleanbuild”, that will use a container for building, which will:
not taint your host with additional versions of build dependencies
make sure your snap is built the same way that build.snapcraft.io will later build it when you want to switch to automatic builds from github
make sure that others can also use “snapcraft cleanbuild” to build your package
PS: you should split the help request and request for classic confinement into two forum topics so there is a clear papertrail for the classic bit later and it doesnt get tainted by unrelated discussions.