I've removed the --reconfigure argument in the meson setup task.
I've run invoke which runs mediasoup-worker task which runs setup task. Everything is built properly.
I've added a new file worker/src/foo.cpp with some random content and added it in meson.build.
I've run invoke again which, according to the issue reported in ninja project, should now fail with "ModuleNotFoundError: No module named 'mesonbuild'". However it doesn't fail.
Perhaps the issue was auto-magically fixed in some recent version of meson or ninja and we didn't notice it when we upgraded those in mediasoup in the recent past.
BTW, even if the issue still exists when manually editing meson.build (I couldn't reproduce it as told above), the user could just call invoke with MESON_ARGS="--reconfigure" invoke. We don't need all those try/except with 99% duplicate code.
Details
meson setup
.--reconfigure
.Rationale
Previous code was a workaround for a potential issue https://github.com/ninja-build/ninja/issues/1997 in ninja, however I cannot reproduce it. This is what I've tried:
--reconfigure
argument in themeson setup
task.invoke
which runsmediasoup-worker
task which runssetup
task. Everything is built properly.worker/src/foo.cpp
with some random content and added it inmeson.build
.invoke
again which, according to the issue reported in ninja project, should now fail with "ModuleNotFoundError: No module named 'mesonbuild'". However it doesn't fail.Perhaps the issue was auto-magically fixed in some recent version of meson or ninja and we didn't notice it when we upgraded those in mediasoup in the recent past.
BTW, even if the issue still exists when manually editing
meson.build
(I couldn't reproduce it as told above), the user could just callinvoke
withMESON_ARGS="--reconfigure" invoke
. We don't need all those try/except with 99% duplicate code.