GithubHelp home page GithubHelp logo

Support go1.21 about bazel-watcher HOT 7 CLOSED

chenrui333 avatar chenrui333 commented on June 18, 2024
Support go1.21

from bazel-watcher.

Comments (7)

jmhodges avatar jmhodges commented on June 18, 2024 2

@chenrui333 I believe the underlying problem is actually that homebrew needs to update the version of rules_go in the ibazel test to support Go 1.21's new version output. There's a new rules_go v0.41.0 that does so

Let me walk both of y'all down a garden path to explain that.

The bazel-test target is one that the Homebrew project creates to test when ibazel or one of its dependencies is bumped to a new version or changed. You can see the test definition in homebrew's repo

However, the log outputs linked in this ticket aren't super explanatory and don't match what's elsewhere. I suspect that's because the links that GitHub generates for the failed checks in on this page don't include the same --verbose info that's on that page.

If you look at that page, you see these error outputs mentioned in a section titled "brew test --retry --verbose ibazel failed on Linux!":

ERROR: /tmp/ibazel-test-20230808-72283-emd4kd/_bazel/2223a70abfa57191e29592d0d9893a55/external/go_sdk/version.bzl:5:21: unclosed string literal
ERROR: /tmp/ibazel-test-20230808-72283-emd4kd/_bazel/2223a70abfa57191e29592d0d9893a55/external/go_sdk/version.bzl:6:1: syntax error at 'time': expected newline
ERROR: /tmp/ibazel-test-20230808-72283-emd4kd/_bazel/2223a70abfa57191e29592d0d9893a55/external/go_sdk/version.bzl:6:11: invalid octal literal: 08 (use '0o8')
ERROR: /tmp/ibazel-test-20230808-72283-emd4kd/_bazel/2223a70abfa57191e29592d0d9893a55/external/go_sdk/version.bzl:6:14: invalid octal literal: 04 (use '0o4')
ERROR: /tmp/ibazel-test-20230808-72283-emd4kd/_bazel/2223a70abfa57191e29592d0d9893a55/external/go_sdk/version.bzl:6:23: invalid octal literal: 06 (use '0o6')
ERROR: /tmp/ibazel-test-20230808-72283-emd4kd/_bazel/2223a70abfa57191e29592d0d9893a55/external/go_sdk/version.bzl:7:1: unclosed string literal
ERROR: /tmp/ibazel-test-20230808-72283-emd4kd/BUILD:3:10: While resolving toolchains for target //:bazel-test: invalid registered toolchain '@go_sdk_toolchains//:go_aix_ppc64': error loading package '@go_sdk_toolchains//': compilation of module 'version.bzl' failed
ERROR: Analysis of target '//:bazel-test' failed; build aborted: 

When you inspect the code, it's the bits parsing the output of the go command's version code.

So, homebrew might need to bump the rules_go version in the ibazel formula tests. Something like:

      http_archive(
        name = "io_bazel_rules_go",
        sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
        urls = [
            "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
            "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
        ],
      )

from bazel-watcher.

chenrui333 avatar chenrui333 commented on June 18, 2024 1

cool, I am gonna try that later, thanks!

from bazel-watcher.

achew22 avatar achew22 commented on June 18, 2024

What repo are you testing? In the BUILD file in the root we do not have a target //:bazel-test

from bazel-watcher.

chenrui333 avatar chenrui333 commented on June 18, 2024

oh, that might be some test we need to update in the homebrew side, let me check really quick

from bazel-watcher.

chenrui333 avatar chenrui333 commented on June 18, 2024

indeed an issue with updating the rules_go to use the commit in this PR

iBazel [1:15PM]: You are using an experimental filesystem watcher. If you would like to disable that, please set the environment variable
	IBAZEL_USE_LEGACY_WATCHER=1
iBazel [1:15PM]: Error getting Bazel info exit status 1
iBazel [1:15PM]: Querying for files to watch...
iBazel [1:15PM]: Error getting Bazel info exit status 1
iBazel [1:15PM]: Error finding bazel info: exit status 1

iBazel [1:15PM]: Error querying for source files: exit status 1
iBazel [1:15PM]: Error getting Bazel info exit status 1
iBazel [1:15PM]: Error finding bazel info: exit status 1

iBazel [1:15PM]: Error querying for source files: exit status 1
iBazel [1:15PM]: Building //:bazel-test
ERROR: Error computing the main repository mapping: Every .bzl file must have a corresponding package, but '@io_bazel_rules_go//go:deps.bzl' does not have one. Please create a BUILD file in the same or any parent directory. Note that this BUILD file does not need to do anything except exist.
Loading:
iBazel [1:15PM]: Build error: exit status 1

################################################################################
# Did you know iBazel can invoke programs like Gazelle, buildozer, and         #
# other BUILD file generators for you automatically based on bazel output?     #
# Documentation at: https://github.com/bazelbuild/bazel-watcher#output-runner  #
################################################################################

from bazel-watcher.

achew22 avatar achew22 commented on June 18, 2024

I'm not sure I understand what the linked PR has to do with this. Can you elaborate a little bit more?

from bazel-watcher.

github-actions avatar github-actions commented on June 18, 2024

Stale issue message

from bazel-watcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.