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

Buildifier warns about lack of rules_cc; rules_cc says you don't have to use it #92

Closed
GMNGeoffrey opened this issue Nov 13, 2020 · 3 comments

Comments

@GMNGeoffrey
Copy link

GMNGeoffrey commented Nov 13, 2020

native-cc: Function "cc_library" is not global anymore and needs to be loaded from "@rules_cc//cc:defs.bzl". (https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#native-cc)

There is no need to use rules from this repository just yet. If you want to use rules_cc anyway, add the following to your WORKSPACE file
https://github.com/bazelbuild/rules_cc#getting-started

These are clearly not compatible. In addition, the instruction to add rules_cc to your WORKSPACE file seem to be not accurate based on bazelbuild/bazel#8743 (comment).

Please make the tools in the ecosystem and their documentation consistent.

Cross-posted as bazelbuild/buildtools#923

@keith
Copy link
Member

keith commented Nov 13, 2020

related #86

limdor added a commit to limdor/rules_go that referenced this issue Sep 9, 2021
Long time ago Bazel was saying that cc_binary, cc_library, cc_test and the other cc_* rules should be imported from rules_cc.
However rules_cc was always saying that there is no need to use them yet.
After several discussions it was clarified that migration to bazelbuild/rules_cc was put on hold and there is not need to the users that they start using it.
One of the reasons why a person would not want to use rules_cc right now is because there is no release and there is no notion of what is a good commit:
bazelbuild/rules_cc#91
bazelbuild/rules_cc#68

The fact that rules_go depends on rules_cc forces any rules_go user to use rules_cc. Considering that rules_docker depends on rules_go, any rules_docker user is also forced to depend on rules_cc.

More information about the discussions:
bazelbuild/rules_cc#86
bazelbuild/rules_cc#92
bazelbuild/buildtools#923
bazelbuild/buildtools#952

Fixes bazel-contrib#2949
limdor added a commit to limdor/rules_go that referenced this issue Sep 9, 2021
Long time ago Bazel was saying that cc_binary, cc_library, cc_test and the other cc_* rules should be imported from rules_cc.
However rules_cc was always saying that there is no need to use them yet.
After several discussions it was clarified that migration to bazelbuild/rules_cc was put on hold and there is not need to the users that they start using it.
One of the reasons why a person would not want to use rules_cc right now is because there is no release and there is no notion of what is a good commit:
bazelbuild/rules_cc#91
bazelbuild/rules_cc#68

The fact that rules_go depends on rules_cc forces any rules_go user to use rules_cc. Considering that rules_docker depends on rules_go, any rules_docker user is also forced to depend on rules_cc.

More information about the discussions:
bazelbuild/rules_cc#86
bazelbuild/rules_cc#92
bazelbuild/buildtools#923
bazelbuild/buildtools#952

Fixes bazel-contrib#2949
achew22 pushed a commit to bazel-contrib/rules_go that referenced this issue Sep 10, 2021
Long time ago Bazel was saying that cc_binary, cc_library, cc_test and the other cc_* rules should be imported from rules_cc.
However rules_cc was always saying that there is no need to use them yet.
After several discussions it was clarified that migration to bazelbuild/rules_cc was put on hold and there is not need to the users that they start using it.
One of the reasons why a person would not want to use rules_cc right now is because there is no release and there is no notion of what is a good commit:
bazelbuild/rules_cc#91
bazelbuild/rules_cc#68

The fact that rules_go depends on rules_cc forces any rules_go user to use rules_cc. Considering that rules_docker depends on rules_go, any rules_docker user is also forced to depend on rules_cc.

More information about the discussions:
bazelbuild/rules_cc#86
bazelbuild/rules_cc#92
bazelbuild/buildtools#923
bazelbuild/buildtools#952

Fixes: #2949
@limdor
Copy link
Contributor

limdor commented Jun 5, 2023

I would propose to close this issue. Buildifier is no longer asking for loading rules_cc

@GMNGeoffrey
Copy link
Author

Agreed. The corresponding Buildozer issue (bazelbuild/buildtools#923) was fixed in bazelbuild/buildtools#952

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