Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

rules_cc dependency marked as dev causes rules_cc module visibility issues #203

Open

Description

@steeve

When trying to use the following code:

load("@rules_proto//proto:defs.bzl", "proto_descriptor_set")

proto_descriptor_set(
    name = "my_fdset",
    deps = ["...."],
)

This causes the following error:

ERROR: error loading package '@@rules_proto~6.0.0-rc2//tools/file_concat': Unable to find package for @@[unknown repo 'rules_cc' requested from @@rules_proto~6.0.0-rc2]//cc:defs.bzl: The repository '@@[unknown repo 'rules_cc' requested from @@rules_proto~6.0.0-rc2]' could not be resolved: No repository visible as '@rules_cc' from repository '@@rules_proto~6.0.0-rc2'.

Activity

  1. comius commented on Feb 9, 2024

    @comius
    Contributor

    cc @alexeagle @thesayyn, please triage/fix

  2. added
    bugSomething isn't working
    P1I'll work on this now. (Assignee required)
    on Feb 9, 2024
  3. self-assigned this
    on Feb 9, 2024
  4. alexeagle commented on Apr 22, 2024

    @alexeagle

    Yup, that tool is written in C++ which is naughty since we only declare that as a devDep:

    bazel_dep(name = "rules_cc", version = "0.0.1", dev_dependency = True)

    and many users have broken C++ toolchains.

    The program itself is very small https://github.com/bazelbuild/rules_proto/blob/f889a1b532fdca5f5051691f023a6a9f37ce494f/tools/file_concat/main.cc

    I think we should avoid having tools live in rules_proto.

  5. SanjayVas commented on May 1, 2024

    @SanjayVas

    It looks like despite being reported against v6.0.0-rc2, this bug continued into both v6.0.0-rc3 and the final v6.0.0 release. Can we get a fix either in rules_proto itself (v6.0.1) or in BCR (6.0.0.bcr.1)?

  6. alexeagle commented on May 1, 2024

    @alexeagle

    What do you propose as the fix? I suppose our only choice per semver is to make rules_cc a non-dev dependency, rather than remove this tool or ship pre-built binaries for it.

  7. SanjayVas commented on May 1, 2024

    @SanjayVas

    I suppose our only choice per semver is to make rules_cc a non-dev dependency

    Yes, exactly this for the short term as right now the module definition is just incorrect/broken. Anything like what was proposed in #203 (comment) would need to come later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions