Stripped down Status and StatusOr as a standalone library? #1679
Replies: 3 comments
-
We currently don't have any reason to look into making the If this is really a problem for you, here are a couple ideas:
If you are having trouble building SDL under Bazel, here are some ideas:
|
Beta Was this translation helpful? Give feedback.
-
Hey, just wanted to thank you for your answer. While it's essentially a "no" to what I asked about, the suggestions for alternatives helped me figure out what to do. I used If I were still at Google I'd have given you a peer bonus. Thanks again for such a kind and helpful answer. |
Beta Was this translation helpful? Give feedback.
-
Just in case someone needs it, |
Beta Was this translation helpful? Give feedback.
-
Context: I'm writing some C++ code. My codebase is really small (7k SLOC), and I try to keep my dependencies lean; I build on Linux and macOS, potentially on Windows in the future. For now I only have SDL as a dependency. I don't use CMake (at the time being). I'd love to use Bazel, but I can't seem to build SDL using Bazel, so that's not an option for my project. For now I'm completely happy with a handwritten Makefile.
The main thing I'm missing is Status/StatusOr. The alternatives are kind of clunky; sometimes I use a bool as a return value whether the call was successful. Sometimes I pass in references, I'm experimenting with various approaches, but there really isn't a good substitute for Status and StatusOr.
I wrote a set of GNU Make rules to build Abseil, and I was able to include it in my app. But I realized that pulling in the entirety of Abseil as a dependency of my tiny program is a bit much; if Abseil doesn't build on macOS for example, for whatever reason, I will have a problem.
I'd really like to use Status and StatusOr. I contemplated writing something similar myself, but if the work has already been done in Abseil, it makes a lot of sense to reuse it.
The header files currently pull in a number of dependencies that run relatively deep into the core of Abseil. I tried to identify the minimal set of dependencies, but didn't succeed. I ended up having to compile the entire Abseil.
Could Status and StatusOr be made more modular? Did anyone look into this?
Beta Was this translation helpful? Give feedback.
All reactions