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

Fix view_project_root with overlapping directories #6767

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

jdai8
Copy link
Contributor

@jdai8 jdai8 commented Sep 18, 2024

Checklist

  • I have filed an issue about this change and discussed potential changes with the maintainers.
  • I have received the approval from the maintainers to make this change.
  • This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.

Discussion thread for this change

Issue number: <please reference the issue number or url here>

Description of this change

When view_project_root: true and there are overlapping directories, for example:

The repo contains these directories:

  • foo
  • foo/bar
  • foo/baz

And .bazelproject is:

view_project_root: true

directories:
  foo
  foo/bar

Then, foo/baz will incorrectly be excluded. This is unexpected because it's contained under the foo directory.

This commit fixes the behavior, so that files are not excluded if they are under any root directory.

When `view_project_root: true` and there are overlapping directories, for example:

The repo contains these directories:
- foo
- foo/bar
- foo/baz

And .bazelproject is:
```
view_project_root: true

directories:
  foo
  foo/bar
```

Then, `foo/baz` will incorrectly be excluded. This is unexpected because it's contained under the `foo` directory.

This commit fixes the behavior, so that files are not excluded if they are under any root directory.

Change-Id: Icd218fa33a79a7c74986255cce7788ea6b4d586d
@github-actions github-actions bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Sep 18, 2024
@tpasternak tpasternak merged commit 3e72efb into bazelbuild:master Sep 24, 2024
8 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Sep 24, 2024
@tpasternak
Copy link
Collaborator

Thank you @jdai8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants