-
Notifications
You must be signed in to change notification settings - Fork 59
Feat: better load and fetch compile command #201
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
Feat: better load and fetch compile command #201
Conversation
|
@gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request improves how compilation commands are loaded and fetched. It introduces recursive searching for compile_commands.json in the workspace and adds a mechanism to guess commands for files not in the database. The changes also include some typo fixes and minor code improvements. My review focuses on improving robustness by handling potential exceptions, ensuring deterministic behavior in the command guessing logic, and minor code style enhancements. Overall, these are good improvements to the server's functionality.
|
@copilot review |
|
@gemini review |
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces significant improvements to how compilation commands are loaded and fetched. It adds recursive searching for compile_commands.json, guessing commands for files not in the database, and ensures include paths are absolute. The changes are well-aligned with the description and improve the robustness of the language server.
My review includes a few points:
- A critical fix for the recursive search logic for
compile_commands.json. - A high-severity fix for the command-guessing logic to prevent incorrect matches.
- A medium-severity suggestion to avoid redundant include paths in the generated commands.
Overall, this is a great enhancement. Addressing these points will make it even better.
0df51a5 to
a029a8b
Compare
This PR optimizes the way to load and fetch compilation commands from CDB, and typo fix.
CompilationDatabase::LookupInfo::arguments, both cmake and xmake has been tested.