From 3cddb0e5c6e2fbc71e64e5cbbacb3b88ad2ad816 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 12 Sep 2021 02:34:13 -0400 Subject: [PATCH] deprecate layout=flat and warn people never to use it It's broken in various circumstances, no one seems to actually use it, CI doesn't test it, no one is committed to maintaining it, etc. etc. etc. Also, projects doing trivially reasonable things, such as generating "foo/util.py" and "bar/util.py", create clashing output names. This will never, ever, ever, ever work with layout=flat. Closes #996 Closes #1521 Closes #1908 Closes #7133 Closes #7135 Closes #7480 Closes #8378 --- mesonbuild/msetup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 3c98fca7a..a7d28dd43 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -267,6 +267,13 @@ class MesonApp: # by Interpreter() init, but this is most visible at the end if env.coredata.options[mesonlib.OptionKey('backend')].value == 'xcode': mlog.warning('xcode backend is currently unmaintained, patches welcome') + if env.coredata.options[mesonlib.OptionKey('layout')].value == 'flat': + mlog.warning('-Dlayout=flat is unsupported and probably broken. It was a failed experiment at ' + 'making Windows build artifacts runnable while uninstalled, due to PATH considerations, ' + 'but was untested by CI and anyways breaks reasonable use of conflicting targets in different subdirs. ' + 'Please consider using `meson devenv` instead. See https://github.com/mesonbuild/meson/pull/9243 ' + 'for details.') + except Exception as e: mintro.write_meson_info_file(b, [e]) if 'cdf' in locals():