Unverified Commit bd089974 authored by J-P Nurmi's avatar J-P Nurmi Committed by GitHub

[flutter_tools] catch fatal build output errors on Linux (#72559)

parent 14206399
...@@ -17,10 +17,10 @@ import '../plugins.dart'; ...@@ -17,10 +17,10 @@ import '../plugins.dart';
import '../project.dart'; import '../project.dart';
// Matches the following error and warning patterns: // Matches the following error and warning patterns:
// - <file path>:<line>:<column>: error: <error...> // - <file path>:<line>:<column>: (fatal) error: <error...>
// - <file path>:<line>:<column>: warning: <warning...> // - <file path>:<line>:<column>: warning: <warning...>
// - clang: error: <link error...> // - clang: error: <link error...>
final RegExp errorMatcher = RegExp(r'(?:.*:\d+:\d+|clang):\s?(?:error|warning):\s.*', caseSensitive: false); final RegExp errorMatcher = RegExp(r'(?:.*:\d+:\d+|clang):\s?(fatal\s)?(?:error|warning):\s.*', caseSensitive: false);
/// Builds the Linux project through the Makefile. /// Builds the Linux project through the Makefile.
Future<void> buildLinux( Future<void> buildLinux(
......
...@@ -224,6 +224,7 @@ lib/main.dart:4:3: Error: Method not found: 'foo'. ...@@ -224,6 +224,7 @@ lib/main.dart:4:3: Error: Method not found: 'foo'.
/foo/linux/main.cc:9:7: warning: unused variable 'unused_variable' [-Wunused-variable] /foo/linux/main.cc:9:7: warning: unused variable 'unused_variable' [-Wunused-variable]
/foo/linux/main.cc:10:3: error: unknown type name 'UnknownType' /foo/linux/main.cc:10:3: error: unknown type name 'UnknownType'
/foo/linux/main.cc:12:7: error: 'bar' is a private member of 'Foo' /foo/linux/main.cc:12:7: error: 'bar' is a private member of 'Foo'
/foo/linux/my_application.h:4:10: fatal error: 'gtk/gtk.h' file not found
[3/6] Building CXX object CMakeFiles/foo_bar.dir/flutter/generated_plugin_registrant.cc.o [3/6] Building CXX object CMakeFiles/foo_bar.dir/flutter/generated_plugin_registrant.cc.o
[4/6] Building CXX object CMakeFiles/foo_bar.dir/my_application.cc.o [4/6] Building CXX object CMakeFiles/foo_bar.dir/my_application.cc.o
[5/6] Linking CXX executable intermediates_do_not_run/foo_bar [5/6] Linking CXX executable intermediates_do_not_run/foo_bar
...@@ -249,6 +250,7 @@ lib/main.dart:4:3: Error: Method not found: 'foo'. ...@@ -249,6 +250,7 @@ lib/main.dart:4:3: Error: Method not found: 'foo'.
/foo/linux/main.cc:9:7: warning: unused variable 'unused_variable' [-Wunused-variable] /foo/linux/main.cc:9:7: warning: unused variable 'unused_variable' [-Wunused-variable]
/foo/linux/main.cc:10:3: error: unknown type name 'UnknownType' /foo/linux/main.cc:10:3: error: unknown type name 'UnknownType'
/foo/linux/main.cc:12:7: error: 'bar' is a private member of 'Foo' /foo/linux/main.cc:12:7: error: 'bar' is a private member of 'Foo'
/foo/linux/my_application.h:4:10: fatal error: 'gtk/gtk.h' file not found
clang: error: linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation)
'''); ''');
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment