AtomBuild / atom-build-gradle

Gradle plugin for atom-build
MIT License
3 stars 7 forks source link

Gradle error matching doesn't work with row:column format #12

Open mikuslaw opened 8 years ago

mikuslaw commented 8 years ago

Gradle error about missing header is not parsed correctly (native C++ compilation). Example of error message (notice filename:row:col: message format): /.../Src/ProcessImageDataProvider.cpp:3:24: fatal error: OsAssert.hpp: No such file or directory compilation terminated.

mikuslaw commented 8 years ago

With this error match I'm able to get atom to recognize errors in gradle c++ builds. The last match is what was already in build-gradle, but it doesn't work with hpp and cpp matches I created. Not sure in which cases that match is used.

const errorMatch = [ '(?<file>/[^:\\n]+\\.java):(?<line>\\d+):', '(?<file>/[^:\\n]+\\.cpp):(?<line>\\d+):(?<col>\\d+):\\s+(?<message>.+)', '(?<file>/[^:\\n]+\\.hpp):(?<line>\\d+):(?<col>\\d+):\\s+(?<message>.+)', `//'(?::compile(?:Api)?(?:Scala|Java|Groovy))?(?<file>.+):(?<line>\\d+):\\s.+[;:]'

keplersj commented 8 years ago

Mind posting your whole log? I initially created the match with Java, Scala, and Groovy in mind.

mikuslaw commented 8 years ago

Sure, thank you for taking a look. The build is gcc running in gradle (standard native build in gradle). Native builds are not that popular, but it's a great substitution to cmake.

The issue I have is when the include file is not available from hpp file. In that case there are at least two paths: for the top cpp, and for the existing hpp (that has missing hpp include).

con.txt

MaxThlon commented 5 years ago

For those searching for kotlin matchs patern it's: '(?/[^:\n]+\.kt):\s\((?\d+),\s(?\d+)\):\s+(?.+)'