cast icon indicating copy to clipboard operation
cast copied to clipboard

refactor: go1.21.0 messup dependency

Open echoface opened this issue 6 months ago • 2 comments

minor version declaration cause problem when user go mod tidy; it will downgrade or change user's toolchain instruction and mess up dependencies

echoface avatar Jul 16 '25 04:07 echoface

@spf13 @sagikazarmark please review ,thanks

echoface avatar Jul 16 '25 07:07 echoface

I'm not entirely sure why this is necessary.

As of Go 1.21, that's the correct notation: https://go.dev/doc/go1.21#tools

(In fact, as of Go 1.23 it's the only accepted notation)

It declares a minimum required version, so as longs you have something later in your toolchain, it shouldn't cause any issues.

Can you please show me an example where it causes trouble? Thanks!

sagikazarmark avatar Aug 19 '25 22:08 sagikazarmark