Open dfabulich opened 2 years ago
I found some guidance in this blog post: https://blog.bazel.build/2019/09/29/intellij-bazel-sync.html#portability-of-the-ijwb-directory
Portability of the .ijwb directory
The .ijwb directory is not completely portable. Files like .bazelproject and codeStyleConfig.xml can be shared project-wide, but workspace.xml and .workspace.iml should be user-specific.
In general, extract .bazelproject file out of .ijwb/ to version control it, and follow JetBrains' recommendations on checking in specific files in the .idea directory.
@mai93 @blorente I don't have an opinion on it, but intuitively I'd be rather against it. Should we recommend users to check in anything in .ijwb
directory?
I think the project view files are designed to encapsulate everything you'd need from the .ijwb
directory. In particular, run configurations are shareable.
It feels like the .ijwb
directory contains state that is already either in the Bazel graph, or the project view itself. I'd be more in favour of allowlisting what to save via the project view, because that way multiple projects can coexist in the same repo with just one file for each.
Ok, so we should recommend to add .ijwb
to .gitignore
. Honestly I don't know how to edit ij.bazel.build page cc @mai93
https://ij.bazel.build/docs/project-views.html
The documentation should make it clarify whether the
.ijwb
directory should be checked in.(I believe it shouldn't? But it can be, and if you do, you should copy https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore and commit it as
.ijwb/.gitignore
…?)