diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-31 18:37:03 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-31 19:05:46 +0900 |
commit | e8309af42d6e9ce554961503638b4925c1a8a53d (patch) | |
tree | 484c9c86c75130f65a0a51c75561209da93f5977 | |
parent | 8c4d8ca2b7c886690fb933428c6768c745667db7 (diff) | |
download | buildstream-e8309af42d6e9ce554961503638b4925c1a8a53d.tar.gz |
_frontend/main.py: Hold on to unconditional startup messages
We avoid printing regular start/success/status messages etc
at startup time in advance of the heading, this would introduce
a lot of noise while interrogating source plugins for consistency
state.
This patch holds on to important errors and warnings which might
be raised by core components at startup time, and prints them
immediately after printing the heading.
-rw-r--r-- | buildstream/_frontend/main.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py index 2b61a596d..073bb8c3e 100644 --- a/buildstream/_frontend/main.py +++ b/buildstream/_frontend/main.py @@ -704,6 +704,7 @@ class App(): def __init__(self, main_options): self.main_options = main_options self.messaging_enabled = False + self.startup_messages = [] self.logger = None self.status = None self.target = None @@ -1023,6 +1024,11 @@ class App(): styling=self.colors, deps=deps) + # Print any held messages from startup after printing the heading + for message in self.startup_messages: + self.message_handler(message, self.context) + self.startup_messages = [] + # # Print a summary of the queues # @@ -1039,6 +1045,8 @@ class App(): # Drop messages by default in the beginning while # loading the pipeline, unless debug is specified. if not self.messaging_enabled: + if message.message_type in unconditional_messages: + self.startup_messages.append(message) return # Drop status messages from the UI if not verbose, we'll still see |