Email or username:

Password:

Forgot your password?
2 comments
Maxim Lebedev

Expectation:
1. You rewrite all the code
2. Commit, as usual
3. Put v2.0.0 tag on commit, as usual
4. The compiler will refuse major dependency updates requiring manual replacement of imports, as a consequence nothing breaks, I don't have to take care of old code, everyone is happy

Reality:
1. Yeah just make a v2 directory and put everything in it, lol: go.dev/blog/v2-go-modules

WHY

#golang #go #module #programming

Expectation:
1. You rewrite all the code
2. Commit, as usual
3. Put v2.0.0 tag on commit, as usual
4. The compiler will refuse major dependency updates requiring manual replacement of imports, as a consequence nothing breaks, I don't have to take care of old code, everyone is happy

Reality:
1. Yeah just make a v2 directory and put everything in it, lol: go.dev/blog/v2-go-modules

Boris Marinov

@toby3d
A new start from scratch with a new name / package identity would have been probably better in the long term. Just wait until you find out that go getting without a version will give you the latest V1 and not v2+ :D I kinda agree with the approach, but the tooling should be shouting at me that there is a newer version.

Go Up