flathub / com.visualstudio.code.oss

https://flathub.org/apps/details/com.visualstudio.code.oss
GNU Affero General Public License v3.0
47 stars 12 forks source link

Make golang work out of the box #37

Open csoriano1618 opened 5 years ago

csoriano1618 commented 5 years ago

Since this repository already has support for golang with the extension, it would be nice if it could work out of the box. For that, from this issue seems that what is missing is just to put some env variables as part of the recipe:

--env=PATH=/app/bin:/usr/bin:/usr/lib/sdk/golang/bin --env=GOROOT=/usr/lib/sdk/golang --env=GOPATH=$HOME/go com.visualstudio.code

I can create a PR once master is fixed.

amtlib-dot-dll commented 5 years ago

Personally speaking most of the users do not use golang, so even those tools required by the official VSCode Golang extension are bundled separately from the default installation.

csoriano1618 commented 5 years ago

That's true, however seems the containers world (that is becoming quite ubiquitous) is basically all Go, would be nice to have this ready. In any case, doing these modifications doesn't hurt other workflows, so probably is an easy win right?

snaggen commented 5 years ago

Setting these paths will get much of the go experience working. However I still can't use the debugger, I just get could not launch process: fork/exec /home/snaggen/src/keytrainer/debug: operation not permitted

amtlib-dot-dll commented 5 years ago

@snaggen Try --allow=devel?

snaggen commented 5 years ago

--allow=devel fixed it

snaggen commented 5 years ago

It seems that the use of $HOME for GOPATH depends on https://github.com/flatpak/flatpak/pull/2555 to work, the alternative is a wrapper script I guess.