Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(rules/proto): missing attribute attr.importmap #4069

Open
tyler-french opened this issue Aug 27, 2024 · 2 comments
Open

bug(rules/proto): missing attribute attr.importmap #4069

tyler-french opened this issue Aug 27, 2024 · 2 comments

Comments

@tyler-french
Copy link
Contributor

tyler-french commented Aug 27, 2024

What version of rules_go are you using?

HEAD

What version of gazelle are you using?

latest

What version of Bazel are you using?

7.2

What did you do?

% bazel build //idl/..:merchant_pb_go_proto 
INFO: Writing tracer profile to '/tmp/bazel_20240827133416_dcvnk'
INFO: Invocation ID: 8ab2bc70-07c3-411a-8444-b89c076859ac
ERROR: /home/user/go-code/idl/../BUILD.bazel:13:20: in @@io_bazel_rules_go//proto:def.bzl%_go_proto_aspect aspect on _go_thriftrw_library rule //idl/code.uber.internal/config/object-config/host-agent:object_config_host_agent_go_thriftrw: 
Traceback (most recent call last):
        File "/home/user/.cache/bazel/_bazel_tfrench/b97476d719d716accead0f2d5b93104f/external/io_bazel_rules_go/proto/def.bzl", line 76, column 25, in _go_proto_aspect_impl
                importmap = attr.importmap,
Error: No attribute 'importmap' in attr. Make sure you declared a rule attribute with this name.
Available attributes: _action_listener, _config_dependencies, _default_deps, _go_context_data, applicable_licenses, aspect_hints, compatible_with, deprecation, deps, exec_compatible_with, exec_properties, expect_failure, features, generator_function, generator_location, generator_name, importpath, name, package, plugins, restricted_to, tags, target_compatible_with, testonly, thrift, thrift_root, thriftrw, toolchains, transitive_configs, visibility
ERROR: Analysis of target '//idl/..host-agent:object_config_host_agent_go_thriftrw' failed
ERROR: Analysis of target '//idl/...:merchant_pb_go_proto' failed; build aborted
INFO: Elapsed time: 4.209s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
INFO: Build Event Protocol files produced successfully.
WARNING:Bazel failed with exit code 1
WARNING:[Errno 2] No such file or directory: '/tmp/tmpwnkmomdi/build_errors.txt'

Here's the rule

go_proto_library(
    name = "merchant_pb_go_proto",
    compilers = [
        "//rules/proto:go_yarpc",
        "@io_bazel_rules_go//proto:gogoslick_grpc",
        "//src/_internal_:go_uber_instrumenter",  # keep
        "//rules/proto:go_uber_validate",
    ],
    importpath = "gogoproto/code.uber.internal/...",
    proto = ":merchant_yelppb_proto",
    visibility = ["//visibility:public"],
    deps = [
        "//src/..:go_default_library",  # keep
    ],
)
@tyler-french tyler-french changed the title rules/proto: rules/proto: missing attribute attr.importmap Aug 27, 2024
@tyler-french tyler-french changed the title rules/proto: missing attribute attr.importmap bug(rules/proto): missing attribute attr.importmap Aug 27, 2024
@dzbarsky
Copy link
Contributor

linking the discussion here #4058 (comment)
It sounds like one of the deps elided above is a _go_thriftrw_library, and that's the rule that is missing importmap

@fmeum
Copy link
Member

fmeum commented Aug 29, 2024

@tyler-french Could you check #4058 (comment)? If this is really an unexpected dependency, I would consider this failure a feature ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants