From 6006987ce5081534a129ee2d9d55d993c7a76b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 3 Aug 2020 11:14:52 +0200 Subject: "Downgrade" warning when regenerating after version bump There is nothing to "warn" about, this is a completely routine occurence. OTOH, when something is corrupted, we should warn. Keep the red color and "WARNING:" prefix in that case. Example output: $ ninja -C build Regenerating configuration from scratch: Build directory has been generated with Meson version 0.55.999, which is incompatible with current version 0.56.0. The Meson build system Version: 0.56.0 ... --- mesonbuild/environment.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mesonbuild/environment.py') diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 01fc8e4..6987863 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -523,6 +523,11 @@ class Environment: self.first_invocation = False except FileNotFoundError: self.create_new_coredata(options) + except coredata.MesonVersionMismatchException as e: + # This is routine, but tell the user the update happened + mlog.log('Regenerating configuration from scratch:', str(e)) + coredata.read_cmd_line_file(self.build_dir, options) + self.create_new_coredata(options) except MesonException as e: # If we stored previous command line options, we can recover from # a broken/outdated coredata. -- cgit v1.1