Caveat: these are my problems. They happen to be fairly widespread, but they aren't the only problems in the world, they're just the ones I've fallen over at scale.
- Cross-repo version management. Various forms of this exist, notably https://github.com/bazelbuild/bazel-federation. None of them are as polished as I would like, and there's a collection of interesting problems around "how to get users to update to newer versions?" and "how to test that a new release is compatible with existing users?" which sound an awful lot like wanting a scalable, git-friendly variation on rosie and TAP. It's also a fairly manual process to update dependencies in these things, and we could use a better solution here (we might have an intern trying to make progress on that last puzzle at the moment).
- Nontrivial logic in WORKSPACE routinely falls foul of the byzantine, not-precisely-starlark language used here - the order-sensitivity is confounding to tools like buildozer, and the top-level chunking isn't powerful enough to allow the creation of interesting macros. An example problem here would be "how do I selectively define repos based on platform?", and the available solutions today are to either rewrite every repository_rule to include this feature, or to have a repository_rule which generates a .bzl file with another macro in, and then call it - which isn't unreasonable, until you realise that this can only be done from the top-level WORKSPACE file, and not within a macro. https://github.com/bazelbuild/proposals/blob/master/designs/2019-01-14-delayed-load.md was one attempt at untangling this puzzle, but we never got it off the ground. I'm going to stick a flag in the ground and claim that the ideal state would be for WORKSPACE to be processed like any other BUILD file, with the only difference being that repository_rules can be called and rules cannot. That means both the chunking and the order-sensitivity need to go, and the whole concept of namespacing in //external needs to be rethought.
- Building without internet access. I know this sounds annoying, but it's a real problem (and hey, blaze works without internet access, so it's not unprecedented). The constraints I'm usually operating under are that there is some magic black-box system which downloads and blesses bytes as safe for use, and all downloads have to be sent via this system. We can't use http proxies for this, because all URLs are https these days and the magic black-box needs to introspect the content. The remote asset API might work here, if bazel implemented it.
The way I think of this is that WORKSPACE should either be procedural, or declarative, but not a little of both.
- Building without internet access. I know this sounds annoying, but it's a real problem (and hey, blaze works without internet access, so it's not unprecedented). The constraints I'm usually operating under are that there is some magic black-box system which downloads and blesses bytes as safe for use, and all downloads have to be sent via this system. We can't use http proxies for this, because all URLs are https these days and the magic black-box needs to introspect the content. The remote asset API might work here, if bazel implemented it.
There are a few issues buried here behind the different styles of what that could mean
- I just want to build offline: I need to run bazel in a mode that downloads and caches everything once. Bonus points for dealing with --config so I only download the tools needed for the targets I work on
- I want to know my dependencies and save them in a private repository. Like the above, but you'll put the archives in source control.
- I want to use *my* version of some repositories. For example, you might have a patched bazel-skylib, and you want that used regardless of whatever version any other repository asks for in its dependencies.