{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/16014","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/16014/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/16014/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/16014/events","html_url":"https://github.com/godotengine/godot/issues/16014","id":291031892,"number":16014,"title":"Consider moving the buildsystem to Meson","user":{"login":"RiverMesa","id":14968217,"avatar_url":"https://avatars0.githubusercontent.com/u/14968217?v=4","gravatar_id":"","url":"https://api.github.com/users/RiverMesa","html_url":"https://github.com/RiverMesa","followers_url":"https://api.github.com/users/RiverMesa/followers","following_url":"https://api.github.com/users/RiverMesa/following{/other_user}","gists_url":"https://api.github.com/users/RiverMesa/gists{/gist_id}","starred_url":"https://api.github.com/users/RiverMesa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RiverMesa/subscriptions","organizations_url":"https://api.github.com/users/RiverMesa/orgs","repos_url":"https://api.github.com/users/RiverMesa/repos","events_url":"https://api.github.com/users/RiverMesa/events{/privacy}","received_events_url":"https://api.github.com/users/RiverMesa/received_events","type":"User","site_admin":false},"labels":[{"id":279097162,"url":"https://api.github.com/repos/godotengine/godot/labels/discussion","name":"discussion","color":"ee77ee","default":false},{"id":73330068,"url":"https://api.github.com/repos/godotengine/godot/labels/feature%20proposal","name":"feature proposal","color":"1144ff","default":false},{"id":279098009,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:buildsystem","name":"topic:buildsystem","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2018-01-23T23:32:06Z","updated_at":"2018-04-28T17:13:23Z","closed_at":null,"author_association":"NONE","body":"[Meson's website](http://mesonbuild.com)\r\n\r\nI know, this is a bit of a hot topic, or at least a \"*nobody really wants to discuss it because nobody wants to actually do it*\" topic, so I'm putting massive emphasis here on the \"consider\" part. If the end result of this discussion is that Godot's build system shall stay the way it is, so be it.\r\n\r\nSo currently, Godot uses [SCons](http://scons.org), and I get why that is - it's a very powerful build system (since it's basically using Python to write build scripts), and the way it's setup in Godot makes it extremely easy to use. However, it's not without its downsides - primarily, that it's quite slow (being basically that SCons build files are Python scripts, and most Python interpreters do not particularly excel at execution speed), and because of its relative lack of popularity, difficult to find many resources or documentation about it.\r\nPlus, I don't personally know how maintainable or easy-to-work-with the buildsystem code, but in my opinion it shouldn't be the sort of situation of \"don't touch this code ever, or you risk breaking it and having to do boring and painful work just to get the project working again\".\r\n\r\nNow, I realize that Godot's project structure is not simple and that's a huge reason why SCons is what was chosen as the build system (and why there has been massive reluctance to move to another system), but I don't really believe that it's *the only* build system that can possibly satisify Godot's requirements. Feel free to prove me wrong, though.\r\n\r\nSo what *could* a migration to Meson offer? \r\n- Better baseline build speeds (and potentially that much better if unity or threaded builds are taken advantage of) [[Some sample benchmarks]](http://mesonbuild.com/Simple-comparison.html)\r\n\r\n- The use of Meson's dependency system, `wrap`, would help reduce the repository size (third party dependencies would no longer have to be included with the project, and would certainly also help when said dependencies need to be updated to new versions. Use of wrap would even allow for modules (both official and custom) to be simply included as 'subprojects' (and offloaded to their own repositories), further reducing the main repo's size. [[On `wrap`]](http://mesonbuild.com/Wrap-dependency-system-manual.html)\r\n\r\n- I don't know where SCons stands regarding this, but it seems like Meson is designed to play nicely with CI tools such as Travis and AppVeyor, which might be of note. [[CI]]( http://mesonbuild.com/Continuous-Integration.html)\r\n\r\n- Meson also appears to some degree of support for localization, but it appears to be `gettext` based which I believe differs from the way Godot handles this, so I'm not sure how compatible this is here. [[Localisation]](http://mesonbuild.com/Localisation.html)\r\n\r\n- Right now Godot does not seem to make much use of unit tests (the [godot-tests](https://github.com/godotengine/godot-tests) repo seems to be rather low-activity), but Meson has full support for performing such tests, which may be valuable. [[Unit tests]](http://mesonbuild.com/Unit-tests.html)\r\n\r\n- In addition to providing a way to generate the relevant files for both Visual Studio and XCode, Meson comes with an API that allows for integration with IDEs and other build tools, which again seems like something of value for those who don't use VS or XCode. [[IDE integration]](http://mesonbuild.com/IDE-integration.html)\r\n\r\n\r\nThis is all in addition to supporting (almost?) everything that Godot already uses and requires - cross-compilation support, source generation, running external commands, et cetera.\r\nIt's evidently a buildsystem that is capable of handling both small and big and complex projects - complex projects like systemd, GNOME, elementaryOS, Xorg, Mesa.\r\n\r\nNo promises, but I *may* be able to try and work on a proof-of-concept of this, to see how it fares. Also if there are any Meson experts/enthusiasts reading this, please feel free to chime in, as I probably got a few things wrong (both wrt Meson and SCons).\r\n\r\nCheers!"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/385191549","html_url":"https://github.com/godotengine/godot/issues/16014#issuecomment-385191549","issue_url":"https://api.github.com/repos/godotengine/godot/issues/16014","id":385191549,"user":{"login":"slurps-mad-rips","id":63051,"avatar_url":"https://avatars0.githubusercontent.com/u/63051?v=4","gravatar_id":"","url":"https://api.github.com/users/slurps-mad-rips","html_url":"https://github.com/slurps-mad-rips","followers_url":"https://api.github.com/users/slurps-mad-rips/followers","following_url":"https://api.github.com/users/slurps-mad-rips/following{/other_user}","gists_url":"https://api.github.com/users/slurps-mad-rips/gists{/gist_id}","starred_url":"https://api.github.com/users/slurps-mad-rips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slurps-mad-rips/subscriptions","organizations_url":"https://api.github.com/users/slurps-mad-rips/orgs","repos_url":"https://api.github.com/users/slurps-mad-rips/repos","events_url":"https://api.github.com/users/slurps-mad-rips/events{/privacy}","received_events_url":"https://api.github.com/users/slurps-mad-rips/received_events","type":"User","site_admin":false},"created_at":"2018-04-28T17:13:23Z","updated_at":"2018-04-28T17:13:23Z","author_association":"NONE","body":"I'm very interested in doing the footwork to move Godot to Meson. The only thing currently stopping me from contributing to Godot (and using it) is Scons. I had to use it years ago, and I've never had a more painful incremental development experience in my entire life.\r\n\r\nThe article linked above has a lot of strawman arguments, arguing that CMake already exists and we should just use that. Meson's build files are extremely easy to read, and use a syntax close to that of Python. Conversion can be quick. What I'm posting in this thread for is, if the footwork was done, would a pull request even be considered for merging?"}}
{"actor":{"display_login":"slurps-mad-rips"}}