Reputation: 249
Even after syncing with Bazel, the files are still displaying as "unsynced" in IntelliJ.
I've tried moving to a previous version of Bazel, but to no avail.
Any recommendations here?
Upvotes: 6
Views: 11117
Reputation: 640
This seems like a problem with the IntelliJ Bazel plugin. The only workaround that works for me is when I right click any (in my case, the topmost) directory and partially sync by clicking on Partially Sync <directory>/...:all
.
Upvotes: 0
Reputation: 757
sometimes Bazel > Sync > Sync Project with BUILD Files
works, sometimes doesn't.
Then I do following, in order:
partially sync <your_file>.go
. If this works fine if not try the next workaround..idea/
or .ijwb/
from the project dir works for me.Upvotes: 0
Reputation: 510
If your file isn't reachable from the targets specified in the targets: section in .bazelproject file, then it'll show up as unsynced'
Open you .bazelproject file and in under targets: Specify the path to your file/directory, re sync your project , It should fix it.
Upvotes: 4
Reputation: 195
As @Karthikeyan Vaithilingam mentioned in his comment above, I had to do File > Invalidate Caches / Restart...
Only then, Bazel > Snyc > Sync Project with BUILD Files
made the unsynced labels finally disappear.
Upvotes: 0
Reputation: 141
You should try adding the file to git. Sometimes files highlighted in red, or files that say "(unsynced)" next to their name just need to be added to the git branch so that they turn green again.
Upvotes: 0
Reputation: 1246
Use Bazel > Sync > Sync Project with BUILD Files
if it is enabled.
Upvotes: 10