Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Custom builders and bug 295625 Error highlighting in Build Console

In the latest CDT 7.0 build, a new feature bug 295625 Error highlighting in Build Console was added. There was some concern if the existing builders need to be modified. Let me quote the comments from the bug addressing that:

comment#62: (In reply to comment #59)
> Looking at the
> patch it seems that you updated the builders somewhat.  We have our own custom
> builder (as do many other vendors).  Are similar changes required for custom
> builders?  If so perhaps an email alert to cdt-dev is appropriate.

Well, builders are changed in the following way.

A builder usually write all build output through sequence of output streams, for us interesting streams are ErrorParserManager, BuildOutputStream (returned by CBuildConsole.getOutputStream()). 
The change is to connect ErrorParserManager to BuildOutputStream without any other streams between them (in CommonBuilder for example there was StreamMonitor between them). This allows ErrorParserManager to check the exact class which  CBuildConsole.getOutputStream() returns. If this class is BuildOutputStream not an ordinary ConsoleOutputStream, then ErroParserManager uses extended API to put error markers together with output lines.

comment#66: (In reply to comment #62,#63)
There was one change related to how underlying output stream is closed, see discussion around comment#42. Before the change ErrorParserManager.close() would decide to close the stream or not - relying on reference counting of open streams by getOutputStream(). That got pretty confusing, see for example the cited bug 123302 and CDT clients avoided reference counting and just closed the stream directly. But if there is a builder out there which is not a copy of CDT builder and which relies on that - it would need to be modified to close the stream or else endure the leakage of the resource.

Thanks,
Andrew



Back to the top