-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor WORKSPACE #445
Refactor WORKSPACE #445
Conversation
I'm not really following the factoring you're aiming for so far... Curious what the problem is that you're hitting and what the overall structure you're aiming for is? Splitting everything up into the I could see just factoring out into separate files for general areas -- Python, C++ toolchain-y stuff, LLVM-y stuff, Bison/Flex-y stuff. But I'd just use single files and macros for that? But worried I'm just not understanding the problem you're trying to solve that motivates one factoring over another. Relatedly -- what other repositories? Anything I can help with? |
A bzl file needs to have I've been considering adding repositories for botli, woff2, and re2 as I work towards the conversion tooling. |
Maybe its just me, but I find having everything spread out across so many files harder to keep track of than everything being lumped together into the That said, there might be a different way to factor things that would work better using
What do you think about just checking them into our third_party directory? Given that we'll likely want to patch and compare things, it seems like even submodules might not make much sense, and instead just dropping them directly into the repository pinned to specific version might be fine... |
Yes, I think we differ here: for me, the WORKSPACE is already hitting the tipping point of unreadability. This is a bit like large functions: I interpret it as a long, linear ordering with no obvious rationale for that. Anyways, given there isn't consensus that this needs to be cleaned up yet, I'll abandon this change.
Both brotli and re2 provide WORKSPACE files. Regardless of how they're pulled in, they would still need an entry (directly or indirectly) in our workspace. |
fwiw I'm very sympathetic to @jonmeow 's view here -- it's hard for me to follow the But I looked at Envoy and gRPC -- two projects that have spent a lot more energy on their Bazel configs than I hope we ever will -- and it doesn't seem like they've done much better:
The pattern seems to be to have a stage that loads everything, then an "extra" stage that calls functions from the loaded modules. More context on ideas for better Maybe we can get some value out of separating sections with headers and some whitespace? |
Trying to make it more readable. I've been considering adding some more repositories, but I'm pausing because it seems to be getting really messy.