aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreterbase
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-01-11 11:59:14 -0800
committerEli Schwartz <eschwartz93@gmail.com>2023-01-20 00:18:42 -0500
commiteaf365cb3ef4f1c2ba66e07237d86a44089aff4f (patch)
treec9fbc02347daf2aa3b64c8735727462cb00328b9 /mesonbuild/interpreterbase
parentc8b8e7e73221ccefdd79c9807d67241f60963e6c (diff)
downloadmeson-eaf365cb3ef4f1c2ba66e07237d86a44089aff4f.zip
meson-eaf365cb3ef4f1c2ba66e07237d86a44089aff4f.tar.gz
meson-eaf365cb3ef4f1c2ba66e07237d86a44089aff4f.tar.bz2
decorators: don't unsort sorted values for printing
Currently in our deprecated/new feature printing we carefully sort all of the values, then put them in a set to print them. Which unsorts them. I'm assuming this was done because a set looks nice when printed (which is true). Let's keep the formatting, but print them in a stable order.
Diffstat (limited to 'mesonbuild/interpreterbase')
-rw-r--r--mesonbuild/interpreterbase/decorators.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase/decorators.py b/mesonbuild/interpreterbase/decorators.py
index 173cedc..7486915 100644
--- a/mesonbuild/interpreterbase/decorators.py
+++ b/mesonbuild/interpreterbase/decorators.py
@@ -652,10 +652,11 @@ class FeatureCheckBase(metaclass=abc.ABCMeta):
fv = cls.feature_registry[subproject]
tv = cls.get_target_version(subproject)
for version in sorted(fv.keys()):
+ message = ', '.join(sorted(f"'{i[0]}'" for i in fv[version]))
if cls.check_version(tv, version):
- notice_str += '\n * {}: {}'.format(version, {i[0] for i in fv[version]})
+ notice_str += '\n * {}: {{{}}}'.format(version, message)
else:
- warning_str += '\n * {}: {}'.format(version, {i[0] for i in fv[version]})
+ warning_str += '\n * {}: {{{}}}'.format(version, message)
if '\n' in notice_str:
mlog.notice(notice_str, fatal=False)
if '\n' in warning_str: