bazelbuild / intellij

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

Error:(11, 12) While resolving toolchains for target @@intellij_aspect//:JarFilter_bin (963287c): No matching toolchains found for types @@bazel_tools//tools/jdk:runtime_toolchain_type. #6028

Open kekxv opened 7 months ago

kekxv commented 7 months ago

Description of the bug:

Error:(11, 12) While resolving toolchains for target @@intellij_aspect//:JarFilter_bin (963287c): No matching toolchains found for types @@bazel_tools//tools/jdk:runtime_toolchain_type.
Error:(23, 12) While resolving toolchains for target @@intellij_aspect//:PackageParser_bin (963287c): No matching toolchains found for types @@bazel_tools//tools/jdk:runtime_toolchain_type.
Error:(35, 12) While resolving toolchains for target @@intellij_aspect//:CreateAar_bin (963287c): No matching toolchains found for types @@bazel_tools//tools/jdk:runtime_toolchain_type.
截屏2024-02-06 09 54 46

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

CLion 2023.3.3
Build #CL-233.14015.92, built on January 24, 2024
Subscription is active until April 7, 2024.
Runtime version: 17.0.9+7-b1087.11 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.3
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Metal Rendering is ON
Registry:
  debugger.new.tool.window.layout=true
  debugger.attach.dialog.enabled=true
  run.processes.with.pty=TRUE
  ide.experimental.ui=true
  editor.minimap.enabled=true
Non-Bundled Plugins:
  com.krylysov.nsisplugin (0.2.0)
  com.intellij.properties (233.11799.172)
  com.intellij.ml.llm (233.14015.137)
  com.google.idea.bazel.clwb (2024.01.30.0.1-api-version-233)

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

CLion 2023.3.3

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

c/c++

What Bazel plugin version are you using?

com.google.idea.bazel.clwb (2024.01.30.0.1-api-version-233)

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

sgowroji commented 7 months ago

@kekxv Could you please provide sample code to reproduce this issue?

kekxv commented 7 months ago

@kekxv Could you please provide sample code to reproduce this issue? @sgowroji

It looks like it’s because register_execution_platforms is registered //toolchains/platforms:linux_riscv64,but that is toolchains and work by linux-x64.

platform(
    name = "linux_riscv64",
    constraint_values = [
        "@platforms//cpu:riscv64",
        "@platforms//os:linux",
    ]
)
native.register_execution_platforms(
    "//toolchains/platforms:linux_riscv64",
)