bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Improve Errors for Transitive Rules

Open aryeh-looker opened this issue 3 years ago • 6 comments

Description of the feature request:

improve errors in transitive rules

what we get:

ERROR: /usr/local/google/home/aryehh/Development/cloud-spanner-emulator/binaries/BUILD:23:10: While resolving toolchains for target //binaries:emulator_main: invalid registered toolchain '@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains:linux_commands': error loading package '@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains': at /usr/local/google/home/aryehh/.cache/bazel/_bazel_aryehh/432487528c3e0374d8bae32ea74d9eb8/external/rules_foreign_cc/tools/build_defs/shell_toolchain/toolchains/defs.bzl:6:6: at /usr/local/google/home/aryehh/.cache/bazel/_bazel_aryehh/432487528c3e0374d8bae32ea74d9eb8/external/commands_overloads/toolchain_data_defs.bzl:3:6: compilation of module 'windows_commands.bzl' failed

what might be more ideal:

ERROR: /usr/local/google/home/aryehh/Development/cloud-spanner-emulator/binaries/BUILD:23:10: While resolving toolchains for target //binaries:emulator_main: invalid registered toolchain
  '@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains:linux_commands': error loading package 
    '@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains':
      at /usr/local/google/home/aryehh/.cache/bazel/_bazel_aryehh/432487528c3e0374d8bae32ea74d9eb8/external/rules_foreign_cc/tools/build_defs/shell_toolchain/toolchains/defs.bzl:6:6:
      at /usr/local/google/home/aryehh/.cache/bazel/_bazel_aryehh/432487528c3e0374d8bae32ea74d9eb8/external/commands_overloads/toolchain_data_defs.bzl:3:6: compilation of module 'windows_commands.bzl' failed

or something similar

What underlying problem are you trying to solve with this feature?

Understanding the dependency graph when an error in a rule happens

Which operating system are you running Bazel on?

glinux

What is the output of bazel info release?

release 5.2.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

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

aryeh-looker avatar Jul 02 '22 06:07 aryeh-looker

Repro is to clone https://github.com/GoogleCloudPlatform/cloud-spanner-emulator and attempt to build with bazel 5.2.0

aryeh-looker avatar Jul 02 '22 06:07 aryeh-looker

Hello @aryeh-looker, Thank you for providing the above details. Can you provide exact steps to reproduce the above errors. Thanks!

sgowroji avatar Jul 04 '22 06:07 sgowroji

Hello @aryeh-looker, Could you please provide steps to reproduce the above errors. Thanks!

sgowroji avatar Jul 13 '22 04:07 sgowroji

We are marking the above Issue as stale because it has not had any recent activity from many days. It will be closed in 7 days if there is no further activity occurs. Thank you.

sgowroji avatar Jul 28 '22 05:07 sgowroji

Closing as it is stale. Please reach us back if you still looking resolution for the above request or open a new issue adding the above as reference.

sgowroji avatar Aug 04 '22 11:08 sgowroji

@sgowroji I think that this issue is still valid. It isn't tied to a particular project, it's just about better error messages. @gregestren who I think has an ongoing project for more beautiful error messages.

fmeum avatar Aug 04 '22 12:08 fmeum

See https://github.com/bazelbuild/bazel/issues/11984. Sadly prioritizing low for now...

gregestren avatar Feb 15 '23 18:02 gregestren