bazelbuild / buildtools

A bazel BUILD file formatter and editor
Apache License 2.0
994 stars 410 forks source link

Unable to go install tagged version since introduction of `v` prefix #1237

Open ileitch opened 5 months ago

ileitch commented 5 months ago
$ go install github.com/bazelbuild/buildtools/buildifier@6.1.1
go: downloading github.com/bazelbuild/buildtools v0.0.0-20230425225026-3dcc8d67e8ea

Then for every version after the introduction of the v prefix:

$ go install github.com/bazelbuild/buildtools/buildifier@v6.4.0
go: github.com/bazelbuild/buildtools/buildifier@v6.4.0: github.com/bazelbuild/buildtools@v6.4.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/bazelbuild/buildtools/v6")
$ go version
go version go1.21.6 darwin/arm64
kaliaumem commented 5 months ago

Same issue here. I'm trying to install buildifier in a Docker image meant to be quite stable for our CI.

Files not being formatted properly fails our build on purpose, so having unpredictable behavior changes from buildifier because we have to rebuild our images with latest is a non-starter.

I guess we're stuck with version 6.1.1 for now