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

Add CompilationDatabase class #103

Merged
merged 4 commits into from
Sep 3, 2024
Merged

Conversation

Pennycook
Copy link
Contributor

Related issues

Progress towards #100.

Proposed changes

  • Add a new CompilationDatabase class encapsulating a list of CompileCommand objects.
  • Add tests for new CompilationDatabase functionality.
  • Replace the only existing usage of a list of CompileCommand objects with a CompilationDatabase.

This may look like a lot of work for very little payoff, but that's because this is only the first step in the refactoring. This PR introduces and uses CompilationDatabase to replace a list of CompileCommand objects during the construction of the legacy configuration dictionary, but stops short of removing the configuration dictionary itself.

Encapsulates a collection of CompileCommand objects and provides methods
to simplify creation of databases from JSON.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
Primarily used now for defining CompilationDatabase tests, but may also
be useful later to detect/prune duplicated commands.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook added the enhancement New feature or request label Aug 29, 2024
@Pennycook Pennycook added this to the 2.0.0 milestone Aug 29, 2024
@Pennycook Pennycook merged commit 85942ea into intel:main Sep 3, 2024
3 checks passed
@Pennycook Pennycook deleted the compilation-database branch September 3, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants