Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/mobile: binding doens't seem to reuse build cache for modules #37902
Apologies for not adhering to the default issue template, the issue is not a "bug" per se and not an issue with Go itself, so all those version and env infos would be useless.
E.g. Binding https://github.com/coronanet/go-coronanet will take 30 mins as it needs to build a dependent package that contains a huge C library (Tor). However, trying to call bind again with zero modifications will again take 30 mins. This is in contrast with building simply with Go locally, which will take 5 mins for the first run, but will be ~instantaneous afterwards (only link time is left).
My best guess until now is that
Continuing a thread from the above issue:
No, I'm not referring to caching the generated files, rather the module dependencies of them, which should most definitely be cacheable.
The temporary directory is created in the following line: https://github.com/golang/mobile/blob/0df4eb2385467a487d418c6358313e9e838256ae/cmd/gomobile/env.go#L61