bazelbuild / rules_cc

C++ Rules for Bazel
https://bazel.build
Apache License 2.0
176 stars 88 forks source link

strip_prefix attribte in release notes is wrong #225

Closed aherrmann closed 3 weeks ago

aherrmann commented 1 month ago

Description of the problem:

The release notes for 0.0.10-rc1 provide following installation isntructions

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_cc",
    urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.10-rc1/rules_cc-0.0.10-rc1.tar.gz"],
    sha256 = "d75a040c32954da0d308d3f2ea2ba735490f49b3a7aa3e4b40259ca4b814f825",
    strip_prefix = "rules_cc-0.0.10-rc1",
)

However, including that content in a WORKSPACE file leads to the following error

Error in download_and_extract: java.io.IOException: Error extracting .../f2ddaeb9f72d42f7e2c9857389ccad76/external/rules_cc/temp12391310764082783159/rules_cc-0.0.10-rc1.tar.gz to .../f2ddaeb9f72d42f7e2c9857389ccad76/external/rules_cc/temp12391310764082783159: Prefix "rules_cc-0.0.10-rc1" was given, but not found in the archive. Here are possible prefixes for this archive: "cc", "tests", "examples", "third_party", "tools".

Removing the strip_prefix attribute resolves the issue.

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

Try to install rules_cc 0.0.10-rc1 using the provided install instructions in WORKSPACE.

What operating system are you running Bazel on?

Ubuntu 22.04

What's the output of bazel info release?

release 7.1.0- (@non-git)

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

nixpkgs built Bazel

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?

0.0.10-rc1

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

--noenable_bzlmod

Have you found anything relevant by searching the web?

n/a

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

n/a