Skip to content

http_archive: hash of content file different from origin file #20090

@honwen

Description

@honwen

Description of the bug:

hash of content file different from origin file

Which category does this issue belong to?

Core

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

WORKSPACE:

workspace(
    name = "demo",
)

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

http_archive(
    name = "ruff_macos",
    build_file_content = """exports_files(["ruff"], visibility = ["//visibility:public"])""",
    sha256 = "27a2800606b417d8f3102354efd0c09b8e08c94f754aaea9809a74a76e7456da",
    urls = [
        "https://github.com/astral-sh/ruff/releases/download/v0.1.4/ruff-x86_64-apple-darwin.tar.gz",
    ],
)

Flow:

  1. bazel build @ruff_macos//:ruff

  2. sha256sum $(bazel info output_base)/external/ruff_macos/ruff

    cbb610d58da995d6cee14804e088be7e2ece50f85b7b3afef3fa7e617af522de


but origin file hash(sha256sum) is c644ed5d190a4db8b153e84b25e45ae4ed00be7e690d802feeecee22876f4a22 ruff

Which operating system are you running Bazel on?

linux(x86-64), macos(m1)

What is the output of bazel info release?

release 6.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: buguntriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions