5 ms·
Would have hoped they would use bazel instead. It's open-source, and so much easier to deal with than CMake.
by halflings 7y ago
Would have hoped they would use bazel instead.
It's open-source, and so much easier to deal with than CMake.
- 4ad 7y agoAre you kidding me, bazel is written in Java...
- malkia 7y agoso what? Bazel spawns a server, the next invocation is really fast.
- tonyarkles 7y agoYou’re not helping your case! Spawning a server (a JVM-based one at that!) to be able to get reasonably performant builds is horrifying! As a simple example, I hack on a Qt app on a Raspberry Pi (it has a tiny display on it and I run a dashboard). It’s only got 512MB of RAM and spinning up a JVM server to run my builds will likely cause it to run out of RAM. I’m not the world’s biggest fan of CMake, but it sure solves a lot of problems while being quite lightweight. And I’ll take it over qmake, mostly because I know CMake well enough and haven’t ever really gotten into the guts of qmake. CMake is more general purpose.
- wwright 7y agoBazel’s approach is to cross compile from a stronger platform
- pjmlp 7y agoSo it not only requires a daemon, it also depends on additional hardware.
- wwright 7y agoIt doesn’t depend on additional hardware, but it’s designed to make it very easy to cross compile. The internal Google tool it’s built on also has strong support for sharing build servers between devs, and they want to enable that in the open source version. It also doesn’t require a daemon: you can ask it not to do that, so the biggest cost is a JVM warmup. That said, these are really moot concerns: for almost any project where engineering is involved, the cost of having an engineer in the first place significantly outweighs the costs of having as many hefty CPUs as you really need for build. If you can’t get a decent i7 for a build node, there’s probably a lot more things limiting you, too.
- malkia 7y agoI don't get why are you saying it's horrifying. It keeps cached copy of the build graph, among other things, so subsequent invocations of the build systems, there is less to read cold again. It's pretty good design. Also the server dies after some time (controlled by some default). MOC/UIC/RCC would've integrated much easier there, than what's right now.
- tonyarkles 7y agoHow much memory does that take, vs something like CMake that starts cold? I can see why you'd want to do that if you have an absolutely massive dependency graph for your build, but outside of a few select companies, that's probably not the case.
- malkia 7y agoHonestly I haven't measured, ballpark figure would be hundreth megabytes to gigabyte. Given that it's standard on dev/build machines to have more than 8GB I don't see it as a problem. Memory is cheaper these days than developer's time.
- tempguy9999 7y agoIf you're doing development, having a RPi and 0.5 GB of ram is just weird. In principle I do agree that modern stuff is horribly bloated and I can bitch all day on the subject, OTOH it's where we are now. Invest in a machine of suitable spec, and BTW that usually means RAM more that CPU (IME anyway). Don't hamstring yourself.
- tonyarkles 7y agoI do have a quite beefy machine, and yet, I'd still rather not have a bunch of RAM-hungry "build servers" running when there's much lighter tools available. They compete with all of the RAM-hungry Electron apps /s The Pi is like that because I can ssh into it, make a tweak, rebuild, and carry on with life.
- cerberusss 7y agoI instantly understand what you're saying. I wouldn't want that in my build process either.
- malkia 7y agoMe too. I love bazel, for the plain syntax, sandwiches (deps between languages), determinism, just plain good stuff. I use it for all my new personal projects (linux/windows).
- wokwokwok 7y agoNo one loves CMake and it’s custom scripting language. It’s selling point is that it works, and it does. Its a pragmatic choice. I think this is one of those “join the crowd” things at this point. Picking CMake for QT is a great decision. ...for personal projects, by all means take your pick, but bazel wasn’t ever really a contender in this space for them.
- slavik81 7y agoThey've been working on the transition from QMake to CMake since 2012 (or earlier). It was a topic at the Qt Developer Days when they released Qt5, long before Bazel was an option.