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

Whole output base directory is being scanned when on the first import of bazel project #6082

Closed
tpasternak opened this issue Feb 15, 2024 · 0 comments · Fixed by #6094
Closed
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin topic: debugging Issues related to debugging type: bug

Comments

@tpasternak
Copy link
Collaborator

Description of the bug:

No response

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  1. Add a breakpoint here https://github.com/JetBrains/intellij-community/blob/83d82b0df959a660d9322c72da69b911e9048c39/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryEventDispatcher.java#L83
  2. Import a new bazel project, with the `directories' section
  3. Watch which files are traversed by the code on which the breakpoint was set

Which Intellij IDE are you using? Please provide the specific version.

No response

What programming languages and tools are you using? Please provide specific versions.

No response

What Bazel plugin version are you using?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@tpasternak tpasternak added type: bug awaiting-maintainer Awaiting review from Bazel team on issues labels Feb 15, 2024
@sgowroji sgowroji added product: IntelliJ IntelliJ plugin topic: debugging Issues related to debugging labels Feb 16, 2024
tpasternak added a commit to tpasternak/bazel-intellij that referenced this issue Feb 16, 2024
…mport

Prior to this change, IntelliJ excluded convenience symlinks by using the
`addExcludeFolder` method. Its drawback was that it didn't work perfectly when the file
didn't exist during exclusion. This might cause a race condition where some IntelliJ
indexers detected new file creation in these directories while the exclusion mechanism
hadn't detected the existence of the symlinks themselves.

This issue is addressed by using 'exclusion patterns' instead of 'excluded folders'.
Patterns do not require the files to actually exist. However, their drawback is that
they will catch files named `bazel-bin` and `bazel-out` nested deep inside the directory
hierarchy, not just the top-level ones.

To address this, a project view setting has been added to disable the new behavior.

Fixes bazelbuild#6082
@mai93 mai93 assigned tpasternak and unassigned mai93 Feb 16, 2024
tpasternak added a commit to tpasternak/bazel-intellij that referenced this issue Feb 19, 2024
…mport

Prior to this change, IntelliJ excluded convenience symlinks by using the
`addExcludeFolder` method. Its drawback was that it didn't work perfectly when the file
didn't exist during exclusion. This might cause a race condition where some IntelliJ
indexers detected new file creation in these directories while the exclusion mechanism
hadn't detected the existence of the symlinks themselves.

This issue is addressed by using 'exclusion patterns' instead of 'excluded folders'.
Patterns do not require the files to actually exist. However, their drawback is that
they will catch files named `bazel-bin` and `bazel-out` nested deep inside the directory
hierarchy, not just the top-level ones.

To address this, a project view setting has been added to disable the new behavior.

Fixes bazelbuild#6082
ujohnny pushed a commit that referenced this issue Feb 21, 2024
…mport (#6094)

Prior to this change, IntelliJ excluded convenience symlinks by using the
`addExcludeFolder` method. Its drawback was that it didn't work perfectly when the file
didn't exist during exclusion. This might cause a race condition where some IntelliJ
indexers detected new file creation in these directories while the exclusion mechanism
hadn't detected the existence of the symlinks themselves.

This issue is addressed by using 'exclusion patterns' instead of 'excluded folders'.
Patterns do not require the files to actually exist. However, their drawback is that
they will catch files named `bazel-bin` and `bazel-out` nested deep inside the directory
hierarchy, not just the top-level ones.

To address this, a project view setting has been added to disable the new behavior.

Fixes #6082
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin topic: debugging Issues related to debugging type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants