3 ms·
Creating your own build tools becomes unmaintainable by anyone else. People do it all the time, and pay the price when they have to change their builds. There i
by devwastaken 8y ago
Creating your own build tools becomes unmaintainable by anyone else. People do it all the time, and pay the price when they have to change their builds. There is a reason CMake is used by a lot of projects, it's not somehow due to everyones incompetance.
- deleted 8y ago[deleted]
- whatshisface 8y agoIf the build system was a library called from a popular scripting language, it would only take a few minutes of reading the API docs before it builds could be modified. Also, there is a niche for new build systems: one-off projects that "don't matter." If you want to introduce a new build system, your first target market could be throwaway point-a-to-point-b projects and then you could expand outwards from there.
- vvanders 8y agoThat's basically Gradle and if you think cmake is bad you haven't seen some of monstrosities that can be created when you open up a whole programming language. From what I've seen cargo gets most of the parts right. You can have a programmatic pre-build script bit can't take over the whole building process.
- kuschku 8y agoYes, with gradle you can create true monstrosities — and even my own projects aren’t free of those, sadly, because sometimes there’s just no alternatives. Here’s a few examples: Dynamically using git describe to determine version and build number (which is actually just the # of commits that ever occured, to allow reproducable builds) versionCode = cmd("git", "rev-list", "--count", "HEAD")?.toIntOrNull() ?: 1 versionName = cmd("git", "describe", "--always", "--tags", "HEAD") ?: "1.0.0" Putting git infos into certain classes buildConfigField("String", "GIT_HEAD", "\"${cmd("git", "rev-parse", "HEAD") ?: ""}\"") buildConfigField("String", "FANCY_VERSION_NAME", "\"${fancyVersionName() ?: ""}\"") buildConfigField("long", "GIT_COMMIT_DATE", "${cmd("git", "show", "-s", "--format=%ct") ?: 0}L") Using string interpolation to change the output file to include the version setProperty("archivesBaseName", "Quasseldroid-$versionName") But the worst part is that often on StackOverflow you only find ugly hacks adding custom tasks, removing tasks, modifying them, etc with ugly hacks. And even worse, sometimes there’s just no good alternative at all. Which is why gradle took so long to clean up some parts of their API, or introduce parallel builds.
- dfgdghdf 8y agoBuck and Bazel work this way. The language is Python (with some optimizations). However, the build is fast because Python is only used to describe the build graph.