bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
761 stars 303 forks source link

Invalid Python SDK error on Clion 2024.2 #6644

Closed anonrig closed 1 week ago

anonrig commented 3 weeks ago

Description of the bug:

Whenever I press Sync button on Clion:

Screenshot 2024-08-16 at 7 33 34 AM

Which category does this issue belong to?

Intellij

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

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

Clion 2024.2

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

python, js, ts, c++

What Bazel plugin version are you using?

latest

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 commented 3 weeks ago

I can't reproduce it. As a workaround, could you please go to settings -> "Python Interpreter" and set the interpreter manually for the .workspace module?

anonrig commented 3 weeks ago

Setting it doesn’t fix. It overrides the selected value to unresolved item with reference to /usr/bin/indent whenever I press sync

tpasternak commented 3 weeks ago

Seems to by a Python plugin issue, I'll let you know about the progress

tpasternak commented 3 weeks ago

If you did it manually, I'd recommend to uninstall it and install again ensuring it's the right one - we publish both 2024.1-compatible version, as well as 2024.2 one

Olle-Lukowski commented 3 weeks ago

Running into the exact same issue, just installed clion and the bazel plugin and getting this error.

sudarshanraorobinhood commented 3 weeks ago

I use Goland and the Bazel Plugin and facing the same issue. This happens whenever I use the Bazel plugin to Sync Project with BUILD Files. Every time I sync, Goland also unmarks all my python directories that were marked previously as sources root and I have to remark them again which is very annoying.

Goland version details

GoLand 2024.2.0.1
Build #GO-242.20224.424, built on August 20, 2024
Licensed to Robinhood Markets Inc. / Sudarshan Rao
Subscription is active until January 4, 2025.
Runtime version: 21.0.3+13-b509.4 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.6.1
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 12
Metal Rendering is ON
Registry:
  ide.completion.variant.limit=500
  suggest.all.run.configurations.from.context=true
  ide.experimental.ui=true
Non-Bundled Plugins:
  org.toml.lang (242.20224.155)
  PythonCore (242.20224.300)
  org.mvnsearch.plugins.justPlugin (0.5.1)
  com.github.copilot (1.5.20.6554)
  com.google.idea.bazel.ijwb (2024.07.30.0.2-api-version-242)

Bazel plugin version: 2024.07.30.0.2-api-version-242

tpasternak commented 2 weeks ago

So unfortunately the safest workaround is to switch to GoLand/PyCharm/CLion 2024.1 for a while. The fix to 2024.2 is on its way, too.

DaniilBogdanovJB commented 2 weeks ago

Hello there, This problem is related to this bug. As a temporary workaround please do the following:

  1. Open Help | Find Action.
  2. Type "boot runtime".
  3. Open "Choose Boot Java Runtime for the IDE".
  4. Select JBR 17 bundled with the IDE.
  5. Restart IDE.
tpasternak commented 1 week ago

Fixed in JetBrains IDEs v2024.2.1