knative / hack

Knative common scripts.
Apache License 2.0
18 stars 64 forks source link

Set Go version by update-deps.sh #179

Closed nak3 closed 2 years ago

nak3 commented 2 years ago

Currently Go version is not consistent and every repository needs to bump the go version in go.mod manually like these commits:

https://github.com/knative-sandbox/net-kourier/commit/53f2bec99c447c4d5d332a89f894664befb3c128 https://github.com/knative-sandbox/net-certmanager/commit/8f622b7cbfb1829edb4863ce89930f0cf9673a1c

This patch sets the go version in go.mod automatically by update-deps.sh.

knative-prow[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nak3 To complete the pull request process, please assign kvmware after the PR has been reviewed. You can assign the PR to them by writing /assign @kvmware in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/knative/hack/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
nak3 commented 2 years ago

/hold

This is not urgent PR so should be merged after the 1.5 release.

dprotaso commented 2 years ago

This can't be bumped in an automated fashion you'll want to run

go mod tidy -go=1.16 && go mod tidy -go=1.17 on your first transition

ie. https://github.com/knative/pkg/runs/6579482405?check_suite_focus=true

dprotaso commented 2 years ago

Also the go version in the mod file is just a min supported go version - and doesn't necessarily need to be bumped.

1.17 is an exception because the Go Team decided to include all the transient dependences in a second require block for module pruning.

nak3 commented 2 years ago

Also the go version in the mod file is just a min supported go version - and doesn't necessarily need to be bumped.

1.17 is an exception because the Go Team decided to include all the transient dependences in a second require block for module pruning.

Yeah, I also think that the go version in the mod file is not so important and unnecessary to be cared. That's why we can modify it by auto script. If Go team makes some exception in the future like 1.17, we again have to modify the mod file one by one :sweat:

nak3 commented 2 years ago

Anyway, I don't have strong opinion to automate this one. Closing.