Open bdleitner opened 2 months ago
@jastice @agluszak PTAL
@bdleitner thank you for reaching us. What do you do exactly to reopen the projects (can you share the paths, too?)
When I reopen the project, I just go to File->Open, and browse the folders where my projects are. For example, I have a project called "expressions" at C:\projects\go\expressions
and it has an .ijwb
subfolder which itself contains an .idea
folder and the .bazelproject
file.
In the file selection window, the expression
folder has the green bazel icon:
If I click that folder (instead of the .ijwb
subfolder) to open, then I get the "Project not configured" warning and a new .idea
folder is created directly under C:\projects\go\expressions
. When I then go to the same File...open path I see this:
Where the .idea
subfolder now shows up and the icon has changed.
Deleting that top-level .idea
folder brings the icon back to bazel
, and as long as I only open from the .ijwb
directory everything works fine.
Notably, I tried this out with IJ as well (since I just updated to 2024.2.1, and this does not happen there. Projects in IJ opened from the "root" directory rather than .ijwb
work as expected.
Thank you for reporting that. So I'm aware of the problem, however I don't have time to fix it right now. Until then, unfortunately you have to choose the .ijwb dir
@bdleitner some good news, @LeFrosch is working on this issue for CLion, maybe we'll be able to handle it for all IDEs
Hi, when you open the "expressions" directory directly and you get the "not configured" warning is it a false positive? I.e. does everything work in the project like code navigation etc?
Hi, when you open the "expressions" directory directly and you get the "not configured" warning is it a false positive? I.e. does everything work in the project like code navigation etc?
The bazel tooling is not available, so no project sync or anything like that, but code navigation works.
Description of the bug:
TL:DR; Opening a Bazel project from the project dir leads to "project not configured" warnings, and the bazel menu is missing.
Relevant versions: Goland: 2024.2.1.1 Bazel plugin: 2024.08.27.0.1.-api-version-242 Bazel: 7.3.1 (via Bazelisk 1.19.0) OS: Windows 10
I'm in the process of moving my Go code projects to
bzlmod
and I noticed that when I loaded any of them, when I opened theWORKSPACE
or newly generatedMODULE.bazel
file, I'd get a banner warning "Project is not configured"Going through the Import Bazel Project quick fix tried to create a new project view
.bazelproject
file, but since there already is one, I see:Wondering if there was some old cruft in the project, I closed the project and deleted the
.ijwb
,.idea
directories and thebazel-*
shortcuts, leaving only the code andBULD
,MODULE.bazel
, andWORKSPACE
files.I then went through the import process again and it worked, giving me the bazel toolbar.
Finally, I closed the project and reopened it, and the original "Project not configured" was back, and an
.idea
directory in the root (not under .ijwb) was created.On a whim, I tried closing the project again and this time when I went to open by directory, I saw that the project no longer had the bazel icon, but I tried opening the
.ijwb
directory instead of the project's root dir and then things worked as expected.Note that https://github.com/bazelbuild/intellij/issues/3759 is still occurring as well, so opening "recent" projects by their
.ijwb
directories is difficult in the "recent projects view."I wonder if the two issues are connected.
Which category does this issue belong to?
GoLand
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
WORKSPACE
file - emptyMODULE.bazel
.bazelproject
from scratch and use the default.Which Intellij IDE are you using? Please provide the specific version.
Goland: 2024.2.1.1
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