Hi, while working with a bitbake/yocto based project I noticed a build fail while the `do_compile` phase of a `go` based project. According to my observation the `go.bbclass` sets `do_compile[network] = "1"` as go downloads the pkgs while the compile step. This works fine if NO corporate proxy is in place. I noticed that the proxy environment variables http_proxy/https_proxy/no_proxy (as well as the uppercase variants) were not part of the environment of the compile phase. Thus it fails to downloads the go pkgs. I handed in a patch https://lists.openembedded.org/g/bitbake-devel/message/17809 that uses the existing `export_proxies` routine to forward the proxy related variables (among others https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/fetch2/__init__.py#n873)
The proxies being set is a property of the do_fetch task, not the network flag. We don't really want to associate the proxy support to the network flag. However, correct fix should be pretty simple: add a prefunc to your do_compile task that explicitly calls bb.utils.export_proxies(d)