Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental parsing issue fixes #736

Merged
merged 4 commits into from
May 8, 2024

Conversation

dbukki
Copy link
Collaborator

@dbukki dbukki commented Apr 26, 2024

Fixes #735

In accordance with the diagnosis outlined in #735 (comment) , the following fixes have been made:

  1. A new CppAstNodeMetricsFileView db view has been added to manage the AST node ID <-> File ID association (_astNodeIdCache) in CppMetricsParser::CppMetricsParser.
  2. The .size() call in SourceManager::removeFile has been replaced by a new isSingletonResult helper function in dbutil.

@dbukki dbukki changed the title Incremental linking issue fixes Incremental parsing issue fixes Apr 26, 2024
@dbukki dbukki self-assigned this Apr 26, 2024
@dbukki dbukki added Kind: Bug ⚠️ Plugin: C++ Issues related to the parsing and presentation of C++ projects. labels Apr 26, 2024
@mcserep mcserep added the Plugin: Metrics Issues related to the code metrics plugin. label Apr 28, 2024
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.

In case this size() == 1 is the only conflicting code part with SQLite, then we can keep its support with your proposed solution. However, the C++ LSP service plugin also contains usages of the size() method in ODB query results. Probably those should be fixed, too.

It should be documented in the code why not to use the size() method in these cases.

util/include/util/dbutil.h Outdated Show resolved Hide resolved
@mcserep mcserep added this to the Upcoming Release milestone Apr 29, 2024
mcserep
mcserep previously approved these changes May 8, 2024
@mcserep
Copy link
Collaborator

mcserep commented May 8, 2024

Looks good to me! I had to resolve a merge conflict, so now my approval is not enough as the last commiter.

@intjftw Please approve it as well (review it too of course, if you would like 😄 )!

@mcserep mcserep requested a review from intjftw May 8, 2024 12:35
@mcserep mcserep force-pushed the incremental-remedies branch from de77e87 to 429490e Compare May 8, 2024 12:42
@mcserep mcserep merged commit 7ba19f9 into Ericsson:master May 8, 2024
12 checks passed
@dbukki dbukki deleted the incremental-remedies branch May 11, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kind: Bug ⚠️ Plugin: C++ Issues related to the parsing and presentation of C++ projects. Plugin: Metrics Issues related to the code metrics plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incremental parsing fails with segmentation fault
3 participants