I’ve read a seemingly stalled topic (here) that discussed this matter before.
I’m rather new to Sublime Text and this build system it uses to build build systems (and I’m fascinated by it, by the way, so I’m apologizing for the rant) but it’s unbelievable how this issue is not a recurring one and hasn’t been solved yet.
My problem is that the build system expects that the file, line, column, and error message quartet comes in this certain order and it is a quartet at all (no missing members). Yes, it allows right-side missing members, meaning that you can omit error message, or error message and column. But you cannot have column missing and have error message at the same time.
While this order seems to be logical, I’m pretty sure there’s a gazillion of compilers/builder/whatsoever that doesn’t live up to this expectation. Unfortunately, the one I’m using doesn’t either I’ve read the docs mentioned in that topic and this one about file_regex, here and I find it inexplicable why this is handled the way it is
The file_regex + line_regex duo with the “if line is found then search for file backwards” seems to be an overly complicated attempt to achieve something that could be simply completed by using named matching groups. Attempt, because it’s complicated and unreliable.
Here’s an example
. . . restore backups and roll back database and code! ERROR: Migration NEJP_KAR_V00.001.0007__kar_sys_app_user.sql failed ------------------------------------------------------------ SQL State : 42000 Error Code : 1735 Message : ORA-01735: nem megengedett ALTER TABLE opci� Location : D:\Projects\_vp_ws_1\_projects\NEJP\DDL\prepared\KAR Cache\00\001\NEJP_KAR_V00.001.0007__kar_sys_app_user.sql (D:\Projects\_vp_ws_1\_projects\NEJP\DDL\prepared\KAR Cache\00\001\NEJP_KAR_V00.001.0007__kar_sys_app_user.sql) Line : 21 Statement : alter table kar_sys_log add constraint fk_kar_sys_log$sys_app_user foreign key ( sys_app_user_id ) references kar_sys_app_user ( sys_app_user_id ); -- This FK is created with table kar_sys_app_user . . .
The build result I get shows the error message first, the file name second, the line number third and it has no column information. This means that no combination of file_regex and line_regex can retrieve the error message, no matter how hard I try…
I could fetch the file and the number in one run using
for line_regex. Sadly, that doesn’t work as expected. The Build Result shows the errors and can navigate them using F4 and Shift+F4, however, as soon as the file name and the line numbers are not on the same line in the result, the errors are not shown inline in the files and neither is the editor navigated to the matching file and line
To able to achieve that I have to parse the result using line_regex and then use file_regex to backtrack the file. This shows the error inline, which is the complete match for the file_regex, and thus, irrelevant.
Also, as a side effect, the Build Result navigation no longer highlights the file_regex match, only the line_regex which is much less conspicuous when navigating the results.