Closed
Description
If swiftc
is not found on the system path, the build will fail with the following terrible diagnostic:
ERROR: /<REDACTED>/examples/xplatform/hello_world/BUILD:5:1: every rule of type swift_binary implicitly depends upon the target '@build_bazel_rules_swift_local_config//:toolchain', but this target could not be found because of: no such package '@build_bazel_rules_swift_local_config//': Traceback (most recent call last):
File "/<REDACTED>/external/build_bazel_rules_swift/swift/repositories.bzl", line 75
_create_linux_toolchain(repository_ctx)
File "/<REDACTED>/external/build_bazel_rules_swift/swift/repositories.bzl", line 24, in _create_linux_toolchain
path_to_swiftc.dirname
object of type 'NoneType' has no field 'dirname'
We should print something more useful for the user.