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

Trying to modify immutable set #39

Closed
ozio85 opened this issue Oct 9, 2019 · 5 comments
Closed

Trying to modify immutable set #39

ozio85 opened this issue Oct 9, 2019 · 5 comments
Assignees

Comments

@ozio85
Copy link

ozio85 commented Oct 9, 2019

Description of the problem / feature request:

Problem occurs if a tag is already used in a rule:
File "D:/build/j4jghgxg/external/rules_cc/cc/defs.bzl", line 21, in _add_tags
attrs["tags"] += [_MIGRATION_TAG]
trying to mutate a frozen object

I guess it is not ready to use yet, but this seems like a bug anyway

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

Use rules_cc with a rule with existing "tags"

What operating system are you running Bazel on?

0.29.1

What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?

0d5f3f2

Have you found anything relevant by searching the web?

Nope :)

@onet-git
Copy link

I have tested this on 0.26 and 1.2.0 and both fail when using rules_cc instead of built in native rules if your project also uses tags. I thought perhaps mutability had changed over time, but I don't think this line ever worked. @oquenchil @hlopko?

@oquenchil oquenchil self-assigned this Nov 29, 2019
@oquenchil
Copy link
Contributor

Fixed here:
cfe68f6

@oquenchil
Copy link
Contributor

You will have to include a later commit of rules_cc

@oquenchil
Copy link
Contributor

oquenchil commented Nov 29, 2019

http_archive(
    name = "rules_cc",
    sha256 = "e75dfb05bc1e89ebbb6696cadb5e455833690009310d9dc5512151c5adb0e4e3",
    strip_prefix = "rules_cc-cfe68f6bc79dea602f2f6a767797f94a5904997f",
    urls = [        "https://github.com/bazelbuild/rules_cc/archive/cfe68f6bc79dea602f2f6a767797f94a5904997f.zip",
    ],
)

@lberki
Copy link
Contributor

lberki commented Feb 12, 2020

Is this still a problem?

load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
    name = "cc",
    srcs = ["cc.cc"],
    tags = ["tag"],
)

Seems to work alright.

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

4 participants