FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
03-16-2021 02:15 PM
I installed the WSL, Visual Studio Code, and are able to compile and run the sample go webserver application.
However, snapcraft automatically installs the golang-go system package, which is version 1.10.
Is there a way to use a newer version of Go, preferably one that supports go modules?
There seems to be a "go-channel" keyword for snapcraft 3.x, but I'm not sure how to update the WSL snapcraft which is only version 2.43...
Solved! Go to Solution.
03-16-2021 03:22 PM
Our system is build on Ubuntu core18.04 LTS, the default Go lang version is 1.10 for compatibility reason. If you like to install later verions see several guides on the internet.
The snapcraft version used actually is not updateable in WSL because the later versions are only available as a snap not as an apt package. Therefore an update would need some more effort/knowledge because the later snapcraft version are working with multipass or lxd containers for its building process only. And therefor a WSL2 would be necessary that this in untested until now. The other way is using a VM with a native ubuntu installed, like also mentioned in the SDK documentation.
See also some information about go applications in snaps provided by canonical.
03-16-2021 03:58 PM
Thank you for your reply. I installed another Go version in WSL, but snapcraft still tried to download the system golang-go package with version 1.10 and use it for building the snap.
Initially I tried to get it working in the Ubuntu VM, but was not successful -- that's why I switched to WSL. Maybe I have to give it another try.
Is an update to core20 planned in the future?
03-16-2021 04:17 PM
Yes, it was planned for RM21.07 but I will have to check the actual state.
03-22-2021 10:34 AM
Latest info is that there are evaluations until RM20.11 we can tell you more then.