3 ms·
I wouldn’t call Bazel confusing or arcane, but it is powerful. I find it rather delightful to use.
by new_realist 7y ago
I wouldn’t call Bazel confusing or arcane, but it is powerful. I find it rather delightful to use.
- mook 7y agoAs a relatively newcomer to bazel, I did find it arcane: - I couldn't find an easy way to list targets - in particular, a way to show me the path to the build artifacts (so that I could inspect it in my editor) - I couldn't find a way to do build configurations (especially intersections of build configurations) - it didn't seem great at handling non-file build steps (set up a cluster / server / whatever so I can run my tests) - the documentation was slow to load and hard to find things in (you basically had to use search, instead of browsing a good table of contents) As I said, though, I'm a newcomer; it's quite possible there are good ways to do those things, I just hadn't managed to find it in the documenting yet. That and the issues are by no means unique to bazel. I also do like some aspects of it (like enforced out-of-tree builds), but that's off-topic ;)
- joshuamorton 7y agoConfigs: look into select() and modes. Non-file steps: normally in bazel you would consider the server setup a part of the test. So `blaze build :my_test` creates an artifact, and blaze run or blaze test runs the artifact which does non-hermetic stuff like setting up a server.
- emidln 7y agoListing targets in a package: bazel query //some/package:* Listing targets in a package including subpackages: bazel query //some/package/... These and more are covered in the documentation on querying: https://docs.bazel.build/versions/1.0.0/query.html#target-patterns https://docs.bazel.build/versions/1.0.0/query.html#target-pa...