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

rules_cc is being used by rules_go, and needs a published release archive #68

Closed
mescanne opened this issue Mar 10, 2020 · 2 comments
Closed

Comments

@mescanne
Copy link

Description of the problem / feature request:

rules_cc is being relied upon by rules_go, but there is published release archive yet of rules_cc. This makes building offline much more difficult due to using git_archive.

Background:

Feature requests: what underlying problem are you trying to solve with this feature?

Using distdir requires using http_archive.

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

Replace this line with your answer.

What operating system are you running Bazel on?

N/A

What's the output of bazel info release?

N/A

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

N/A

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?

See rules_go reference. The desire is to use a published version.

What Bazel options do you use to trigger the issue? What C++ toolchain do you use?

N/A

Have you found anything relevant by searching the web?

N/A

Any other information, logs, or outputs that you want to share?

N/A

@jakemcc
Copy link

jakemcc commented Apr 27, 2020

@mescanne Mentioning this in case you were unaware and it helps you get unblocked, you can use http_archive with git repos hosted on github. Example from a WORKSPACE I manage.

http_archive(
    name = "rules_cc",
    sha256 = "5233d5a14c23c2a9c1df0e76deba0100090f973b15e5460b596283b569823c8c",
    strip_prefix = "rules_cc-4de26b53a6ad892b605e747fbafe256e48d5b56e",
    urls = ["https://github.com/bazelbuild/rules_cc/archive/4de26b53a6ad892b605e747fbafe256e48d5b56e.zip"],
)

@jayconrod
Copy link

@jakemcc This isn't safe unless the .zip file is mirrored somewhere else, too.

.zip files from that endpoint are prepared on demand. The SHA-256 sum can change over time, since it depends on GitHub's system software, compression settings, file order, and so on. This has broken builds multiple times in the past. That's why rules_go uses git_repository for this, not http_archive.

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 bazelbuild#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 bazelbuild#2949
achew22 pushed a commit to bazelbuild/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
@comius comius closed this as completed Dec 27, 2023
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