Sublime Forum

Can you programmatically handle build system regex parsing?

#1

I’m trying to update my build system for MSBuild (which includes C#, Visual Basic, and Visual C++) but something I’ve found is that error messages are reported like this:

File.cs(10,33): error CS1043: { or ; expected [C:\absolute\path\to\the\project\building\it.csproj]

The file isn’t actually relative to the main build script that kicked off the build.

I could handle the whole thing by calculating the file’s relative path based on the project that owns it, but it means I’d need a programmatic way to intercept the errors and do that - it can’t be just a file_regex.

This is somewhat (but not totally) related to the ongoing desire to have named captures for the file_regex to handle messages that are reported out-of-order.

Any way to do this today?

0 Likes

#2

I have the same requirement for my MSBuild dev env ( MSBuild selector )

By the way it seems that the “file_regex” does not use the “working_dir” of the command, it would make sense and fix some of the issues.
But we do need a way to map more intelligently file names in the error message and file names in the project.

I fear the lack of answer means that nobody except us is interested in this feature… :frowning:

0 Likes