News for hackers. Stuff that matters.
Re:Go 1.17 is deprecating the traditional use of 'go get' by vbezhenar on Friday June 25, 2021 @11:25AM (#27631956)
In my opinion it's quite simple.

Upgrade cycle should be one major version per year (may be less, but not more).

N+1 version does not break compatibility with N version, but introduces warnings for things that's going to be removed. Every warning must have very easy and clear way to resolve it, ideally automatic way, if language and tools support it. Developer must not redesign his application to get rid of warning, but rather just make few obvious mechanical moves.

N+2 version removes previously deprecated things and breaks compatibility with N version.

So you're going to spend few hours once a year to migrate to newer dependency and resolve their warnings. If your software was rotting for 10 years, you're going to spend a week to gradually upgrade, resolve warnings, etc. That should be acceptable to everyone. And those who prefer to live in rot, should pay someone to maintain those outdated libraries (or just live with bugs and vulnerabilities, that's their choice).

With programming languages and foundational frameworks it might be worth to be a little bit more conservative and extend that deprecation period to a few years. Just don't keep deprecated things infinitely.

Re:Go 1.17 is deprecating the traditional use of 'go get' by kakwa_ on Friday June 25, 2021 @12:35PM (#27633049)
The timeline seems way too short for a lot of usecases to be honest.

For young projects, where it's kind of expected (trade-off of being an early adopter), or for small projects (which can be easily maintained by a third party), it's acceptable.

But for bigger/core projects this is far more problematic.

Just for comparisons, a lot of Linux distributions will maintain a specific version for ~5 years if not more (Debian, RedHat), and if for smaller components, they can do things like backport patches, or even create the patches themselves, however, for larger ones, they are reliant on upstream providing stable and maintained versions for the life of a specific version of the distribution.

Also, I've seen quite a lot of large and complex projects taking several years to reach production. In these contexts, having to constantly rework components (and re-test them, both individually and as part of the overall system) is not really feasible.

There is no ideal solution, maintaining backward compatibility is costly, and can lead to messy code bases, and it's legitimate to want to avoid that by deprecating API/functionalities. However, downstream (distribution, users of a given library) needs stability and generally cannot afford to rework their solution every 3 months (keep in mind that downstream generally relies on many upstream components, if a lot of these components break at the same time, even in minor ways, this can result in a huge headaches).

IMHO, a more desirable compatibility period, at least for big/core components, would be around 5 years.

Re:Go 1.17 is deprecating the traditional use of 'go get' by seoaeu on Friday June 25, 2021 @03:26PM (#27635186)
There's definitely also a tradeoff. If you make the timeline too long then people will just assume that they can use the old version forever and get mad when that doesn't work out. Say because the project that needs "several years to reach production" actually ends up being used for 5+ years
Re:Go 1.17 is deprecating the traditional use of 'go get' by ownagefool on Friday June 25, 2021 @02:22PM (#27634507)
The linux distro doesn't keep the head supported for 5 years though, they just support older versions for longer. Ergo, what you're basically arguing for is an LTS version of golang.
Re:Go 1.17 is deprecating the traditional use of 'go get' by at_a_remove on Friday June 25, 2021 @02:36PM (#27634666)
Your "move fast, break things" speed must be inversely proportional to the penetration of the language: penetration into books, academia, courses, hardware, firmware, software, software that depends on other software, and so on.

Soon I will be able to let go to Python 2.7, but not just yet. My industry is the precise opposite of "move fast, break things" because here the "things" happens to be what are called humans and their "break" scenario involves shrieking as their lungs are burned to leather, and no amount of Jolt soda poured into the floating holographic head of Mark Zuckerberg will suffice.

If you have a piddly language you and five people circulate on Usenet, go for it. Break it twice a day. But once your language gets serious, be ready for inertia. It's a property of mass.

Re:Go 1.17 is deprecating the traditional use of 'go get' by lugged on Friday June 25, 2021 @11:48AM (#27632261)
> That should be acceptable to everyone.

I used to build things with frameworks and languages with yearly upkeep requirements.

> And those who prefer to live in rot,

What rot? If my application didn't change I'm not sure why my dependencies should need to.

Regarding golang, I hated go get and the go workspace idea when I first started with go.

Then I got over it, now I try to use modules and I just get annoyed, the whole system is confusing and flaky.

All this change is doing is pushing me further into rust. It has problems too but they tend not to do this kind of hand wringing.

Re:Go 1.17 is deprecating the traditional use of 'go get' by Thaxll on Friday June 25, 2021 @02:25PM (#27634548)
The change does not affect either the Go language or the way that you compile the code or fetch dependencies, what's the problem?

Go is much more stable than Rust, you know how many Rust libs need nighlty to work?

Re:Go 1.17 is deprecating the traditional use of 'go get' by stouset on Friday June 25, 2021 @05:01PM (#27636220)
> Go is much more stable than Rust, you know how many Rust libs need nighlty to work?

Rust libs that use nightly do so because they're opting in to new features, not because released features are unstable.

Even then with the releases of const generics, proc macros, and a couple other big-ticket features, fewer and fewer Rust projects require nightly anyway.

Re:Go 1.17 is deprecating the traditional use of 'go get' by steveklabnik on Friday June 25, 2021 @06:15PM (#27636931)
How many do? Which ones? I’m curious what you’re still running into.

(This is me being curious about your Rust comment, not implying anything about the relative stability of the two languages)

Re:Go 1.17 is deprecating the traditional use of 'go get' by Thaxll on Saturday June 26, 2021 @02:26PM (#27644502)
Re:Go 1.17 is deprecating the traditional use of 'go get' by steveklabnik on Saturday June 26, 2021 @03:20PM (#27644947)
rustfmt is not a library, and folks don’t depend on it as one. The only nightly features it uses are “hey let me use compiler as a library please,” which is also not, in my experience, common in the ecosystem. Even furthermore, it’s distributed precompiled in your rust installation, so that doesn’t end up giving you a nightly dependency to use it.

Anyway, thanks. Nightly does exist to be used, but our users largely report using stable, so when people say things like this, I am trying to see if there’s any blind spots.

Re:Go 1.17 is deprecating the traditional use of 'go get' by systemvoltage on Friday June 25, 2021 @12:43PM (#27633189)
This can also backfire - no one updates Go because of breaking changes and now you've created more problems. Simply miss one or two upgrades and it cascades into an uphill battle. Code base is stuck at N-8 and while version N's popularity plummets, libraries are in disarray.

I know with C, I can rely on it for 45 years. There is something to be said about this and the peace of mind that comes with it.

Obviously, this is a spectrum with extremities and many ways to go about it. We should not discount "Move slowly, and not break things".

Re:Go 1.17 is deprecating the traditional use of 'go get' by throwaway894345 on Friday June 25, 2021 @03:25PM (#27635174)
> I know with C, I can rely on it for 45 years.

Right, but that's at the expense of 50 years of progress. For the overwhelming majority of languages I strongly contend that's the wrong tradeoff.

Re:Go 1.17 is deprecating the traditional use of 'go get' by SergeAx on Friday June 25, 2021 @12:28PM (#27632924)
But Go never updated major version yet?
Re:Go 1.17 is deprecating the traditional use of 'go get' by arghnoname on Friday June 25, 2021 @12:17PM (#27632724)
I'd differ on this a bit. Your N+1 scheme is fine with me if you want to use the newest and greatest features, but I think old code / libraries should still work so long as they don't use the latest and greatest features.

I think the compiler should just ship with older versions of the language and different translation units can be compiled with older versions of the compiler. So long as the newer versions can interact with the older ABI (which ideally rarely changes), there's no problem.

Re:Go 1.17 is deprecating the traditional use of 'go get' by bee_rider on Friday June 25, 2021 @01:13PM (#27633597)
In that cast, they'd have to either

* Fix all bugs in old version, or

* Ship known buggy code

Neither seems great. Better to just have archival versions with a "here be dragons" warning.

Re:Go 1.17 is deprecating the traditional use of 'go get' by morelisp on Friday June 25, 2021 @03:23PM (#27635145)
> Ship known buggy code

Thank god there's no known bugs in released software!

Re:Go 1.17 is deprecating the traditional use of 'go get' by bee_rider on Friday June 25, 2021 @04:10PM (#27635643)
I'm not sure I follow.
Re:Go 1.17 is deprecating the traditional use of 'go get' by morelisp on Friday June 25, 2021 @04:18PM (#27635748)
Go 1.17 will release with a lot of known bugs. Continuing to ship it a year later with known bugs is not different.

But more deeply, LTS ships buggy versions of the software. That's the point - only the truly dangerous bugs (e.g. compilation-triggered RCE or something) get fixed, everything else stays compatible even if it's otherwise undesirable or suboptimal. Code depends on those bugs.

Re:Go 1.17 is deprecating the traditional use of 'go get' by toast0 on Friday June 25, 2021 @01:32PM (#27633862)
I think you need at least two major releases (or two years) where you can do things the old way or the new way.

Some organizations have a long path to production for runtimes and would prefer to skip releases. Requiring a code change to be tied to the runtime update makes things harder and encourages staying on the old release forever.