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

Update default compile_commands.json path #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xdissent
Copy link
Contributor

This default compile_commands.json path reflects the default from the popular CMake Tools extension and is probably appropriate for >90% of all configurations.

@helly25
Copy link
Owner

helly25 commented May 26, 2024

Changing the /XXX/ to match the actual definition as stated is a good idea. However this is a breaking change for some that install defaults. The current one works for bazel setups. Maybe this needs to be identified. If there is an indication of Bazel, then use root, otherwise build subdirectory. Bazel can be identified by the presence of file of the following list: MODULE.bazel, REPO.bazel, WORKSPACE, WORKSPACE.bazel.

helly25 added a commit that referenced this pull request Jul 7, 2024
… is not found, then the extension will also try `${workspaceFolder}/build/compile_commands.json`.

This should address #5 in slightly better way as it supports both common places.
Copy link
Owner

@helly25 helly25 left a comment

Choose a reason for hiding this comment

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

Could you check if #10 works for you?

I also filed: #11

helly25 added a commit that referenced this pull request Jul 8, 2024
… is not found, then the extension will also try `${workspaceFolder}/build/compile_commands.json`.

This should address #5 in slightly better way as it supports both common places.
helly25 added a commit that referenced this pull request Jul 8, 2024
If `iwyu.compile_commands` is set to the default `auto`, then the extension will try:
  - `${workspaceFolder}/compile_commands.json`,
  - `${workspaceFolder}/build/compile_commands.json`,
  - `${fileWorkspaceFolder}/compile_commands.json`, and
  - `${fileWorkspaceFolder}/build/compile_commands.json`.

This should address #5 in slightly better way as it supports the common places.

This fixes #11
@helly25
Copy link
Owner

helly25 commented Jul 9, 2024

This PR should no longer be necessary as of version 0.0.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants