bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://github.com/bazelbuild/intellij/blob/master/docs/index.md
Apache License 2.0
763 stars 307 forks source link

Incorrect status of Bazel sync run in UI #5779

Open dkashyn-sfdc opened 12 months ago

dkashyn-sfdc commented 12 months ago

Description of the bug:

image

The build has failed yet Bazel tool window showing that there are no issues

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

Protobufs compilation on OSX with XCode missing is the simplest way to repro

ERROR: ..../external/local_config_apple_cc/BUILD:79:24: in cc_toolchain_config rule @@local_config_apple_cc//:darwin_arm64: 
Traceback (most recent call last):
    File "........./external/local_config_apple_cc/cc_toolchain_config.bzl", line 2465, column 58, in _impl
        enabled = xcode_support.is_xcode_at_least_version(xcode_config, "15.0.0"),
    File "......../external/build_bazel_apple_support/lib/xcode_support.bzl", line 35, column 13, in _is_xcode_at_least_version
        fail("Could not determine Xcode version at all. This likely means Xcode isn't available; " +
Error in fail: Could not determine Xcode version at all. This likely means Xcode isn't available; if you think this is a mistake, please file an issue.
ERROR: ....../external/local_config_apple_cc/BUILD:79:24: Analysis of target '@@local_config_apple_cc//:darwin_arm64' failed
Analyzing: 64 targets (1502 packages loaded, 178522 targets configured)

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

2023.3

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

Java

What Bazel plugin version are you using?

Bazel 7.0.0-rc4 with 'master` of IJWB

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 12 months ago

I'm not sure, but it looks like it works as intended from the beginning. The plugin considers "sync" to be successful even if "build" has failed. That's why it prints

Sync was successful, but there were Bazel build errors. The project may not be fully updated or resolve until fixed. If the errors are from your working set, please uncheck 'Bazel > Sync > Expand Sync to Working Set' and try again.

But I agree we could make it more visible to the users

dkashyn-sfdc commented 12 months ago

It can be at least warning