www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Help to fix D-related issues in Meson build system

reply Denis Feklushkin <feklushkin.denis gmail.com> writes:
Hi!

In my hobby work on porting druntime to another architectures I 
actively use Meson build system. It allows to build huge 
heterogenous projects very conveniently without losing of control 
over fine-tuning.

But at present there are a lot of D-related issues in the Meson. 
In most cases this issues do not appear (many of us use meson 
with D every day without problems), but when you start using 
Meson to its fullest then issues become irritate require lot of 
hard tricks to get around them.

Support of individual languages ​​is not an biggest goal of Meson 
authors, as I understand. In my experience they are rather to fix 
and add functionality that applies to all supported languages ​, 
but not for some one rarely used. As a result, Meson contains 
serious errors related to D that no one tried to fix.

I wanted to appeal to those who were lucky enough to know both 
Python and D: please try to fix D-related functionality of Meson.

Thanks!

https://github.com/mesonbuild/meson/issues?q=is%3Aopen+is%3Aissue+label%3A%22D+language%22
Jul 18 2020
parent reply GoaLitiuM <goalitium dforums.mail.kapsi.fi> writes:
On Saturday, 18 July 2020 at 15:34:14 UTC, Denis Feklushkin wrote:
 I wanted to appeal to those who were lucky enough to know both 
 Python and D: please try to fix D-related functionality of 
 Meson.
I did briefly try to fix D support in Meson for a while, but in the end, the lack of tracking module dependencies caused too much issues during development, so I just gave up and fell back to using DUB. Doing full rebuilds also was not an option for me because it would take too much time to compile compared to build times with DUB. I might reconsider contributing for better D support once Makefile support (https://github.com/dlang/dmd/pull/11357 or https://github.com/dlang/dmd/pull/6961) gets accepted.
Jul 19 2020
parent reply Rogni <maktrefa gmail.com> writes:
On Sunday, 19 July 2020 at 16:01:35 UTC, GoaLitiuM wrote:
 I did briefly try to fix D support in Meson for a while, but in 
 the end, the lack of tracking module dependencies caused too 
 much issues during development
it's about this bug ? (import dependency from dub if dependency has other dependencies) https://github.com/mesonbuild/meson/issues/6586
Jul 21 2020
parent GoaLitiuM <goalitium dforums.mail.kapsi.fi> writes:
On Tuesday, 21 July 2020 at 10:09:23 UTC, Rogni wrote:
 On Sunday, 19 July 2020 at 16:01:35 UTC, GoaLitiuM wrote:
 I did briefly try to fix D support in Meson for a while, but 
 in the end, the lack of tracking module dependencies caused 
 too much issues during development
it's about this bug ? (import dependency from dub if dependency has other dependencies) https://github.com/mesonbuild/meson/issues/6586
No. Meson builds every D module file separately instead of building the whole project at once (similar to DUB's --build-mode=singleFile switch). When a module which another module depends on (imports) gets changed, both modules needs to be rebuilt before linking. Meson/ninja has currently no information about the dependency graph for situations like these so it will only issue rebuild on the changed files only, which will lead to bugs and crashes in some cases. The standard way of getting this information is through Makefile deps files, but D compilers opted for non-standard JSON format for some reason, which is not supported pretty much anywhere.
Jul 21 2020