bazelbuild / examples

Examples for Bazel
http://bazel.build
Apache License 2.0
824 stars 506 forks source link

Error occurred during the fetch of repository 'bazel_skylib~1.3.0' in Bazelmod with Bazel@HEAD #302

Closed sgowroji closed 1 year ago

sgowroji commented 1 year ago

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3254#018a1b6a-ba78-4ce2-89a8-68690256452a

Platform : Ubuntu, MacOS, Windows

Logs :

ERROR: An error occurred during the fetch of repository 'bazel_skylib~1.3.0':
   Traceback (most recent call last):
    File "C:/b/gde7yij7/external/bazel_tools/tools/build_defs/repo/http.bzl", line 150, column 10, in _http_archive_impl
        patch(ctx, auth = auth)
    File "C:/b/gde7yij7/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 174, column 22, in patch
        ctx.patch(patchfile, strip)
Error in patch: Error applying patch C:/b/bk-windows-3pxf/bazel-downstream-projects/examples/bzlmod/02-override_bazel_module/bazel_skylib.patch: in patch applied to C:/b/gde7yij7/external/bazel_skylib~1.3.0/version.bzl: Incorrect Chunk: the chunk content doesn't match the target
**Original Position**: 14
**Original Content**:
"""The version of bazel-skylib."""
version = "1.2.0"
**Revised Content**:
"""The version of bazel-skylib."""
version = "1.2.0"
hello_msg = "Hello skylib"

Steps :

git clone https://github.com/bazelbuild/examples.git  && cd examples/bzlmod/02-override_bazel_module
git reset e784965893340b3c0bfdeefa35d5e0f19ea819f9 --hard
export USE_BAZEL_VERSION=74aadb265c1cae614ae636146f7a1e9e195b7e97
bazel build --enable_bzlmod //:main

Culprit : https://github.com/bazelbuild/bazel/commit/640e8502c979d353fcac421f12e7170635c74292 CC Greenteam @SalmaSamy

Amangupta7011 commented 1 year ago

sir can you please assign me that issue

sgowroji commented 1 year ago

Hi @Amangupta7011, Can you share the Code changes of the PR. Thanks!

meteorcloudy commented 1 year ago

This is fixed by https://github.com/bazelbuild/examples/commit/8ecbcddfe939e73b1c66707e178a79a19d97b9ea