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

Option --symlink_prefix breaks IntelliJ plugin #156

Closed
BlackIsTheNewBlack opened this issue Nov 9, 2017 · 5 comments
Closed

Option --symlink_prefix breaks IntelliJ plugin #156

BlackIsTheNewBlack opened this issue Nov 9, 2017 · 5 comments

Comments

@BlackIsTheNewBlack
Copy link

When using any non-default argument for the --symlink_prefix option, the IntelliJ plugin will take a very long time to scan the project folder, because it will include all the sources and libraries found under the new prefix. This happens event if the new prefix is specifically excluded in Project Structure Settings.

Furthermore, the bazel-out symlink is always created by the Bazel plugin, without consideration to the --symlink_prefix present in the tools/bazel.rc file.

Steps to reproduce:

  1. Add to tools/bazel.rc file
    common --symlink_prefix=.bazel/

  2. Open the workspace in IntellIJ, or sync it if already opened.

  3. The console will show Computing Directory Structure a very long time, or the same task will get stuck in Background Tasks.
    DirectoryStructure: 302,3s

@brendandouglas
Copy link
Contributor

bazel-out (and bazel-genfiles, etc.) are created by Bazel itself, and we explicitly exclude them from indexing.

Excluding directories in the 'Project Structure' settings won't work, because those settings are overridden at each sync by the contents of your .bazelproject file.

Instead, try excluding the symlink by adding a line to your .bazelproject file (Bazel > Project > Open local project view file), for example:

directories:
-.bazel

@brendandouglas
Copy link
Contributor

Lost the whitespace in the example. It should be:

directories:
  -.bazel

@brendandouglas
Copy link
Contributor

The bazel-out symlink always being created is discussed here: bazelbuild/bazel#3796

@BlackIsTheNewBlack
Copy link
Author

Thank you for answering! I have already tried the excludes in project view file, both:
directories:
-.bazel
and terminated by slash: -.bazel/
and the result is the same, computing directory structure takes about 5 mins, making IntelliJ slow to use.

@brendandouglas
Copy link
Contributor

This should be fixed along with #160, by respecting excludes when computing directory structure.

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

No branches or pull requests

2 participants