Skip to content

Builtins exports.bzl file is called after the WORKSPACE #17713

@keith

Description

@keith

Description of the bug:

After this commit a3f0bfa, using rules_swift in some cases results in this error:

ERROR: Traceback (most recent call last):
        File "/private/var/tmp/_bazel_ksmiley/1c823ac8225acd936431a04c304d3fec/external/rules_proto/proto/private/rules/proto_descriptor_set.bzl", line 53, column 32, in <toplevel>
                "deps": attr.label_list(
Error in label_list: Illegal argument: element in 'providers' is of unexpected type. Either all elements should be providers, or all elements should be lists of providers, but got an element of type NoneType.
ERROR: Error computing the main repository mapping: at /private/var/tmp/_bazel_ksmiley/1c823ac8225acd936431a04c304d3fec/external/build_bazel_rules_apple/apple/apple.bzl:41:5: at /private/var/tmp/_bazel_ksmiley/1c823ac8225acd936431a04c304d3fec/external/build_bazel_rules_apple/apple/internal/experimental_mixed_language_library.bzl:4:5: at /private/var/tmp/_bazel_ksmiley/1c823ac8225acd936431a04c304d3fec/external/build_bazel_rules_swift/swift/swift.bzl:79:5: at /private/var/tmp/_bazel_ksmiley/1c823ac8225acd936431a04c304d3fec/external/build_bazel_rules_swift/swift/internal/swift_proto_library.bzl:17:6: at /private/var/tmp/_bazel_ksmiley/1c823ac8225acd936431a04c304d3fec/external/rules_proto/proto/defs.bzl:18:6: initialization of module 'proto/private/rules/proto_descriptor_set.bzl' failed

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

Here's a repro project protorepro.zip. Run USE_BAZEL_VERSION=last_green bazelisk build .... Testing with the commit before that does not have the issue. Using rules_proto @ the current HEAD (71c4fc69900946093ac5c82d81efd19fa522d060) does not fix the issue.

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

No response

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

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)team-Loading-APIBUILD file and macro processing: labels, package(), visibility, globtype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions