2 ms·
An easy way to get that is when you use a third-party library, update that to get some new feature, and get a new enum value for free, say because the html pars
by Someone 3y ago
An easy way to get that is when you use a third-party library, update that to get some new feature, and get a new enum value for free, say because the html parser library started supporting a new node type or added a new error type (the latter will be rare in go because of its lack of sum types).
Ideally, of course, the release notes of the library would spell out the issue, and you’d read them, but even then, making sure you fix this everywhere is way easier if the compiler refuses to compile your code if it doesn’t handle the new case.
- earthboundkid 3y agoDid this actually happen to you or are you just theorizing that it could happen?
- mappu 3y agoOne difficulty with this is, adding a new enum value should therefore be semver-major.