3 ms·
https://www.reddit.com/r/golang/comments/5alxa3/gos_alias_proposal_and_all_my_concerns_of_google/d9i15sj/ https://www.reddit.com/r/golang/comments/5alxa3/gos_al
by secure 10y ago
https://www.reddit.com/r/golang/comments/5alxa3/gos_alias_proposal_and_all_my_concerns_of_google/d9i15sj/ https://www.reddit.com/r/golang/comments/5alxa3/gos_alias_pr... points out that this isn’t actually a problem that is specific to Google, but rather affects the FOSS community as a whole, and I think the recent move of golang.org/x/net/context into the stdlib (as context/) is a perfect example.
The author of the article doesn’t seem to mention or consider this point at all.
- sagichmal 10y agoYet there are existing solutions to the context issue, namely vendoring and versioning, that work well for OSS but don't work for Google. The alias change could be useful in OSS, but it's certainly most useful in a monorepo.
- secure 10y agoVendoring still requires that _all your dependencies_ (even vendored) use _either_ “golang.org/x/net/context” _or_ “context”, hence I don’t quite see how that addresses the problem. Can you elaborate?
- Kubuxu 10y agoThe 'context' problem is an interesting one. Application I am working on was creating over 5k additional goroutines for context handling because part was using context from mainlib and part was using /x/net/context. The lib has special optimization that would fail if you mixed both.