News for hackers. Stuff that matters.
Re:Fish (shell) porting to Rust from C++ by jwkpiano1 on Monday January 30, 2023 @10:55PM (#34590763)
Bazel is supported by Google and is quite good. I’d certainly take it over CMake.
Re:Fish (shell) porting to Rust from C++ by mlindner on Monday January 30, 2023 @11:04PM (#34590871)
Interesting. My friend, who works at well known gaming company you've probably heard of, recently spent several months of his life fighting back against a group of people that came in from an acquisition that were trying to convert the company's well-working CMake system over to Bazel. He described it in pretty poor terms and described how it constantly caused the build system to fail. He eventually succeeded in convincing management to keep the CMake system rather than converting it to Bazel at the objection of the more senior devs from the acquisition.
Re:Fish (shell) porting to Rust from C++ by jwkpiano1 on Tuesday January 31, 2023 @12:12AM (#34591444)
It’s a somewhat steep learning curve, but in my experience once you have your Bazel rules set up properly, it’s incredibly powerful, enabling lots of time savings from caching, as well as helping enforce reproducible outputs.
Re:Fish (shell) porting to Rust from C++ by rtpg on Tuesday January 31, 2023 @02:29AM (#34592345)
I feel like Bazel is much more convincing _after it's working_, cuz you really do get much faster builds. But the work has to be done, and there's a lot of unlearning to do.

If your project doesn't take long to compile or test anyways.... I can see getting annoyed.

Re:Fish (shell) porting to Rust from C++ by simplotek on Tuesday January 31, 2023 @02:44AM (#34592447)
> I feel like Bazel is much more convincing _after it's working_, cuz you really do get much faster builds.

I have to call bullshit on this claim.

CMake is at its hear a build system generator. It offers a high-level abstraction to define software projects, and it uses that abstraction to generate the actual build system. It can generate makefiles, but also Ninja, Xcode, visual studio, and even msbuild projects.

What actually does the build is not CMake, but make, msbuild, ninja, Xcode, or visual studio. Not CMake.

You run CMake once to generate the build project, and when you actually want to build the project you only call ninja or make etc.

To top that off, some of these build systems support build cache systems such as sccache or ccache. Plugging in one of these tools can easily drop build times to a fraction of the time. Literally. I had C++ projects which used CMake whose build time of a complete rebuild dropped to 15% of it's original time.

Re:Fish (shell) porting to Rust from C++ by throwaway894345 on Tuesday January 31, 2023 @12:51AM (#34591713)
I haven’t been able to get Bazel to work passively for small, non-toy Go projects—I’m sure it’s something I’m doing wrong, but Bazel is a complex beast to operate. It’s far more complicated to use than Cargo.
Re:Fish (shell) porting to Rust from C++ by habitue on Tuesday January 31, 2023 @02:01AM (#34592139)
use bazel if you're compiling large C++ or Java projects. If you're using rust, use cargo.

Nothing beats a language's own dedicated packaging system (yes, even python's mess is better than bazel+python) but C++ and Java have bad build systems, so bazel is better for them

Re:Fish (shell) porting to Rust from C++ by throwaway894345 on Tuesday January 31, 2023 @12:16PM (#34598045)
Granted, but the context of the thread was that C++ build tools are low quality compared to other ecosystems, and you mentioned that Bazel was supported and "quite good" implying that it was comparable with other language ecosystems (perhaps that's not what you intended to communicate?). I believe that it's better than CMake, but the original point (C++ lacks good build tooling compared to other languages) still stands IMHO.
Re:Fish (shell) porting to Rust from C++ by Pet_Ant on Friday February 03, 2023 @10:57AM (#34642795)
> but C++ and Java have bad build systems, so bazel is better for them

What is wrong with Maven or Gradle?