Summary: | Makeactionfilter fails to parse compiler build output | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Heiko Gerdau <hg> |
Component: | Output Views | Assignee: | Andreas Pakulat <apaku> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.4.1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | above mentioned patch |
Description
Heiko Gerdau
2007-05-20 00:01:14 UTC
Created attachment 20636 [details]
above mentioned patch
see above
SVN commit 668073 by apaku: Use file extension for finding source files that are compiled, patch from Heiko Gerdau, thanks. BUG:145687 M +5 -3 makeactionfilter.cpp --- branches/KDE/3.5/kdevelop/parts/outputviews/makeactionfilter.cpp #668072:668073 @@ -72,9 +72,7 @@ MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats() { static ActionFormat formats[] = { - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"), + ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/'\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"), ActionFormat( i18n("compiling"), 1, 1, "^compiling (.*)" ), //unsermake ActionFormat( i18n("compiling"), 1, 1, "\\[.+%\\] Building .* object (.*)" ), //cmake @@ -172,6 +170,10 @@ "g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " "-I/home/john/src/kde/qt-copy/include -o test.o test.cpp", "compiling", "g++", "test.cpp" ) + << TestItem( // simple qmake compile different option order + "g++ -c -o test.o -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " + "-I/home/john/src/kde/qt-copy/include test.cpp", + "compiling", "g++", "test.cpp" ) << TestItem( // simple qmake link "g++ -o ../bin/test test.o -Wl,-rpath,/home/john/src/kde/qt-copy/lib -L/home/john/src/kde/qt-copy/lib " "-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm", SVN commit 670868 by apaku: Revert my last commit, it breaks simple gcc lines (somehow the DEBUG define that my configure gets doesn't work). CCBUG:145687 M +3 -5 makeactionfilter.cpp --- branches/KDE/3.5/kdevelop/parts/outputviews/makeactionfilter.cpp #670867:670868 @@ -72,7 +72,9 @@ MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats() { static ActionFormat formats[] = { - ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/'\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"), + ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"), + ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), + ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"), ActionFormat( i18n("compiling"), 1, 1, "^compiling (.*)" ), //unsermake ActionFormat( i18n("compiling"), 1, 1, "\\[.+%\\] Building .* object (.*)" ), //cmake @@ -170,10 +172,6 @@ "g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " "-I/home/john/src/kde/qt-copy/include -o test.o test.cpp", "compiling", "g++", "test.cpp" ) - << TestItem( // simple qmake compile different option order - "g++ -c -o test.o -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " - "-I/home/john/src/kde/qt-copy/include test.cpp", - "compiling", "g++", "test.cpp" ) << TestItem( // simple qmake link "g++ -o ../bin/test test.o -Wl,-rpath,/home/john/src/kde/qt-copy/lib -L/home/john/src/kde/qt-copy/lib " "-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm", Hi, I had to revert the commit as it causes various of the tests to fail. Heiko I don't fully understand the format of these expressions, would you please see if you can fix the first line starting with a "-" in my last commit message (i.e. the one that uses file extensions for the matching). Hi Andreas, there are two differences compared to my original patch. You added other file extentions which should be ok, but you have also dropped a blanc in [/ '\\\\]. I have played with different KDevelop and KDE versions currently and thus have broken my compile setup for version 3.4.1. But the following regexp should be ok again. At least for the included test cases. ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/ '\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"), aaah, the problem is that you provided the patch inline, it would've been better to provide it as attachment. If you select the patch-lines you will see that the one whitespace is not in there. SVN commit 671038 by apaku: Fix the patch, a whitespace got lost because the patch was provided inline. BUG:145687 M +5 -3 makeactionfilter.cpp --- branches/KDE/3.5/kdevelop/parts/outputviews/makeactionfilter.cpp #671037:671038 @@ -72,9 +72,7 @@ MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats() { static ActionFormat formats[] = { - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"), + ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/ '\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"), ActionFormat( i18n("compiling"), 1, 1, "^compiling (.*)" ), //unsermake ActionFormat( i18n("compiling"), 1, 1, "\\[.+%\\] Building .* object (.*)" ), //cmake @@ -172,6 +170,10 @@ "g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " "-I/home/john/src/kde/qt-copy/include -o test.o test.cpp", "compiling", "g++", "test.cpp" ) + << TestItem( // simple qmake compile different option order + "g++ -c -o test.o -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " + "-I/home/john/src/kde/qt-copy/include test.cpp", + "compiling", "g++", "test.cpp" ) << TestItem( // simple qmake link "g++ -o ../bin/test test.o -Wl,-rpath,/home/john/src/kde/qt-copy/lib -L/home/john/src/kde/qt-copy/lib " "-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm", I provided the patch inline and as attachment. See Comment#1 directly after my original post. And what do you mean by "if you select the patch-lines you will see that the one whitespace is not in there" ?? If I look above at my original post I see the whitespace and after select and copy the lines from the inline patch I have the whitespace still in there. Anyway, whatever has caused the confusion, I'm glad that it's working now. Thanks Heiko |