From 0468922b50702cbaa6f1c26c7f982eb8100915f6 Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 1 Jun 2018 00:54:53 +0300 Subject: Check if there are any unpreprocessed files --- python/mozbuild/mozbuild/mach_commands.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python') diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index f654db769..9e769653e 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -541,6 +541,13 @@ class Build(MachCommandBase): # as when doing OSX Universal builds) pass + # Check if there are any unpreprocessed files + grepcmd = 'grep -E -r "^(#|%)ifdef" --include=\*.{js\*,css,x\*,h\*,manifest,dtd,properties} '\ + + self.topobjdir + '/dist/bin' + grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] + if grepresult: + print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult) + return status @Command('configure', category='build', -- cgit v1.2.3 From 6a28a5559ea3f17f236f85b0615dd1213562b984 Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 1 Jun 2018 16:34:31 +0300 Subject: Update the list of directives and file extensions for check --- python/mozbuild/mozbuild/mach_commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 9e769653e..b8755e260 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -541,9 +541,11 @@ class Build(MachCommandBase): # as when doing OSX Universal builds) pass - # Check if there are any unpreprocessed files - grepcmd = 'grep -E -r "^(#|%)ifdef" --include=\*.{js\*,css,x\*,h\*,manifest,dtd,properties} '\ - + self.topobjdir + '/dist/bin' + # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin' + # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives + grepcmd = 'grep -E -r "^(#|%)(define|el|endif|error|expand|filter|if|include|literal|undef|unfilter)" '\ + + '--include=\*.{css,dtd,h\*,js\*,x\*,manifest,properties,rdf} '\ + + self.topobjdir + '/dist/bin | grep -v ".css:#"' grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] if grepresult: print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult) -- cgit v1.2.3 From ced9c8b9df1f3672e9b987adbfce95cdcdec2e06 Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 1 Jun 2018 17:39:43 +0300 Subject: Refine the file extensions even more --- python/mozbuild/mozbuild/mach_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index b8755e260..78d9b40be 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -544,7 +544,7 @@ class Build(MachCommandBase): # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin' # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives grepcmd = 'grep -E -r "^(#|%)(define|el|endif|error|expand|filter|if|include|literal|undef|unfilter)" '\ - + '--include=\*.{css,dtd,h\*,js\*,x\*,manifest,properties,rdf} '\ + + '--include=\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf} '\ + self.topobjdir + '/dist/bin | grep -v ".css:#"' grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] if grepresult: -- cgit v1.2.3 From 93774317fae6b7f370a43c50f8811e1f8e1f0d5c Mon Sep 17 00:00:00 2001 From: JustOff Date: Sat, 2 Jun 2018 21:05:05 +0300 Subject: Don't search for directives that are never used alone --- python/mozbuild/mozbuild/mach_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 78d9b40be..1bd5b8d34 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -543,7 +543,8 @@ class Build(MachCommandBase): # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin' # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives - grepcmd = 'grep -E -r "^(#|%)(define|el|endif|error|expand|filter|if|include|literal|undef|unfilter)" '\ + # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone + grepcmd = 'grep -E -r "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\ + '--include=\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf} '\ + self.topobjdir + '/dist/bin | grep -v ".css:#"' grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] -- cgit v1.2.3 From 5182fe0455970f1d79d59904604ed3c407ae55ab Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 8 Jun 2018 16:31:11 +0200 Subject: Make sure the waiting message is actually displayed. --- python/mozbuild/mozbuild/config_status.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py index 343dcc3a2..3557bbf77 100644 --- a/python/mozbuild/mozbuild/config_status.py +++ b/python/mozbuild/mozbuild/config_status.py @@ -142,7 +142,8 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None, log_manager.add_terminal_logging(level=log_level) log_manager.enable_unstructured() - print('Reticulating splines...', file=sys.stderr) + print('Feeding the hatchlings...', file=sys.stderr) + sys.stderr.flush() if len(selected_backends) > 1: definitions = list(definitions) -- cgit v1.2.3