opentelemetry-go
opentelemetry-go copied to clipboard
Do not use toolchain directive
I think that go 1.21.0 is required for the bump and it should not be a problem..
However, I do not think we need to add toolchain go1.22.5. I think it would be better to avoid toolchain consistently in all our Go modules.
Originally posted by @pellared in https://github.com/open-telemetry/opentelemetry-go/pull/5643#discussion_r1698150685
We should have have some "linter" that would detect such changes.
is this already fixed and merged?
is this already fixed and merged?
From issue description:
We should have have some "linter" that would detect such changes
With the upgrade of Go to 1.23, the use of toolchain seems to be required: https://github.com/open-telemetry/opentelemetry-go/pull/5720#discussion_r1721966833
Closing this, as with Go 1.23, the toolchain directive is required and added automatically.
Closing this, as with Go 1.23, the toolchain directive is required and added automatically.
It is still not required. See: https://github.com/open-telemetry/opentelemetry-go/pull/5784
There are more people complaining on the go get and go mod tidy behavior so maybe eventually they will stop automatically adding the toolchain directive. See: https://github.com/golang/go/issues/65847
Dependabot update of opentelemetry packages added go toolchain for me:
- https://github.com/cloudflare/ebpf_exporter/pull/471
It also fails to build and requires go mod tidy, which changes it further:
$ git diff
diff --git a/go.mod b/go.mod
index 86aefc2..2a91bad 100644
--- a/go.mod
+++ b/go.mod
@@ -1,7 +1,8 @@
module github.com/cloudflare/ebpf_exporter/v2
-go 1.21
-toolchain go1.22.5
+go 1.22
+
+toolchain go1.23.1
No other dependency bump required this.
I would like to work on this issue.