Skip to content

Conversation

@bruntib
Copy link
Collaborator

@bruntib bruntib commented Jul 19, 2020

clang::DiagnosticConsumer is handling the diagnostic messages (compilation errors, warnings, notes, etc.) during C/C++ compilation. These diagnostic messages are collected and stored in the database.

clang::DiagnosticConsumer is handling the diagnostic messages (compilation
errors, warnings, notes, etc.) during C/C++ compilation. These diagnostic
messages are collected and stored in the database.
@bruntib bruntib added Kind: Enhancement 🌟 Plugin: C++ Issues related to the parsing and presentation of C++ projects. labels Jul 19, 2020
@bruntib bruntib requested review from mcserep and whisperity July 19, 2020 22:10
@whisperity whisperity changed the title Adding diagnostic messages to the database Adding C++ compiler diagnostic messages to the database Jul 20, 2020
@bruntib bruntib requested a review from whisperity July 20, 2020 15:14
Copy link
Contributor

@whisperity whisperity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We need a follow up to wire reading this table in on the Web UI.

Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks and works good, I only had a minor change request to remove a TODO message, then LGTM.

Am I right, that these logged messages are not available yet from the web interface? There is a getBuildLog endpoint in project.thrift, but I did found any call to it.

const clang::Diagnostic& info_)
{
// TODO: Is this needed?
clang::DiagnosticConsumer::HandleDiagnostic(diagLevel_, info_);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only increments the numWarnings or numErrors counters. We do not use them now, so technically it is not needed, but later it could be useful, so in my opinion we shall keep it and remove the TODO.

@whisperity
Copy link
Contributor

Am I right, that these logged messages are not available yet from the web interface? There is a getBuildLog endpoint in project.thrift, but I did found any call to it.

@mcserep Yes, the similar feature was never wired in. The JS code that builds the log table UI elements is there, but that function is also nowhere called. That function would be called with the records populated by the API call.

Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed TODO. Ready to be merged after CI passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind: Enhancement 🌟 Plugin: C++ Issues related to the parsing and presentation of C++ projects.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants